diff options
Diffstat (limited to 'toolsrc/include/SourceParagraph.h')
| -rw-r--r-- | toolsrc/include/SourceParagraph.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 7b0fa3178..a53158f3f 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,6 +1,9 @@ #pragma once +#include "vcpkg_System.h" #include "vcpkg_expected.h" + +#include <string> #include <unordered_map> #include <vector> @@ -38,6 +41,7 @@ namespace vcpkg std::string version; std::string description; std::string maintainer; + std::vector<std::string> supports; std::vector<Dependency> depends; }; @@ -47,5 +51,36 @@ namespace vcpkg std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t); std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends); - std::vector<std::string> parse_depends(const std::string& depends_string); + std::vector<std::string> parse_comma_list(const std::string& str); + + struct Supports + { + static ExpectedT<Supports, std::vector<std::string>> parse(const std::vector<std::string>& strs); + + using Architecture = System::CPUArchitecture; + + enum class Platform + { + WINDOWS, + UWP, + }; + enum class Linkage + { + DYNAMIC, + STATIC, + }; + enum class ToolsetVersion + { + V140, + V141, + }; + + bool supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); + + private: + std::vector<Architecture> architectures; + std::vector<Platform> platforms; + std::vector<Linkage> crt_linkages; + std::vector<ToolsetVersion> toolsets; + }; } |
