diff options
-rw-r--r-- | Source/cmMakefile.cxx | 7 | ||||
-rw-r--r-- | Source/cmState.cxx | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6888882..3c19f55 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4233,9 +4233,7 @@ void cmMakefile::PopScope() this->CheckForUnusedVariables(); - this->StateSnapshot = - this->GetState()->Pop(this->StateSnapshot); - assert(this->StateSnapshot.IsValid()); + this->PopSnapshot(); } void cmMakefile::RaiseScope(const std::string& var, const char *varDef) @@ -4603,8 +4601,6 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, //---------------------------------------------------------------------------- cmMakefile::PolicyPushPop::PolicyPushPop(cmMakefile* m): Makefile(m) { - this->Makefile->StateSnapshot = this->Makefile->StateSnapshot.GetState() - ->CreatePolicyScopeSnapshot(this->Makefile->StateSnapshot); this->Makefile->PushPolicy(); } @@ -4612,7 +4608,6 @@ cmMakefile::PolicyPushPop::PolicyPushPop(cmMakefile* m): Makefile(m) cmMakefile::PolicyPushPop::~PolicyPushPop() { this->Makefile->PopPolicy(); - this->Makefile->PopSnapshot(); } //---------------------------------------------------------------------------- diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 363d2bf..e20ac89 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -884,6 +884,7 @@ cmState::CreateVariableScopeSnapshot(cmState::Snapshot originSnapshot, pos->EntryPointLine = entryPointLine; pos->EntryPointCommand = entryPointCommand; pos->SnapshotType = VariableScopeType; + pos->PolicyScope = originSnapshot.Position->Policies; assert(originSnapshot.Position->Vars.IsValid()); cmLinkedTree<cmDefinitions>::iterator origin = |