From f742f7ac1f213531da07e56582b533114fe4b864 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Sat, 7 Dec 2019 14:51:34 +0100 Subject: Unity/PCH: Skip more target types when adding automatic sources Besides INTERFACE_LIBRARY, skip also UTILITY and GLOBAL_TARGET target types --- Source/cmGlobalGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 96656a5..b7f8990 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); -- cgit v0.12