[Cmake-commits] CMake branch, next, updated. v3.2.2-2453-gf1c2f3d

Stephen Kelly steveire at gmail.com
Sun May 3 14:35:36 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f1c2f3da46a095710fe02c6dbd27329a10920cd4 (commit)
       via  c0b9a24927d0b18f0e741b7b64f18b9c7c568c1c (commit)
      from  d571efa8c321120f030e5f957bf784443feb75ec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f1c2f3da46a095710fe02c6dbd27329a10920cd4
commit f1c2f3da46a095710fe02c6dbd27329a10920cd4
Merge: d571efa c0b9a24
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 3 14:35:35 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun May 3 14:35:35 2015 -0400

    Merge topic 'refactor-cmPolicies' into next
    
    c0b9a249 fixup! cmPolicies: Implement PolicyMap in terms of bitset.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0b9a24927d0b18f0e741b7b64f18b9c7c568c1c
commit c0b9a24927d0b18f0e741b7b64f18b9c7c568c1c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 3 20:35:04 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun May 3 20:35:04 2015 +0200

    fixup! cmPolicies: Implement PolicyMap in terms of bitset.

diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 73f6e0e..31ab4dc 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -328,6 +328,11 @@ cmPolicies::GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id)
   return e.str();
 }
 
+cmPolicies::PolicyMap::PolicyMap()
+{
+  this->UNDEFINED.set();
+}
+
 cmPolicies::PolicyStatus
 cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 {
@@ -355,6 +360,7 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
 void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
                                 cmPolicies::PolicyStatus status)
 {
+  this->UNDEFINED.reset(id);
   this->OLD[id] = (status == cmPolicies::OLD);
   this->NEW[id] = (status == cmPolicies::NEW);
   this->REQUIRED_ALWAYS[id] = (status == cmPolicies::REQUIRED_ALWAYS);
@@ -363,10 +369,10 @@ void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
 
 bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const
 {
-  return this->OLD[id] || this->NEW[id];
+  return !this->UNDEFINED[id];
 }
 
 bool cmPolicies::PolicyMap::IsEmpty() const
 {
-  return this->OLD.none() && this->NEW.none();
+  return !this->UNDEFINED.none();
 }
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 6bc92fb..63376dd 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -272,12 +272,14 @@ public:
   /** Represent a set of policy values.  */
   struct PolicyMap
   {
+    PolicyMap();
     PolicyStatus Get(PolicyID id) const;
     void Set(PolicyID id, PolicyStatus status);
     bool IsDefined(PolicyID id) const;
     bool IsEmpty() const;
 
   private:
+    std::bitset<cmPolicies::CMPCOUNT> UNDEFINED;
     std::bitset<cmPolicies::CMPCOUNT> OLD;
     std::bitset<cmPolicies::CMPCOUNT> NEW;
     std::bitset<cmPolicies::CMPCOUNT> REQUIRED_IF_USED;

-----------------------------------------------------------------------

Summary of changes:
 Source/cmPolicies.cxx |   10 ++++++++--
 Source/cmPolicies.h   |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list