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.
This commit is contained in:
Ben Boeckel
2024-02-24 17:17:22 -05:00
parent e98cbbf65f
commit 0a18f9baad

View File

@@ -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;
}
}
}