From d68b9a08b1edfe80b77fd65afd21faffc81b162b Mon Sep 17 00:00:00 2001 From: "Curtis.Bezault" Date: Tue, 23 Jul 2019 16:28:00 -0700 Subject: only use filename --- toolsrc/src/vcpkg/build.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'toolsrc/src') diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 70c664b75..9d5b490e3 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -281,7 +281,7 @@ namespace vcpkg::Build for (auto& file_hash : pre_build_info.external_files) { bpgh.external_files.emplace( - std::move(file_hash.first), + file_hash.first.u8string(), std::move(file_hash.second)); } @@ -459,7 +459,7 @@ namespace vcpkg::Build return command; } - static std::vector> get_external_file_hashes( + static std::vector> get_external_file_hashes( const VcpkgPaths& paths, const std::vector& files) { @@ -467,7 +467,7 @@ namespace vcpkg::Build const auto& fs = paths.get_filesystem(); - std::vector> hashes; + std::vector> hashes; for (const fs::path& external_file : files) { auto it_hash = s_hash_cache.find(external_file); @@ -705,7 +705,16 @@ namespace vcpkg::Build } //Make a copy of the external files and their hashes, and sort by hash - auto additional_file_hashes = pre_build_info.external_files; + std::vector> additional_file_hashes + = Util::fmap(pre_build_info.external_files, + [](const std::pair& file_hash) + { + return std::pair{ + file_hash.first.filename().u8string(), + file_hash.second + }; + }); + std::sort( additional_file_hashes.begin(), additional_file_hashes.end(), -- cgit v1.2.3