mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
cmMakefile: add RaiseScope for list of variables
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -880,6 +880,7 @@ public:
|
||||
{
|
||||
this->RaiseScope(var, value.GetCStr());
|
||||
}
|
||||
void RaiseScope(const std::vector<std::string>& variables);
|
||||
|
||||
// push and pop loop scopes
|
||||
void PushLoopBlockBarrier();
|
||||
|
||||
Reference in New Issue
Block a user