summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-12-07 14:03:16 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2019-12-07 14:44:38 (GMT)
commitfa93b4a59bd639c995ffdf8a5c41dc587c160716 (patch)
treeb7adad006caae1acba0339f1ed96b2c5073afbbe /Source/cmGlobalGenerator.cxx
parent5ae07e7166c6cb7eada2a2d171d216039d977058 (diff)
downloadCMake-fa93b4a59bd639c995ffdf8a5c41dc587c160716.zip
CMake-fa93b4a59bd639c995ffdf8a5c41dc587c160716.tar.gz
CMake-fa93b4a59bd639c995ffdf8a5c41dc587c160716.tar.bz2
Unity: Proper handling of object libraries
Fixes: #20051
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b7f8990..09fb87d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1567,6 +1567,15 @@ bool cmGlobalGenerator::AddAutomaticSources()
lg->AddPchDependencies(gt);
}
}
+ // The above transformations may have changed the classification of sources.
+ // Clear the source list and classification cache (KindedSources) of all
+ // targets so that it will be recomputed correctly by the generators later
+ // now that the above transformations are done for all targets.
+ for (cmLocalGenerator* lg : this->LocalGenerators) {
+ for (cmGeneratorTarget* gt : lg->GetGeneratorTargets()) {
+ gt->ClearSourcesCache();
+ }
+ }
return true;
}