diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7012701..d3a8121 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1582,6 +1582,22 @@ void cmMakefile::PopFunctionScope(bool reportError) this->PopScope(); } +void cmMakefile::PushMacroScope(const cmPolicies::PolicyMap& pm) +{ + this->PushFunctionBlockerBarrier(); + + this->PushPolicy(true, pm); + this->PushPolicyBarrier(); +} + +void cmMakefile::PopMacroScope(bool reportError) +{ + this->PopPolicyBarrier(reportError); + this->PopPolicy(); + + this->PopFunctionBlockerBarrier(reportError); +} + //---------------------------------------------------------------------------- class cmMakefileCurrent { @@ -5451,3 +5467,16 @@ cmMakefile::FunctionPushPop::~FunctionPushPop() { this->Makefile->PopFunctionScope(this->ReportError); } + + +cmMakefile::MacroPushPop::MacroPushPop(cmMakefile* mf, + const cmPolicies::PolicyMap& pm) + : Makefile(mf), ReportError(true) +{ + this->Makefile->PushMacroScope(pm); +} + +cmMakefile::MacroPushPop::~MacroPushPop() +{ + this->Makefile->PopMacroScope(this->ReportError); +} |