diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-21 19:26:36 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-04 09:51:27 (GMT) |
commit | a8e54460243b0650145c8684f3d8deb8a712376a (patch) | |
tree | 15c98b9a00b629302430c82b477c0f859bfa8658 /Source/cmMakefile.cxx | |
parent | dbafb01580a0d35e33e6577ad07002f4dd345236 (diff) | |
download | CMake-a8e54460243b0650145c8684f3d8deb8a712376a.zip CMake-a8e54460243b0650145c8684f3d8deb8a712376a.tar.gz CMake-a8e54460243b0650145c8684f3d8deb8a712376a.tar.bz2 |
cmState: Store snapshots for more different types.
Adjust cmMakefile implementation to create the snapshots.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 678c1b3..a176cda 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -463,11 +463,19 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, this->Makefile->PushPolicyBarrier(); this->Makefile->ListFileStack.push_back(filenametoread); this->Makefile->PushFunctionBlockerBarrier(); + + this->Makefile->StateSnapshot = + this->Makefile->GetState()->CreateCallStackSnapshot( + this->Makefile->StateSnapshot); } //---------------------------------------------------------------------------- cmMakefile::IncludeScope::~IncludeScope() { + this->Makefile->StateSnapshot = + this->Makefile->GetState()->Pop(this->Makefile->StateSnapshot); + assert(this->Makefile->StateSnapshot.IsValid()); + this->Makefile->PopFunctionBlockerBarrier(this->ReportError); // Enforce matching policy scopes inside the included file. this->Makefile->PopPolicyBarrier(this->ReportError); @@ -567,11 +575,20 @@ public: { this->Makefile->ListFileStack.push_back(filenametoread); this->Makefile->PushPolicyBarrier(); + + this->Makefile->StateSnapshot = + this->Makefile->GetState()->CreateInlineListFileSnapshot( + this->Makefile->StateSnapshot); + assert(this->Makefile->StateSnapshot.IsValid()); this->Makefile->PushFunctionBlockerBarrier(); } ~ListFileScope() { + this->Makefile->StateSnapshot = + this->Makefile->GetState()->Pop(this->Makefile->StateSnapshot); + assert(this->Makefile->StateSnapshot.IsValid()); + this->Makefile->PopFunctionBlockerBarrier(this->ReportError); this->Makefile->PopPolicyBarrier(this->ReportError); this->Makefile->ListFileStack.pop_back(); @@ -1575,6 +1592,11 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) void cmMakefile::PushFunctionScope(const cmPolicies::PolicyMap& pm) { + this->StateSnapshot = + this->GetState()->CreateFunctionCallSnapshot( + this->StateSnapshot); + assert(this->StateSnapshot.IsValid()); + this->Internal->PushDefinitions(); this->PushLoopBlockBarrier(); @@ -1594,6 +1616,9 @@ void cmMakefile::PopFunctionScope(bool reportError) this->PopPolicyBarrier(reportError); this->PopPolicy(); + this->StateSnapshot = this->GetState()->Pop(this->StateSnapshot); + assert(this->StateSnapshot.IsValid()); + this->PopFunctionBlockerBarrier(reportError); #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -1609,6 +1634,11 @@ void cmMakefile::PopFunctionScope(bool reportError) void cmMakefile::PushMacroScope(const cmPolicies::PolicyMap& pm) { + this->StateSnapshot = + this->GetState()->CreateMacroCallSnapshot( + this->StateSnapshot); + assert(this->StateSnapshot.IsValid()); + this->PushFunctionBlockerBarrier(); this->PushPolicy(true, pm); @@ -1620,6 +1650,9 @@ void cmMakefile::PopMacroScope(bool reportError) this->PopPolicyBarrier(reportError); this->PopPolicy(); + this->StateSnapshot = this->GetState()->Pop(this->StateSnapshot); + assert(this->StateSnapshot.IsValid()); + this->PopFunctionBlockerBarrier(reportError); } |