diff options
author | Brad King <brad.king@kitware.com> | 2009-01-22 15:57:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-22 15:57:09 (GMT) |
commit | ac14b5d2eb995f0cb1cfc1acca9d06ec02cff7d7 (patch) | |
tree | 05f4a49752a526c4ff97c7b28e2ba30dbf37abd0 /Source/cmMakefile.h | |
parent | c980021814f9717b3d9381029a323c5154a1a503 (diff) | |
download | CMake-ac14b5d2eb995f0cb1cfc1acca9d06ec02cff7d7.zip CMake-ac14b5d2eb995f0cb1cfc1acca9d06ec02cff7d7.tar.gz CMake-ac14b5d2eb995f0cb1cfc1acca9d06ec02cff7d7.tar.bz2 |
ENH: Make policy push/pop methods private
This makes cmMakefile::PushPolicy and cmMakefile::PopPolicy private so
that any outside place that uses them needs to use the PolicyPushPop
helper in an automatic variable. We grant an exception to
cmCMakePolicyCommand so it can implement cmake_policy(PUSH) and
cmake_policy(POP).
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index fb1e1e1..48dc768 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -44,6 +44,7 @@ class cmTest; class cmVariableWatch; class cmake; class cmMakefileCall; +class cmCMakePolicyCommand; /** \class cmMakefile * \brief Process the input CMakeLists.txt file. @@ -341,8 +342,6 @@ public: bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); bool SetPolicy(const char *id, cmPolicies::PolicyStatus status); cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id); - bool PushPolicy(); - bool PopPolicy(bool reportError = true); bool SetPolicyVersion(const char *version); //@} @@ -941,7 +940,12 @@ private: cmTarget* FindBasicTarget(const char* name); std::vector<cmTarget*> ImportedTargetsOwned; std::map<cmStdString, cmTarget*> ImportedTargets; - + + // Internal policy stack management. + bool PushPolicy(); + bool PopPolicy(bool reportError = true); + friend class cmCMakePolicyCommand; + // stack of policy settings struct PolicyStackEntry: public cmPolicies::PolicyMap { |