summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-31 16:19:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-04 20:08:23 (GMT)
commitd5dc4169ac1c4dd5abd385b1e8499119df88c657 (patch)
treeedb2a3f9380bbdea10920da2b09963e8c1627bd6 /Source/cmMakefile.h
parent91cd014d6452371056bb3f96de29967f506b3bd7 (diff)
downloadCMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.zip
CMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.tar.gz
CMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.tar.bz2
cmMakefile: Create a unified raii for function scopes.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 431ed08..ed9bc70 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -746,7 +746,21 @@ public:
const std::vector<cmTestGenerator*>& GetTestGenerators() const
{ return this->TestGenerators; }
- // push and pop variable scopes
+ class FunctionPushPop
+ {
+ public:
+ FunctionPushPop(cmMakefile* mf,
+ cmPolicies::PolicyMap const& pm);
+ ~FunctionPushPop();
+
+ void Quiet() { this->ReportError = false; }
+ private:
+ cmMakefile* Makefile;
+ bool ReportError;
+ };
+
+ void PushFunctionScope(cmPolicies::PolicyMap const& pm);
+ void PopFunctionScope(bool reportError);
void PushScope();
void PopScope();
void RaiseScope(const std::string& var, const char *value);