summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index c0e0bf4..c77fcdb 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -780,6 +780,16 @@ public:
void PopScope();
void RaiseScope(const char *var, const char *value);
+ /** Helper class to push and pop scopes automatically. */
+ class ScopePushPop
+ {
+ public:
+ ScopePushPop(cmMakefile* m): Makefile(m) { this->Makefile->PushScope(); }
+ ~ScopePushPop() { this->Makefile->PopScope(); }
+ private:
+ cmMakefile* Makefile;
+ };
+
void IssueMessage(cmake::MessageType t,
std::string const& text) const;