diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/PackageSpec.h | 11 | ||||
| -rw-r--r-- | toolsrc/include/SourceParagraph.h | 12 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_Parse.h | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 77a14e90e..8e986b4d6 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -1,6 +1,6 @@ #pragma once + #include "PackageSpecParseResult.h" -#include "SourceParagraph.h" #include "Triplet.h" #include "vcpkg_expected.h" @@ -17,7 +17,6 @@ namespace vcpkg struct PackageSpec { - static std::string to_string(const std::string& name, const Triplet& triplet); static ExpectedT<PackageSpec, PackageSpecParseResult> from_name_and_triplet(const std::string& name, const Triplet& triplet); @@ -43,6 +42,14 @@ namespace vcpkg const Triplet& default_triplet); }; + struct Features + { + std::string name; + std::vector<std::string> features; + + static ExpectedT<Features, PackageSpecParseResult> from_string(const std::string& input); + }; + bool operator==(const PackageSpec& left, const PackageSpec& right); bool operator!=(const PackageSpec& left, const PackageSpec& right); } diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index fee61c3e8..d938e2e3b 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,5 +1,6 @@ #pragma once +#include "PackageSpec.h" #include "Span.h" #include "vcpkg_Parse.h" #include "vcpkg_System.h" @@ -13,16 +14,6 @@ namespace vcpkg { extern bool g_feature_packages; - struct Triplet; - - struct Features - { - std::string name; - std::vector<std::string> features; - }; - - Features parse_feature_list(const std::string& name); - struct Dependency { Features depend; @@ -73,7 +64,6 @@ namespace vcpkg // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends); - std::vector<std::string> parse_comma_list(const std::string& str); struct Supports { diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h index a2eb152dc..e663448b9 100644 --- a/toolsrc/include/vcpkg_Parse.h +++ b/toolsrc/include/vcpkg_Parse.h @@ -33,4 +33,6 @@ namespace vcpkg::Parse RawParagraph&& fields; std::vector<std::string> missing_fields; }; + + std::vector<std::string> parse_comma_list(const std::string& str); } |
