summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-30 13:19:21 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-30 13:19:21 (GMT)
commit05d7ca14e99ee8ad36da01ddb314d0b90ab41874 (patch)
treec923027983a11aef0edb53946ab94aa5fc5f1e2d /Source/cmGlobalGenerator.cxx
parent156b56480a786db4d967bde5eb6d5edee56a27d0 (diff)
parentb3b1c7bf3afc8f33fa69b79f47f778cb781ac3c7 (diff)
downloadCMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.zip
CMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.tar.gz
CMake-05d7ca14e99ee8ad36da01ddb314d0b90ab41874.tar.bz2
Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all'
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6b001f2..ea898e1 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2088,10 +2088,18 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
return this->IsExcluded(rootSnp, snp);
}
-bool cmGlobalGenerator::IsExcluded(cmGeneratorTarget* target) const
+bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
+ cmGeneratorTarget* target) const
{
- return target->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
- target->GetPropertyAsBool("EXCLUDE_FROM_ALL");
+ if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ return true;
+ }
+ if (const char* exclude = target->GetProperty("EXCLUDE_FROM_ALL")) {
+ return cmSystemTools::IsOn(exclude);
+ }
+ // This target is included in its directory. Check whether the
+ // directory is excluded.
+ return this->IsExcluded(root, target->GetLocalGenerator());
}
void cmGlobalGenerator::GetEnabledLanguages(