summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-30 13:34:57 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-30 13:34:57 (GMT)
commitdce58afd30b781bd99a1af5c6860583577d58a1f (patch)
tree7bcd7f200b957f10648dc34e722f1cfa56e0884a /Source/cmMakefile.cxx
parentc88cf48bbe775c45c36c23b990c89d85b7b9a220 (diff)
parent013d7dd48420b7040355066724ede9eb7050c94a (diff)
downloadCMake-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/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a528fc6..640f823 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1776,7 +1776,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot);
this->GetGlobalGenerator()->AddMakefile(subMf);
- if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
+ if (excludeFromAll) {
subMf->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
@@ -2051,9 +2051,7 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname,
// over changes in CMakeLists.txt, making the information stale and
// hence useless.
target->ClearDependencyInformation(*this);
- if (excludeFromAll ||
- (type != cmStateEnums::INTERFACE_LIBRARY &&
- this->GetPropertyAsBool("EXCLUDE_FROM_ALL"))) {
+ if (excludeFromAll) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
target->AddSources(srcs);
@@ -2066,7 +2064,7 @@ cmTarget* cmMakefile::AddExecutable(const std::string& exeName,
bool excludeFromAll)
{
cmTarget* target = this->AddNewTarget(cmStateEnums::EXECUTABLE, exeName);
- if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
+ if (excludeFromAll) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
target->AddSources(srcs);
@@ -2093,7 +2091,7 @@ cmTarget* cmMakefile::AddNewUtilityTarget(const std::string& utilityName,
{
cmTarget* target = this->AddNewTarget(cmStateEnums::UTILITY, utilityName);
target->SetIsGeneratorProvided(origin == cmCommandOrigin::Generator);
- if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
+ if (excludeFromAll) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
return target;