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/cmMakefile.h | |
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/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index ed9bc70..0914a99 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -759,8 +759,23 @@ public: bool ReportError; }; + class MacroPushPop + { + public: + MacroPushPop(cmMakefile* mf, + cmPolicies::PolicyMap const& pm); + ~MacroPushPop(); + + void Quiet() { this->ReportError = false; } + private: + cmMakefile* Makefile; + bool ReportError; + }; + void PushFunctionScope(cmPolicies::PolicyMap const& pm); void PopFunctionScope(bool reportError); + void PushMacroScope(cmPolicies::PolicyMap const& pm); + void PopMacroScope(bool reportError); void PushScope(); void PopScope(); void RaiseScope(const std::string& var, const char *value); |