diff options
author | Brad King <brad.king@kitware.com> | 2009-01-22 15:56:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-22 15:56:50 (GMT) |
commit | a01eb6b27be0e9a32378c56140d231ceda612368 (patch) | |
tree | c43d0140b682020f2339209f13321c500ff72ee6 /Source/cmMakefile.h | |
parent | 8997f4760a83efb270f3f9234a016451c0884fe2 (diff) | |
download | CMake-a01eb6b27be0e9a32378c56140d231ceda612368.zip CMake-a01eb6b27be0e9a32378c56140d231ceda612368.tar.gz CMake-a01eb6b27be0e9a32378c56140d231ceda612368.tar.bz2 |
ENH: Create automatic policy push/pop helper
This creates cmMakefile::PolicyPushPop to push and pop policy scope
automatically. It also enforces balanced push/pop pairs inside the
scope it handles.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4daec16..fb1e1e1 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -346,6 +346,18 @@ public: bool SetPolicyVersion(const char *version); //@} + /** Helper class to push and pop policies automatically. */ + class PolicyPushPop + { + public: + PolicyPushPop(cmMakefile* m); + ~PolicyPushPop(); + private: + cmMakefile* Makefile; + size_t PolicyDepth; + }; + friend class PolicyPushPop; + /** * Get the Policies Instance */ |