summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:01 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:14:01 +0900
commite1763ae434c946bd1c1e9a7cc66a905ebe027bbd (patch)
treea86d4c5780285c842873eff1dc3fb0d760ecb5ae /Source
parent3ca352e5131db9afbc19acc82e52975f742ec26e (diff)
downloadcmake-e1763ae434c946bd1c1e9a7cc66a905ebe027bbd.tar.gz
cmake-e1763ae434c946bd1c1e9a7cc66a905ebe027bbd.tar.bz2
cmake-e1763ae434c946bd1c1e9a7cc66a905ebe027bbd.zip
Imported Upstream version 3.14.7upstream/3.14.7
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalGenerator.cxx14
-rw-r--r--Source/cmGlobalGenerator.h2
-rw-r--r--Source/cmGlobalNinjaGenerator.h4
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
-rw-r--r--Source/cmLocalNinjaGenerator.cxx4
-rw-r--r--Source/cmMakefile.cxx10
9 files changed, 26 insertions, 18 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index a1ff9faaa..01dedde07 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 14)
-set(CMake_VERSION_PATCH 6)
+set(CMake_VERSION_PATCH 7)
#set(CMake_VERSION_RC 0)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 386a3f716..8a3720fe6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2029,10 +2029,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(
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ac013268c..0e40610d4 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -522,7 +522,7 @@ protected:
bool IsExcluded(cmStateSnapshot const& root,
cmStateSnapshot const& snp) const;
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
- bool IsExcluded(cmGeneratorTarget* target) const;
+ bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
virtual void InitializeProgressMarks() {}
struct GlobalTargetInfo
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index c619e672f..226b73dfd 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -329,9 +329,9 @@ public:
return LocalGenerators;
}
- bool IsExcluded(cmGeneratorTarget* target)
+ bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target)
{
- return cmGlobalGenerator::IsExcluded(target);
+ return cmGlobalGenerator::IsExcluded(root, target);
}
int GetRuleCmdLength(const std::string& name) { return RuleCmdLength[name]; }
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index dac6ea606..f1a128a83 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -713,7 +713,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
localName, depends, commands, true);
// add the all/all dependency
- if (!this->IsExcluded(gtarget)) {
+ if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) {
depends.clear();
depends.push_back(localName);
commands.clear();
@@ -777,7 +777,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2(
"Pre-install relink rule for target.", localName,
depends, commands, true);
- if (!this->IsExcluded(gtarget)) {
+ if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) {
depends.clear();
depends.push_back(localName);
commands.clear();
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index f3ed76b61..cc5a88004 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -209,7 +209,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
tgt->IsImported()) {
continue;
}
- if (!this->IsExcluded(tgt)) {
+ if (!this->IsExcluded(gen[0], tgt)) {
allBuild->AddUtility(tgt->GetName());
}
}
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 57de60e9a..dc63ce66b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -567,7 +567,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
false, "", false, cmMakefile::AcceptObjectLibraryCommands);
}
- if (!this->IsExcluded(target)) {
+ if (!this->IsExcluded(gens[0], target)) {
allbuild->AddUtility(target->GetName());
}
}
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index c0afc2542..69656a286 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -88,7 +88,9 @@ void cmLocalNinjaGenerator::Generate()
if (tg) {
tg->Generate();
// Add the target to "all" if required.
- if (!this->GetGlobalNinjaGenerator()->IsExcluded(target)) {
+ if (!this->GetGlobalNinjaGenerator()->IsExcluded(
+ this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0],
+ target)) {
this->GetGlobalNinjaGenerator()->AddDependencyToAll(target);
}
delete tg;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7e33bda27..27351226f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1151,7 +1151,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 || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
+ if (excludeFromAll) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}
if (!comment) {
@@ -1689,7 +1689,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");
}
@@ -1985,9 +1985,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);
@@ -2000,7 +1998,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);