summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-11-24 18:37:34 (GMT)
committerBrad King <brad.king@kitware.com>2015-11-25 00:38:36 (GMT)
commit32edac6fddfbe91e47b34506cda855232d5a9e2c (patch)
tree876042003ec83423d3e7c31af8fea147857da398 /Source/cmState.cxx
parent0fa7f143a08b62459900bd811c2c0674562bb8be (diff)
downloadCMake-32edac6fddfbe91e47b34506cda855232d5a9e2c.zip
CMake-32edac6fddfbe91e47b34506cda855232d5a9e2c.tar.gz
CMake-32edac6fddfbe91e47b34506cda855232d5a9e2c.tar.bz2
cmState: Enforce policy scope balancing around variable scopes
Everywhere we use cmMakefile::ScopePushPop to manage variable scopes also expects policy scopes to be balanced. There is no place that we use cmMakefile::PolicyPushPop without also using ScopePushPop. Relieve PolicyPushPop of responsibility for policy scope balance checks by moving it to ScopePushPop.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx1
1 files changed, 1 insertions, 0 deletions
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 =