summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-12-07 14:51:34 +0100
committerCristian Adam <cristian.adam@gmail.com>2019-12-07 14:51:34 +0100
commitf742f7ac1f213531da07e56582b533114fe4b864 (patch)
tree1c41137859680ad31b9ddb223beb0348243a429c
parenta033bafbe01fcb4654f075955e0b3de7be81b0f7 (diff)
downloadcmake-f742f7ac1f213531da07e56582b533114fe4b864.tar.gz
Unity/PCH: Skip more target types when adding automatic sources
Besides INTERFACE_LIBRARY, skip also UTILITY and GLOBAL_TARGET target types
-rw-r--r--Source/cmGlobalGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 96656a5997..b7f8990709 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1558,7 +1558,9 @@ bool cmGlobalGenerator::AddAutomaticSources()
for (cmLocalGenerator* lg : this->LocalGenerators) {
lg->CreateEvaluationFileOutputs();
for (cmGeneratorTarget* gt : lg->GetGeneratorTargets()) {
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
+ gt->GetType() == cmStateEnums::UTILITY ||
+ gt->GetType() == cmStateEnums::GLOBAL_TARGET) {
continue;
}
lg->AddUnityBuild(gt);