Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/vcpkg/vcpkgpaths.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace vcpkg
const std::vector<std::string> get_available_triplets_names() const;
const std::vector<TripletFile>& get_available_triplets() const;
const std::map<std::string, std::string>& get_cmake_script_hashes() const;
StringView get_ports_cmake_hash() const;
const fs::path get_triplet_file_path(Triplet triplet) const;

fs::path original_cwd;
Expand Down
1 change: 1 addition & 0 deletions src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ namespace vcpkg::Build
}
}

abi_tag_entries.emplace_back("ports.cmake", paths.get_ports_cmake_hash().to_string());
abi_tag_entries.emplace_back("post_build_checks", "2");
std::vector<std::string> sorted_feature_list = action.feature_list;
Util::sort(sorted_feature_list);
Expand Down
8 changes: 8 additions & 0 deletions src/vcpkg/vcpkgpaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ namespace vcpkg
Lazy<std::vector<VcpkgPaths::TripletFile>> available_triplets;
Lazy<std::vector<Toolset>> toolsets;
Lazy<std::map<std::string, std::string>> cmake_script_hashes;
Lazy<std::string> ports_cmake_hash;

Files::Filesystem* fs_ptr;

Expand Down Expand Up @@ -460,6 +461,13 @@ If you wish to silence this error and use classic mode, you can:
});
}

StringView VcpkgPaths::get_ports_cmake_hash() const
{
return m_pimpl->ports_cmake_hash.get_lazy([this]() -> std::string {
return Hash::get_file_hash(VCPKG_LINE_INFO, get_filesystem(), ports_cmake, Hash::Algorithm::Sha1);
});
}

const fs::path VcpkgPaths::get_triplet_file_path(Triplet triplet) const
{
return m_pimpl->m_triplets_cache.get_lazy(
Expand Down