[Cmake-commits] CMake branch, next, updated. v3.3.0-1323-g08bce45
Stephen Kelly
steveire at gmail.com
Sat Jul 25 08:48:53 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 08bce458d60eece4a22c3e1a56a881fc3b3357b2 (commit)
via 8329fc016fd0b6e82b9bc1da9e857206d11b9bbe (commit)
via 5447ca1a94309fa394be3a8233090b33e81e4c9f (commit)
via d0dcce15f4cc4e7c100556fbd016c59f64d0d238 (commit)
via 658bfc5c525bd21ecd68847cd19bda7102245c35 (commit)
via f4a25874a2cb5468e7ecce6812e5833e10943017 (commit)
via 3c45471c2d4a0c08b88f10161d4b166a27165e31 (commit)
via 71e69fc93b9f1a0829d04b9e44107c92458efe20 (commit)
via 84e18056668491d5a7e0068c9287455151a18197 (commit)
from 78e796da460fb5d52e9ae1c827b3752cfc04ae04 (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=08bce458d60eece4a22c3e1a56a881fc3b3357b2
commit 08bce458d60eece4a22c3e1a56a881fc3b3357b2
Merge: 78e796d 8329fc0
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jul 25 08:48:51 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jul 25 08:48:51 2015 -0400
Merge topic 'policy-refactor' into next
8329fc01 cmPolicies: Replace unused include.
5447ca1a cmMakefile: Remove CMP0001 handling to callers.
d0dcce15 cmMakefile: Simplify computation of ancient policy status.
658bfc5c cmMakefile: Remove redundant condition from policy status computation.
f4a25874 cmMakefile: Inline internal policy status method.
3c45471c cmPolicies: Enable RVO for internal method.
71e69fc9 cmPolicies: Store only state that users can set.
84e18056 cmMakefile: Convert recursion to loop.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8329fc016fd0b6e82b9bc1da9e857206d11b9bbe
commit 8329fc016fd0b6e82b9bc1da9e857206d11b9bbe
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jul 25 14:45:45 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:37 2015 +0200
cmPolicies: Replace unused include.
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index a5aba58..b783701 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -12,7 +12,7 @@
#ifndef cmPolicies_h
#define cmPolicies_h
-#include "cmCustomCommand.h"
+#include "cmStandardIncludes.h"
#include <bitset>
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5447ca1a94309fa394be3a8233090b33e81e4c9f
commit 5447ca1a94309fa394be3a8233090b33e81e4c9f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 6 02:10:25 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:37 2015 +0200
cmMakefile: Remove CMP0001 handling to callers.
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx
index 3c878bf..3ef6d35 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -93,6 +93,22 @@ bool cmCMakePolicyCommand::HandleSetMode(std::vector<std::string> const& args)
this->SetError("SET failed to set policy.");
return false;
}
+ if(args[1] == "CMP0001" &&
+ (status == cmPolicies::WARN || status == cmPolicies::OLD))
+ {
+ if(!(this->Makefile->GetState()
+ ->GetInitializedCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")))
+ {
+ // Set it to 2.4 because that is the last version where the
+ // variable had meaning.
+ this->Makefile->AddCacheDefinition
+ ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
+ "For backwards compatibility, what version of CMake "
+ "commands and "
+ "syntax should this version of CMake try to support.",
+ cmState::STRING);
+ }
+ }
return true;
}
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d6854e7..c5ce2e9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4822,25 +4822,6 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
previous_was_weak = psi->Weak;
}
- // Special hook for presenting compatibility variable as soon as
- // the user requests it.
- if(id == cmPolicies::CMP0001 &&
- (status == cmPolicies::WARN || status == cmPolicies::OLD))
- {
- if(!(this->GetState()
- ->GetInitializedCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")))
- {
- // Set it to 2.4 because that is the last version where the
- // variable had meaning.
- this->AddCacheDefinition
- ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
- "For backwards compatibility, what version of CMake "
- "commands and "
- "syntax should this version of CMake try to support.",
- cmState::STRING);
- }
- }
-
return true;
}
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 2a5ae1c..3eb19bb 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -255,6 +255,22 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
{
return false;
}
+ if(pid == cmPolicies::CMP0001 &&
+ (status == cmPolicies::WARN || status == cmPolicies::OLD))
+ {
+ if(!(mf->GetState()
+ ->GetInitializedCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")))
+ {
+ // Set it to 2.4 because that is the last version where the
+ // variable had meaning.
+ mf->AddCacheDefinition
+ ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4",
+ "For backwards compatibility, what version of CMake "
+ "commands and "
+ "syntax should this version of CMake try to support.",
+ cmState::STRING);
+ }
+ }
}
}
else
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d0dcce15f4cc4e7c100556fbd016c59f64d0d238
commit d0dcce15f4cc4e7c100556fbd016c59f64d0d238
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 6 02:04:12 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:37 2015 +0200
cmMakefile: Simplify computation of ancient policy status.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ab8499f..d6854e7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4743,6 +4743,13 @@ cmPolicies::PolicyStatus
cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
{
cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id);
+
+ if(status == cmPolicies::REQUIRED_ALWAYS ||
+ status == cmPolicies::REQUIRED_IF_USED)
+ {
+ return status;
+ }
+
cmLocalGenerator* lg = this->LocalGenerator;
while(lg)
{
@@ -4758,20 +4765,6 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
}
lg = lg->GetParent();
}
-
- // If the policy is required to be set to NEW but is not, ignore the
- // current setting and tell the caller.
- if(status != cmPolicies::NEW)
- {
- cmPolicies::PolicyStatus def = cmPolicies::GetPolicyStatus(id);
- if(def == cmPolicies::REQUIRED_ALWAYS ||
- def == cmPolicies::REQUIRED_IF_USED)
- {
- return def;
- }
- }
-
- // The current setting is okay.
return status;
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=658bfc5c525bd21ecd68847cd19bda7102245c35
commit 658bfc5c525bd21ecd68847cd19bda7102245c35
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 6 02:02:02 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:36 2015 +0200
cmMakefile: Remove redundant condition from policy status computation.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7a35a26..ab8499f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4763,11 +4763,6 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
// current setting and tell the caller.
if(status != cmPolicies::NEW)
{
- if(status == cmPolicies::REQUIRED_ALWAYS ||
- status == cmPolicies::REQUIRED_IF_USED)
- {
- return status;
- }
cmPolicies::PolicyStatus def = cmPolicies::GetPolicyStatus(id);
if(def == cmPolicies::REQUIRED_ALWAYS ||
def == cmPolicies::REQUIRED_IF_USED)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4a25874a2cb5468e7ecce6812e5833e10943017
commit f4a25874a2cb5468e7ecce6812e5833e10943017
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 6 02:00:32 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:36 2015 +0200
cmMakefile: Inline internal policy status method.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index cae7bbc..7a35a26 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4742,34 +4742,6 @@ const char* cmMakefile::GetDefineFlagsCMP0059() const
cmPolicies::PolicyStatus
cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
{
- // Get the current setting of the policy.
- cmPolicies::PolicyStatus cur = this->GetPolicyStatusInternal(id);
-
- // If the policy is required to be set to NEW but is not, ignore the
- // current setting and tell the caller.
- if(cur != cmPolicies::NEW)
- {
- if(cur == cmPolicies::REQUIRED_ALWAYS ||
- cur == cmPolicies::REQUIRED_IF_USED)
- {
- return cur;
- }
- cmPolicies::PolicyStatus def = cmPolicies::GetPolicyStatus(id);
- if(def == cmPolicies::REQUIRED_ALWAYS ||
- def == cmPolicies::REQUIRED_IF_USED)
- {
- return def;
- }
- }
-
- // The current setting is okay.
- return cur;
-}
-
-//----------------------------------------------------------------------------
-cmPolicies::PolicyStatus
-cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
-{
cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id);
cmLocalGenerator* lg = this->LocalGenerator;
while(lg)
@@ -4787,7 +4759,24 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
lg = lg->GetParent();
}
- // The policy is not set. Use the default for this CMake version.
+ // If the policy is required to be set to NEW but is not, ignore the
+ // current setting and tell the caller.
+ if(status != cmPolicies::NEW)
+ {
+ if(status == cmPolicies::REQUIRED_ALWAYS ||
+ status == cmPolicies::REQUIRED_IF_USED)
+ {
+ return status;
+ }
+ cmPolicies::PolicyStatus def = cmPolicies::GetPolicyStatus(id);
+ if(def == cmPolicies::REQUIRED_ALWAYS ||
+ def == cmPolicies::REQUIRED_IF_USED)
+ {
+ return def;
+ }
+ }
+
+ // The current setting is okay.
return status;
}
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 2fc4d78..6dbea89 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -938,8 +938,6 @@ private:
typedef std::vector<PolicyStackEntry> PolicyStackType;
PolicyStackType PolicyStack;
std::vector<PolicyStackType::size_type> PolicyBarriers;
- cmPolicies::PolicyStatus
- GetPolicyStatusInternal(cmPolicies::PolicyID id) const;
// CMP0053 == old
cmake::MessageType ExpandVariablesInStringOld(
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c45471c2d4a0c08b88f10161d4b166a27165e31
commit 3c45471c2d4a0c08b88f10161d4b166a27165e31
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jul 6 01:55:29 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:36 2015 +0200
cmPolicies: Enable RVO for internal method.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 36b42bd..cae7bbc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4770,6 +4770,7 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
cmPolicies::PolicyStatus
cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
{
+ cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id);
cmLocalGenerator* lg = this->LocalGenerator;
while(lg)
{
@@ -4779,14 +4780,15 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
{
if(psi->IsDefined(id))
{
- return psi->Get(id);
+ status = psi->Get(id);
+ return status;
}
}
lg = lg->GetParent();
}
// The policy is not set. Use the default for this CMake version.
- return cmPolicies::GetPolicyStatus(id);
+ return status;
}
//----------------------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71e69fc93b9f1a0829d04b9e44107c92458efe20
commit 71e69fc93b9f1a0829d04b9e44107c92458efe20
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 22 03:18:55 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:36 2015 +0200
cmPolicies: Store only state that users can set.
cmPolicies::PolicyMap does not need to store the REQUIRED_ALWAYS or
REQUIRED_IF_USED states as they are statically determined.
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 5026893..2a5ae1c 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -356,14 +356,6 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
{
status = cmPolicies::NEW;
}
- else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS])
- {
- status = cmPolicies::REQUIRED_ALWAYS;
- }
- else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED])
- {
- status = cmPolicies::REQUIRED_IF_USED;
- }
return status;
}
@@ -373,19 +365,13 @@ void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);
- this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS] =
- (status == REQUIRED_ALWAYS);
- this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED] =
- (status == REQUIRED_IF_USED);
}
bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const
{
return this->Status[(POLICY_STATUS_COUNT * id) + OLD]
|| this->Status[(POLICY_STATUS_COUNT * id) + WARN]
- || this->Status[(POLICY_STATUS_COUNT * id) + NEW]
- || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS]
- || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED];
+ || this->Status[(POLICY_STATUS_COUNT * id) + NEW];
}
bool cmPolicies::PolicyMap::IsEmpty() const
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 8a3c27d..a5aba58 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -244,7 +244,6 @@ public:
REQUIRED_IF_USED,
REQUIRED_ALWAYS ///< Issue an error unless user sets policy status to NEW.
};
-#define POLICY_STATUS_COUNT 5
/// Policy identifiers
enum PolicyID
@@ -288,6 +287,7 @@ public:
bool IsEmpty() const;
private:
+#define POLICY_STATUS_COUNT 3
std::bitset<cmPolicies::CMPCOUNT * POLICY_STATUS_COUNT> Status;
};
};
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84e18056668491d5a7e0068c9287455151a18197
commit 84e18056668491d5a7e0068c9287455151a18197
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jun 4 23:38:51 2015 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 25 14:48:36 2015 +0200
cmMakefile: Convert recursion to loop.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ae69b24..36b42bd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4770,21 +4770,19 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
cmPolicies::PolicyStatus
cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
{
- // Is the policy set in our stack?
- for(PolicyStackType::const_reverse_iterator psi = this->PolicyStack.rbegin();
- psi != this->PolicyStack.rend(); ++psi)
+ cmLocalGenerator* lg = this->LocalGenerator;
+ while(lg)
{
- if(psi->IsDefined(id))
+ cmMakefile const* mf = lg->GetMakefile();
+ for(PolicyStackType::const_reverse_iterator psi =
+ mf->PolicyStack.rbegin(); psi != mf->PolicyStack.rend(); ++psi)
{
- return psi->Get(id);
+ if(psi->IsDefined(id))
+ {
+ return psi->Get(id);
+ }
}
- }
-
- // If we have a parent directory, recurse up to it.
- if(this->LocalGenerator->GetParent())
- {
- cmMakefile* parent = this->LocalGenerator->GetParent()->GetMakefile();
- return parent->GetPolicyStatusInternal(id);
+ lg = lg->GetParent();
}
// The policy is not set. Use the default for this CMake version.
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list