summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-08-20 09:34:19 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-09-03 17:27:26 (GMT)
commit8f0e1f2111c046aaa240a54c211404747c911698 (patch)
tree56dd69b0e8bd8f484beebe4f3f6b0ea785c0ecf6 /Source/cmMakefile.cxx
parentb4c5b5a5f9b833f165d431babb26034e35553473 (diff)
downloadCMake-8f0e1f2111c046aaa240a54c211404747c911698.zip
CMake-8f0e1f2111c046aaa240a54c211404747c911698.tar.gz
CMake-8f0e1f2111c046aaa240a54c211404747c911698.tar.bz2
cmMakefile: add RaiseScope for list of variables
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b228e2b..51a4b3b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4188,6 +4188,18 @@ void cmMakefile::RaiseScope(const std::string& var, const char* varDef)
#endif
}
+void cmMakefile::RaiseScope(const std::vector<std::string>& variables)
+{
+ for (auto const& varName : variables) {
+ if (this->IsNormalDefinitionSet(varName)) {
+ this->RaiseScope(varName, this->GetDefinition(varName));
+ } else {
+ // unset variable in parent scope
+ this->RaiseScope(varName, nullptr);
+ }
+ }
+}
+
cmTarget* cmMakefile::AddImportedTarget(const std::string& name,
cmStateEnums::TargetType type,
bool global)