diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-24 22:17:22 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-02-24 22:17:39 (GMT) |
commit | 0a18f9baad780deec8fe9952b28dd349252d7d81 (patch) | |
tree | f452d772ab1af4c65212237ee8e10f7b35024bc6 /Source | |
parent | e98cbbf65f9a7bde3d0ac5726aa2b74abd8f3f88 (diff) | |
download | CMake-0a18f9baad780deec8fe9952b28dd349252d7d81.zip CMake-0a18f9baad780deec8fe9952b28dd349252d7d81.tar.gz CMake-0a18f9baad780deec8fe9952b28dd349252d7d81.tar.bz2 |
cmGeneratorTarget: collapse paths before querying the fileset cache
Observed with paths with `../` when outside of the source tree. I
attempted to reproduce a test suite case for it but could not make it
happen.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 40711a3..94bb8e1 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -9435,7 +9435,8 @@ void cmGeneratorTarget::BuildFileSetInfoCache(std::string const& config) const for (auto const& it : files) { for (auto const& filename : it.second) { - per_config.FileSetCache[filename] = file_set; + auto collapsedFile = cmSystemTools::CollapseFullPath(filename); + per_config.FileSetCache[collapsedFile] = file_set; } } } |