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.cxx | |
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.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 208d907..b228e2b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4543,6 +4543,19 @@ bool cmMakefile::SetPolicyVersion(std::string const& version_min, cmPolicies::WarnCompat::On); } +cmMakefile::VariablePushPop::VariablePushPop(cmMakefile* m) + : Makefile(m) +{ + this->Makefile->StateSnapshot = + this->Makefile->GetState()->CreateVariableScopeSnapshot( + this->Makefile->StateSnapshot); +} + +cmMakefile::VariablePushPop::~VariablePushPop() +{ + this->Makefile->PopSnapshot(); +} + bool cmMakefile::HasCMP0054AlreadyBeenReported( cmListFileContext const& context) const { |