aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2019-06-27 12:20:12 -0700
committerGitHub <noreply@github.com>2019-06-27 12:20:12 -0700
commit35e985d3ccf60235bc4881df4d934610cd507090 (patch)
treecc50cdccbffe94f765dfbe812e9cb241f55f27b2 /toolsrc/include
parent82cd021b42ddce34b487a9665cf2614b563919de (diff)
downloadvcpkg-35e985d3ccf60235bc4881df4d934610cd507090.tar.gz
vcpkg-35e985d3ccf60235bc4881df4d934610cd507090.zip
Triplets Overlay Implementation (#7053)
* Triplets Overlay Implementation * Use cache for get_triplet_file_path() * Code cleanup
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/vcpkgcmdarguments.h1
-rw-r--r--toolsrc/include/vcpkg/vcpkgpaths.h11
2 files changed, 9 insertions, 3 deletions
diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
index cad013eb8..ff13ae6bf 100644
--- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h
+++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
@@ -88,6 +88,7 @@ namespace vcpkg
std::unique_ptr<std::string> vcpkg_root_dir;
std::unique_ptr<std::string> triplet;
std::unique_ptr<std::vector<std::string>> overlay_ports;
+ std::unique_ptr<std::vector<std::string>> overlay_triplets;
Optional<bool> debug = nullopt;
Optional<bool> sendmetrics = nullopt;
Optional<bool> printmetrics = nullopt;
diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h
index b09169b02..a30e0c653 100644
--- a/toolsrc/include/vcpkg/vcpkgpaths.h
+++ b/toolsrc/include/vcpkg/vcpkgpaths.h
@@ -47,14 +47,17 @@ namespace vcpkg
struct VcpkgPaths
{
- static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path);
+ static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir,
+ const std::string& default_vs_path,
+ const std::vector<std::string>* triplets_dirs);
fs::path package_dir(const PackageSpec& spec) const;
fs::path build_info_file_path(const PackageSpec& spec) const;
fs::path listfile_path(const BinaryParagraph& pgh) const;
-
- const std::vector<std::string>& get_available_triplets() const;
+
bool is_valid_triplet(const Triplet& t) const;
+ const std::vector<std::string>& get_available_triplets() const;
+ const fs::path get_triplet_file_path(const Triplet& triplet) const;
fs::path root;
fs::path packages;
@@ -93,7 +96,9 @@ namespace vcpkg
Lazy<std::vector<Toolset>> toolsets_vs2013;
fs::path default_vs_path;
+ std::vector<fs::path> triplets_dirs;
mutable std::unique_ptr<ToolCache> m_tool_cache;
+ mutable vcpkg::Cache<Triplet, fs::path> m_triplets_cache;
};
}