Unity/PCH: Skip more target types when adding automatic sources

Besides INTERFACE_LIBRARY, skip also UTILITY and GLOBAL_TARGET
target types
This commit is contained in:
Cristian Adam
2019-12-07 14:51:34 +01:00
parent a033bafbe0
commit f742f7ac1f

View File

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