aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg/dependencies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/vcpkg/dependencies.cpp')
-rw-r--r--toolsrc/src/vcpkg/dependencies.cpp77
1 files changed, 40 insertions, 37 deletions
diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp
index 09f35d2b1..ab14934a2 100644
--- a/toolsrc/src/vcpkg/dependencies.cpp
+++ b/toolsrc/src/vcpkg/dependencies.cpp
@@ -13,45 +13,48 @@
namespace vcpkg::Dependencies
{
- struct ClusterInstalled
+ namespace
{
- InstalledPackageView ipv;
- std::set<PackageSpec> remove_edges;
- std::set<std::string> original_features;
- };
+ struct ClusterInstalled
+ {
+ InstalledPackageView ipv;
+ std::set<PackageSpec> remove_edges;
+ std::set<std::string> original_features;
+ };
- struct ClusterSource
- {
- const SourceControlFileLocation* scfl = nullptr;
- std::unordered_map<std::string, std::vector<FeatureSpec>> build_edges;
- };
+ struct ClusterSource
+ {
+ const SourceControlFileLocation* scfl = nullptr;
+ std::unordered_map<std::string, std::vector<FeatureSpec>> build_edges;
+ };
- /// <summary>
- /// Representation of a package and its features in a ClusterGraph.
- /// </summary>
- struct Cluster : Util::MoveOnlyBase
- {
- PackageSpec spec;
+ /// <summary>
+ /// Representation of a package and its features in a ClusterGraph.
+ /// </summary>
+ struct Cluster : Util::MoveOnlyBase
+ {
+ PackageSpec spec;
- Optional<ClusterInstalled> installed;
- Optional<ClusterSource> source;
+ Optional<ClusterInstalled> installed;
+ Optional<ClusterSource> source;
- // Note: this map can contain "special" strings such as "" and "*"
- std::unordered_map<std::string, bool> plus;
- std::set<std::string> to_install_features;
- bool minus = false;
- bool transient_uninstalled = true;
- RequestType request_type = RequestType::AUTO_SELECTED;
- };
+ // Note: this map can contain "special" strings such as "" and "*"
+ std::unordered_map<std::string, bool> plus;
+ std::set<std::string> to_install_features;
+ bool minus = false;
+ bool transient_uninstalled = true;
+ RequestType request_type = RequestType::AUTO_SELECTED;
+ };
- struct ClusterPtr
- {
- Cluster* ptr;
+ struct ClusterPtr
+ {
+ Cluster* ptr;
- Cluster* operator->() const { return ptr; }
- };
+ Cluster* operator->() const { return ptr; }
+ };
- bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; }
+ bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; }
+ }
}
namespace std
@@ -122,11 +125,11 @@ namespace vcpkg::Dependencies
const PortFileProvider& m_provider;
};
- std::string to_output_string(RequestType request_type,
- const CStringView s,
- const Build::BuildPackageOptions& options,
- const fs::path& install_port_path,
- const fs::path& default_port_path)
+ static std::string to_output_string(RequestType request_type,
+ const CStringView s,
+ const Build::BuildPackageOptions& options,
+ const fs::path& install_port_path,
+ const fs::path& default_port_path)
{
if (!default_port_path.empty() &&
!Strings::case_insensitive_ascii_starts_with(install_port_path.u8string(), default_port_path.u8string()))
@@ -670,7 +673,7 @@ namespace vcpkg::Dependencies
}
}
- //The feature was not previously installed. Mark the cluster
+ // The feature was not previously installed. Mark the cluster
//(aka the entire port) to be removed before re-adding it.
mark_minus(cluster, graph, graph_plan, prevent_default_features);