diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2022-08-15 15:05:12 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-08-22 14:25:53 (GMT) |
commit | 604993248fdee0bec8ab8c74c1173c67496a7dfd (patch) | |
tree | 8927bd77c413738e669aafac0bcb7d8b7e8a0879 /Source/cmMakefile.h | |
parent | 3d94ee0e03a82e602a8ce6c2b745f29285e69fd4 (diff) | |
download | CMake-604993248fdee0bec8ab8c74c1173c67496a7dfd.zip CMake-604993248fdee0bec8ab8c74c1173c67496a7dfd.tar.gz CMake-604993248fdee0bec8ab8c74c1173c67496a7dfd.tar.bz2 |
cmMakefile::VariablePushPop: helper class to manage variable scopes
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 0198ec1..10432a8 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -376,6 +376,20 @@ public: }; friend class PolicyPushPop; + /** Helper class to push and pop variables scopes automatically. */ + class VariablePushPop + { + public: + VariablePushPop(cmMakefile* m); + ~VariablePushPop(); + + VariablePushPop(VariablePushPop const&) = delete; + VariablePushPop& operator=(VariablePushPop const&) = delete; + + private: + cmMakefile* Makefile; + }; + /** * Determine if the given context, name pair has already been reported * in context of CMP0054. |