summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-26 10:56:10 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-02 06:56:57 (GMT)
commit348354333a82ce98d733dc2ee939186c53c506f9 (patch)
tree6cccb581d9ce5af3498dab650a30348ad0cad9a6 /Source/cmMakefile.cxx
parentaf0de01c6b3395fb1dba5d2ee0a94c19a9b464e9 (diff)
downloadCMake-348354333a82ce98d733dc2ee939186c53c506f9.zip
CMake-348354333a82ce98d733dc2ee939186c53c506f9.tar.gz
CMake-348354333a82ce98d733dc2ee939186c53c506f9.tar.bz2
cmState: Add Type for policy scope.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 2c854dd..9fb3d06 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -189,6 +189,9 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)");
this->cmNamedCurly.compile("^[A-Za-z0-9/_.+-]+{");
+ this->StateSnapshot = this->StateSnapshot.GetState()
+ ->CreatePolicyScopeSnapshot(this->StateSnapshot);
+
// Protect the directory-level policies.
this->PushPolicyBarrier();
@@ -1705,6 +1708,8 @@ public:
this->Makefile->StateSnapshot.GetDirectory().GetCurrentSource();
currentStart += "/CMakeLists.txt";
this->Makefile->StateSnapshot.SetListFile(currentStart);
+ this->Makefile->StateSnapshot = this->Makefile->StateSnapshot.GetState()
+ ->CreatePolicyScopeSnapshot(this->Makefile->StateSnapshot);
this->Makefile->PushPolicyBarrier();
this->Makefile->PushFunctionBlockerBarrier();
@@ -1722,6 +1727,8 @@ public:
{
this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
this->Makefile->PopPolicyBarrier(this->ReportError);
+ this->Makefile->StateSnapshot = this->Makefile->StateSnapshot.GetState()
+ ->Pop(this->Makefile->StateSnapshot);
#if defined(CMAKE_BUILD_WITH_CMAKE)
this->GG->GetFileLockPool().PopFileScope();
#endif
@@ -4841,6 +4848,8 @@ cmMakefile::PolicyPushPop::PolicyPushPop(cmMakefile* m, bool weak,
cmPolicies::PolicyMap const& pm):
Makefile(m), ReportError(true)
{
+ this->Makefile->StateSnapshot = this->Makefile->StateSnapshot.GetState()
+ ->CreatePolicyScopeSnapshot(this->Makefile->StateSnapshot);
this->Makefile->PushPolicyBarrier();
this->Makefile->PushPolicy(weak, pm);
}
@@ -4850,6 +4859,8 @@ cmMakefile::PolicyPushPop::~PolicyPushPop()
{
this->Makefile->PopPolicy();
this->Makefile->PopPolicyBarrier(this->ReportError);
+ this->Makefile->StateSnapshot = this->Makefile->StateSnapshot.GetState()
+ ->Pop(this->Makefile->StateSnapshot);
}
//----------------------------------------------------------------------------