diff options
author | Brad King <brad.king@kitware.com> | 2019-09-30 13:34:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-30 13:34:57 (GMT) |
commit | dce58afd30b781bd99a1af5c6860583577d58a1f (patch) | |
tree | 7bcd7f200b957f10648dc34e722f1cfa56e0884a /Source/cmGlobalGenerator.cxx | |
parent | c88cf48bbe775c45c36c23b990c89d85b7b9a220 (diff) | |
parent | 013d7dd48420b7040355066724ede9eb7050c94a (diff) | |
download | CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.zip CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.tar.gz CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.tar.bz2 |
Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'
Resolve conflicts with changes since the 3.15 series:
* Convert `cmSystemTools::IsOn` => `cmIsOn`.
* Move one "EXCLUDE_FROM_ALL" target property logic fix to
its new location in `cmMakefile::AddNewUtilityTarget`.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c4974f3..a75e2ed 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2037,10 +2037,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 cmIsOn(exclude); + } + // This target is included in its directory. Check whether the + // directory is excluded. + return this->IsExcluded(root, target->GetLocalGenerator()); } void cmGlobalGenerator::GetEnabledLanguages( |