diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index aef016e..1d02cfa 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4464,6 +4464,17 @@ void cmMakefile::PushScope() { this->Internal->PushDefinitions(Internals::VariableScope); + std::string commandName; + long line = 0; + if (!this->ContextStack.empty()) + { + commandName = this->ContextStack.back()->Name; + line = this->ContextStack.back()->Line; + } + this->StateSnapshot = this->GetState()->CreateVariableScopeSnapshot( + this->StateSnapshot, + commandName, + line); this->PushLoopBlockBarrier(); #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -4482,6 +4493,9 @@ void cmMakefile::PopScope() this->CheckForUnusedVariables(); this->Internal->PopDefinitions(); + this->StateSnapshot = + this->GetState()->Pop(this->StateSnapshot); + assert(this->StateSnapshot.IsValid()); } void cmMakefile::RaiseScope(const std::string& var, const char *varDef) |