[Cmake-commits] [cmake-commits] king committed cmMakefile.cxx 1.496 1.497 cmMakefile.h 1.246 1.247 cmPolicies.h 1.19 1.20
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jan 22 10:56:41 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22502/Source
Modified Files:
cmMakefile.cxx cmMakefile.h cmPolicies.h
Log Message:
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.
Index: cmPolicies.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** cmPolicies.h 24 Sep 2008 12:51:19 -0000 1.19
--- cmPolicies.h 22 Jan 2009 15:56:39 -0000 1.20
***************
*** 90,93 ****
--- 90,97 ----
void GetDocumentation(std::vector<cmDocumentationEntry>& v);
+ /** Represent a set of policy values. */
+ typedef std::map<cmPolicies::PolicyID,
+ cmPolicies::PolicyStatus> PolicyMap;
+
private:
// might have to make these internal for VS6 not sure yet
Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.246
retrieving revision 1.247
diff -C 2 -d -r1.246 -r1.247
*** cmMakefile.h 21 Jan 2009 14:49:00 -0000 1.246
--- cmMakefile.h 22 Jan 2009 15:56:39 -0000 1.247
***************
*** 932,938 ****
// stack of policy settings
! typedef std::map<cmPolicies::PolicyID,
! cmPolicies::PolicyStatus> PolicyMap;
! std::vector<PolicyMap> PolicyStack;
cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id);
--- 932,944 ----
// stack of policy settings
! 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);
Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.496
retrieving revision 1.497
diff -C 2 -d -r1.496 -r1.497
*** cmMakefile.cxx 21 Jan 2009 14:49:00 -0000 1.496
--- cmMakefile.cxx 22 Jan 2009 15:56:39 -0000 1.497
***************
*** 3600,3608 ****
{
// Is the policy set in our stack?
! for(std::vector<PolicyMap>::reverse_iterator
! psi = this->PolicyStack.rbegin();
psi != this->PolicyStack.rend(); ++psi)
{
! PolicyMap::const_iterator pse = psi->find(id);
if(pse != psi->end())
{
--- 3600,3607 ----
{
// Is the policy set in our stack?
! for(PolicyStackType::reverse_iterator psi = this->PolicyStack.rbegin();
psi != this->PolicyStack.rend(); ++psi)
{
! PolicyStackEntry::const_iterator pse = psi->find(id);
if(pse != psi->end())
{
***************
*** 3679,3683 ****
{
// Allocate a new stack entry.
! this->PolicyStack.push_back(PolicyMap());
return true;
}
--- 3678,3682 ----
{
// Allocate a new stack entry.
! this->PolicyStack.push_back(PolicyStackEntry());
return true;
}
More information about the Cmake-commits
mailing list