diff options
author | Brad King <brad.king@kitware.com> | 2009-01-22 15:56:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-22 15:56:39 (GMT) |
commit | 8997f4760a83efb270f3f9234a016451c0884fe2 (patch) | |
tree | 15d37251813671eed25ce679227c574458eb139f /Source/cmMakefile.h | |
parent | e8a0e90133da84e552efc1852f9f1e589b250ed3 (diff) | |
download | CMake-8997f4760a83efb270f3f9234a016451c0884fe2.zip CMake-8997f4760a83efb270f3f9234a016451c0884fe2.tar.gz CMake-8997f4760a83efb270f3f9234a016451c0884fe2.tar.bz2 |
ENH: Refactor policy stack representation
This defines PolicyMap as a public member of cmPolicies. Its previous
role as a policy stack entry is now called PolicyStackEntry and
represented as a class to which more information can be added later.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c6061d7..4daec16 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -931,9 +931,15 @@ private: std::map<cmStdString, cmTarget*> ImportedTargets; // stack of policy settings - typedef std::map<cmPolicies::PolicyID, - cmPolicies::PolicyStatus> PolicyMap; - std::vector<PolicyMap> PolicyStack; + struct PolicyStackEntry: public cmPolicies::PolicyMap + { + typedef cmPolicies::PolicyMap derived; + PolicyStackEntry(): derived() {} + PolicyStackEntry(derived const& d): derived(d) {} + PolicyStackEntry(PolicyStackEntry const& r): derived(r) {} + }; + typedef std::vector<PolicyStackEntry> PolicyStackType; + PolicyStackType PolicyStack; cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id); bool CheckCMP0000; |