diff options
author | Brad King <brad.king@kitware.com> | 2020-07-28 12:26:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-28 12:26:23 (GMT) |
commit | 261a2585d9df7113a5ba7c9beacb641754444523 (patch) | |
tree | 3bd5089b08b3dadd6855d49b2569af6c5af9938c /Source/cmGlobalGenerator.cxx | |
parent | 79d341d4d45018641ede514fb8b41a18ab982bc5 (diff) | |
parent | ef796cc74322ff423da1ddef5e4dd52855dac8c7 (diff) | |
download | CMake-261a2585d9df7113a5ba7c9beacb641754444523.zip CMake-261a2585d9df7113a5ba7c9beacb641754444523.tar.gz CMake-261a2585d9df7113a5ba7c9beacb641754444523.tar.bz2 |
Merge topic 'cleanup-target-types'
ef796cc743 cmGeneratorTarget: Skip computing link implementation for custom targets
45158b2afe cmGeneratorTarget: Simplify logic in ComputeLinkInterfaceLibraries
d6b1f5704e cmGeneratorTarget: Add missing nullptr checks
7695b67500 cmComputeTargetDepends: Add missing nullptr check
95b5df8646 cmGeneratorTarget: Skip computing languages for custom targets
2f0790df50 Factor out generator checks for filtering on non-compiling targets
422d9a0ab2 Factor out generator checks for filtering out interface libraries
bce82df0aa cmGeneratorTarget: Remove unnecessary target type check in dependency tracing
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5038
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 17c7e99..eff6665 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -302,9 +302,7 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const bool failed = false; for (const auto& localGen : this->LocalGenerators) { for (const auto& target : localGen->GetGeneratorTargets()) { - if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET || - target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY || - target->GetType() == cmStateEnums::TargetType::UTILITY || + if (!target->CanCompileSources() || cmIsOn(target->GetProperty("ghs_integrity_app"))) { continue; } @@ -358,9 +356,7 @@ bool cmGlobalGenerator::CheckTargetsForPchCompilePdb() const bool failed = false; for (const auto& generator : this->LocalGenerators) { for (const auto& target : generator->GetGeneratorTargets()) { - if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET || - target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY || - target->GetType() == cmStateEnums::TargetType::UTILITY || + if (!target->CanCompileSources() || cmIsOn(target->GetProperty("ghs_integrity_app"))) { continue; } @@ -1595,9 +1591,7 @@ bool cmGlobalGenerator::AddAutomaticSources() for (const auto& lg : this->LocalGenerators) { lg->CreateEvaluationFileOutputs(); for (const auto& gt : lg->GetGeneratorTargets()) { - if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY || - gt->GetType() == cmStateEnums::UTILITY || - gt->GetType() == cmStateEnums::GLOBAL_TARGET) { + if (!gt->CanCompileSources()) { continue; } lg->AddUnityBuild(gt.get()); @@ -1609,9 +1603,7 @@ bool cmGlobalGenerator::AddAutomaticSources() } for (const auto& lg : this->LocalGenerators) { for (const auto& gt : lg->GetGeneratorTargets()) { - if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY || - gt->GetType() == cmStateEnums::UTILITY || - gt->GetType() == cmStateEnums::GLOBAL_TARGET) { + if (!gt->CanCompileSources()) { continue; } // Handle targets that re-use a PCH from an above-handled target. @@ -2165,7 +2157,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, const cmGeneratorTarget* target) const { - if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + if (!target->IsInBuildSystem()) { return true; } cmMakefile* mf = root->GetMakefile(); @@ -3054,7 +3046,7 @@ void cmGlobalGenerator::WriteSummary() for (const auto& lg : this->LocalGenerators) { for (const auto& tgt : lg->GetGeneratorTargets()) { - if (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + if (!tgt->IsInBuildSystem()) { continue; } this->WriteSummary(tgt.get()); |