diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-13 19:52:00 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-14 16:51:05 (GMT) |
commit | 0f0d853de7054f2ed31253b21aabdb0855510b8f (patch) | |
tree | ee10e8a6dd6e80315f040f73400b40155740f40b /Source | |
parent | 5e984bb35232116a54de7db39788cb162ca7c263 (diff) | |
download | CMake-0f0d853de7054f2ed31253b21aabdb0855510b8f.zip CMake-0f0d853de7054f2ed31253b21aabdb0855510b8f.tar.gz CMake-0f0d853de7054f2ed31253b21aabdb0855510b8f.tar.bz2 |
cmDyndepCollation: collapse full path before looking up
`cmSourceFile::GetFullPath()` performs a `CollapseFullPath` before
storing the path. Match this behavior when looking up paths from the
source file set constructions.
Fixes: #25614
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDyndepCollation.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmDyndepCollation.cxx b/Source/cmDyndepCollation.cxx index edf56ff..2ce0f54 100644 --- a/Source/cmDyndepCollation.cxx +++ b/Source/cmDyndepCollation.cxx @@ -119,7 +119,8 @@ Json::Value CollationInformationCxxModules( for (auto const& files_per_dir : files_per_dirs) { for (auto const& file : files_per_dir.second) { - auto lookup = sf_map.find(file); + auto const full_file = cmSystemTools::CollapseFullPath(file); + auto lookup = sf_map.find(full_file); if (lookup == sf_map.end()) { gt->Makefile->IssueMessage( MessageType::FATAL_ERROR, @@ -147,7 +148,7 @@ Json::Value CollationInformationCxxModules( Json::Value& tdi_module_info = tdi_cxx_module_info[obj_path] = Json::objectValue; - tdi_module_info["source"] = file; + tdi_module_info["source"] = full_file; tdi_module_info["bmi-only"] = ct == CompileType::BmiOnly; tdi_module_info["relative-directory"] = files_per_dir.first; tdi_module_info["name"] = file_set->GetName(); |