diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-31 16:32:01 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-04 20:08:23 (GMT) |
commit | ca140c2e898ca74a7daa305449b136b1294a41f0 (patch) | |
tree | 7b174ae4abdb9a7e9d95bfdbe6232daa00751014 /Source/cmMacroCommand.cxx | |
parent | d5dc4169ac1c4dd5abd385b1e8499119df88c657 (diff) | |
download | CMake-ca140c2e898ca74a7daa305449b136b1294a41f0.zip CMake-ca140c2e898ca74a7daa305449b136b1294a41f0.tar.gz CMake-ca140c2e898ca74a7daa305449b136b1294a41f0.tar.bz2 |
cmMakefile: Create a unified raii for macro scopes.
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r-- | Source/cmMacroCommand.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 7ac4432..028ab62 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -96,12 +96,8 @@ bool cmMacroHelperCommand::InvokeInitialPass return false; } - // Enforce matching logical blocks inside the macro. - cmMakefile::LexicalPushPop lexScope(this->Makefile); - - // Push a weak policy scope which restores the policies recorded at - // macro creation. - cmMakefile::PolicyPushPop polScope(this->Makefile, true, this->Policies); + cmMakefile::MacroPushPop macroScope(this->Makefile, + this->Policies); // set the value of argc std::ostringstream argcDefStream; @@ -191,8 +187,7 @@ bool cmMacroHelperCommand::InvokeInitialPass { // The error message should have already included the call stack // so we do not need to report an error here. - lexScope.Quiet(); - polScope.Quiet(); + macroScope.Quiet(); inStatus.SetNestedError(true); return false; } |