From 0a18f9baad780deec8fe9952b28dd349252d7d81 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 24 Feb 2024 17:17:22 -0500 Subject: 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. --- Source/cmGeneratorTarget.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } } -- cgit v0.12