diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 40711a36c3..94bb8e1295 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; } } }