diff options
author | Brad King <brad.king@kitware.com> | 2019-01-25 13:05:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-25 13:06:54 (GMT) |
commit | 24b6e4830d9027e63db7dfafa500aaeb652d3a4c (patch) | |
tree | b5697a362f3573609e1228bff0629d162b619de1 /Source/cmMakefile.cxx | |
parent | 15bc4a25e50d18ba081f31ffd8fc4724b83460b5 (diff) | |
parent | dc6888573da15cd7ddb9f91b70ef3e6c4e7cae15 (diff) | |
download | CMake-24b6e4830d9027e63db7dfafa500aaeb652d3a4c.zip CMake-24b6e4830d9027e63db7dfafa500aaeb652d3a4c.tar.gz CMake-24b6e4830d9027e63db7dfafa500aaeb652d3a4c.tar.bz2 |
Merge topic 'exclude_from_all'
dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2816
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 82fb160..7eed837 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1128,7 +1128,7 @@ cmTarget* cmMakefile::AddUtilityCommand( // Create a target instance for this utility. cmTarget* target = this->AddNewTarget(cmStateEnums::UTILITY, utilityName); target->SetIsGeneratorProvided(origin == TargetOrigin::Generator); - if (excludeFromAll) { + if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } if (!comment) { @@ -1663,7 +1663,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot); this->GetGlobalGenerator()->AddMakefile(subMf); - if (excludeFromAll) { + if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { subMf->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } @@ -1959,7 +1959,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) { + if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); @@ -1972,7 +1972,7 @@ cmTarget* cmMakefile::AddExecutable(const std::string& exeName, bool excludeFromAll) { cmTarget* target = this->AddNewTarget(cmStateEnums::EXECUTABLE, exeName); - if (excludeFromAll) { + if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); |