[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1980-g622894b
Stephen Kelly
steveire at gmail.com
Thu Feb 7 07:54:34 EST 2013
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 622894b34fd13b098c7b2a5b7b7c4b3d0b770c31 (commit)
via 4ce8cce38849280be658b968036c8b1a5474af36 (commit)
via 001002a4feba26c90f2495f0afd4e7b544cac1db (commit)
via da4f70e586560e008213fb676deac7d83b4176fe (commit)
via b74934df26178abcd31c587c9f015459571bf55f (commit)
from ac37dfb6628e9c43da6912885c255e3bef216257 (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=622894b34fd13b098c7b2a5b7b7c4b3d0b770c31
commit 622894b34fd13b098c7b2a5b7b7c4b3d0b770c31
Merge: ac37dfb 4ce8cce3
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 7 07:54:26 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 7 07:54:26 2013 -0500
Merge topic 'minor-fixes' into next
4ce8cce Don't keep track of content determined by target property values.
001002a Move a special case for PIC from the genex to the cmTarget code.
da4f70e Only use early evaluation termination for transitive properties.
b74934d Fix determination of evaluating link libraries.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ce8cce38849280be658b968036c8b1a5474af36
commit 4ce8cce38849280be658b968036c8b1a5474af36
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 7 13:04:46 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 7 13:36:31 2013 +0100
Don't keep track of content determined by target property values.
This tracking was added during the development of commit 042ecf04
(Add API to calculate link-interface-dependent bool properties
or error., 2013-01-06), but was never used.
It was not necessary to use the content because what is really
useful in that logic is to determine if a property has been implied
to be null by appearing in a LINK_LIBRARIES genex.
I think the motivating usecase for developing the feature of
keeping track of the targets relevant to a property was that I
thought it would make it possible to allow requiring granular
compatibility of interface properties only for targets which
depended on the interface property. Eg:
add_library(foo ...)
add_library(bar ...)
add_executable(user ...)
# Read the INTERFACE_POSITION_INDEPENDENT_CODE from bar, but not
# from foo:
target_link_libraries(user foo $<$<TARGET_PROPERTY:POSTITION_INDEPENDENT_CODE>:bar>)
This obviously doesn't make sense. We require that INTERFACE
properties are consistent across all linked targets instead.
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 60bf179..5d162fe 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -95,14 +95,13 @@ const char *cmCompiledGeneratorExpression::Evaluate(
for ( ; it != end; ++it)
{
- const std::string result = (*it)->Evaluate(&context, dagChecker);
- this->Output += result;
+ this->Output += (*it)->Evaluate(&context, dagChecker);
for(std::set<cmStdString>::const_iterator
p = context.SeenTargetProperties.begin();
p != context.SeenTargetProperties.end(); ++p)
{
- this->SeenTargetProperties[*p] += result + ";";
+ this->SeenTargetProperties.insert(*p);
}
if (context.HadError)
{
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 4eab2dd..489b052 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -90,7 +90,7 @@ public:
std::set<cmTarget*> const& GetTargets() const
{ return this->Targets; }
- std::map<cmStdString, cmStdString> const& GetSeenTargetProperties() const
+ std::set<cmStdString> const& GetSeenTargetProperties() const
{ return this->SeenTargetProperties; }
~cmCompiledGeneratorExpression();
@@ -124,7 +124,7 @@ private:
bool NeedsParsing;
mutable std::set<cmTarget*> Targets;
- mutable std::map<cmStdString, cmStdString> SeenTargetProperties;
+ mutable std::set<cmStdString> SeenTargetProperties;
mutable std::string Output;
mutable bool HadContextSensitiveCondition;
};
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index f601ea3..d2dbf11 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -398,7 +398,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
// Keep track of the properties seen while processing.
// The evaluation of the LINK_LIBRARIES generator expressions
- // will check this to ensure that properties form a DAG.
+ // will check this to ensure that properties have one consistent
+ // value for all evaluations.
context->SeenTargetProperties.insert(propertyName);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6f197b8..f55999f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2233,7 +2233,15 @@ void cmTarget::GetDirectLinkLibraries(const char *config,
&dagChecker),
libs);
- this->AddLinkDependentTargetsForProperties(cge->GetSeenTargetProperties());
+ std::set<cmStdString> seenProps = cge->GetSeenTargetProperties();
+ for (std::set<cmStdString>::const_iterator it = seenProps.begin();
+ it != seenProps.end(); ++it)
+ {
+ if (!this->GetProperty(it->c_str()))
+ {
+ this->LinkImplicitNullProperties.insert(*it);
+ }
+ }
}
}
@@ -4520,18 +4528,6 @@ const char* cmTarget::GetExportMacro()
}
//----------------------------------------------------------------------------
-void cmTarget::GetLinkDependentTargetsForProperty(const std::string &p,
- std::set<std::string> &targets)
-{
- const std::map<cmStdString, std::set<std::string> >::const_iterator findIt
- = this->LinkDependentProperties.find(p);
- if (findIt != this->LinkDependentProperties.end())
- {
- targets = findIt->second;
- }
-}
-
-//----------------------------------------------------------------------------
bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
{
return this->LinkImplicitNullProperties.find(p)
@@ -4539,24 +4535,6 @@ bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
}
//----------------------------------------------------------------------------
-void cmTarget::AddLinkDependentTargetsForProperties(
- const std::map<cmStdString, cmStdString> &map)
-{
- for (std::map<cmStdString, cmStdString>::const_iterator it = map.begin();
- it != map.end(); ++it)
- {
- std::vector<std::string> targets;
- cmSystemTools::ExpandListArgument(it->second.c_str(), targets);
- this->LinkDependentProperties[it->first].insert(targets.begin(),
- targets.end());
- if (!this->GetProperty(it->first.c_str()))
- {
- this->LinkImplicitNullProperties.insert(it->first);
- }
- }
-}
-
-//----------------------------------------------------------------------------
template<typename PropertyType>
PropertyType getTypedProperty(cmTarget *tgt, const char *prop,
PropertyType *);
@@ -4611,9 +4589,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
const bool explicitlySet = tgt->GetProperties()
.find(p.c_str())
!= tgt->GetProperties().end();
- std::set<std::string> dependentTargets;
- tgt->GetLinkDependentTargetsForProperty(p,
- dependentTargets);
const bool impliedByUse =
tgt->IsNullImpliedByLinkLibraries(p);
assert((impliedByUse ^ explicitlySet)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 7577a59..fb1496f 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -498,17 +498,12 @@ public:
void AppendBuildInterfaceIncludes();
- void GetLinkDependentTargetsForProperty(const std::string &p,
- std::set<std::string> &targets);
bool IsNullImpliedByLinkLibraries(const std::string &p);
bool IsLinkInterfaceDependentBoolProperty(const std::string &p,
const char *config);
bool IsLinkInterfaceDependentStringProperty(const std::string &p,
const char *config);
- void AddLinkDependentTargetsForProperties(
- const std::map<cmStdString, cmStdString> &map);
-
bool GetLinkInterfaceDependentBoolProperty(const std::string &p,
const char *config);
@@ -627,8 +622,6 @@ private:
bool IsApple;
bool IsImportedTarget;
bool DebugIncludesDone;
- mutable std::map<cmStdString, std::set<std::string> >
- LinkDependentProperties;
mutable std::set<std::string> LinkImplicitNullProperties;
bool BuildInterfaceIncludesAppended;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=001002a4feba26c90f2495f0afd4e7b544cac1db
commit 001002a4feba26c90f2495f0afd4e7b544cac1db
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 7 13:13:44 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 7 13:19:22 2013 +0100
Move a special case for PIC from the genex to the cmTarget code.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 0ac1e76..f601ea3 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -460,12 +460,6 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
return std::string();
}
- if (propertyName == "POSITION_INDEPENDENT_CODE")
- {
- context->HadContextSensitiveCondition = true;
- return target->GetLinkInterfaceDependentBoolProperty(
- "POSITION_INDEPENDENT_CODE", context->Config) ? "1" : "0";
- }
if (target->IsLinkInterfaceDependentBoolProperty(propertyName,
context->Config))
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b92bf77..6f197b8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4797,7 +4797,8 @@ bool isLinkDependentProperty(cmTarget *tgt, const std::string &p,
bool cmTarget::IsLinkInterfaceDependentBoolProperty(const std::string &p,
const char *config)
{
- return isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_BOOL",
+ return (p == "POSITION_INDEPENDENT_CODE") ||
+ isLinkDependentProperty(this, p, "COMPATIBLE_INTERFACE_BOOL",
config);
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da4f70e586560e008213fb676deac7d83b4176fe
commit da4f70e586560e008213fb676deac7d83b4176fe
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 7 12:33:20 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 7 12:49:29 2013 +0100
Only use early evaluation termination for transitive properties.
We need to make sure expressions which evaluate TARGET_PROPERTY:TYPE
multiple times for example get the correct result each time, and
not an empty string instead.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 4779b11..0ac1e76 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -434,8 +434,17 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
// No error. We just skip cyclic references.
return std::string();
case cmGeneratorExpressionDAGChecker::ALREADY_SEEN:
- // No error. We're not going to find anything new here.
- return std::string();
+ for (size_t i = 0;
+ i < (sizeof(targetPropertyTransitiveWhitelist) /
+ sizeof(*targetPropertyTransitiveWhitelist));
+ ++i)
+ {
+ if (targetPropertyTransitiveWhitelist[i] == propertyName)
+ {
+ // No error. We're not going to find anything new here.
+ return std::string();
+ }
+ }
case cmGeneratorExpressionDAGChecker::DAG:
break;
}
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index cd0fe11..19ee59f 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -103,4 +103,7 @@ target_compile_definitions(depG INTERFACE
)
add_executable(targetC targetC.cpp)
-target_link_libraries(targetC depG)
+# Creates a generator expression for include directories like
+# $<$<TARGET_DEFINED:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>>:\
+# $<TARGET_PROPERTY:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>,INTERFACE_INCLUDE_DIRECTORIES>>
+target_link_libraries(targetC $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b74934df26178abcd31c587c9f015459571bf55f
commit b74934df26178abcd31c587c9f015459571bf55f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Feb 7 12:31:18 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Feb 7 12:32:17 2013 +0100
Fix determination of evaluating link libraries.
Added in commit 6fbe3ce4 (Exclude the LINK_LIBRARIES related properties
from INTERFACE evaluation., 2013-01-23)
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index b9069ef..0ac1a48 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -148,8 +148,8 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries()
return (strcmp(prop, "LINK_LIBRARIES") == 0
|| strcmp(prop, "LINK_INTERFACE_LIBRARIES") == 0
|| strcmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
- || strncmp(prop, "LINK_INTERFACE_LIBRARIES_", 26) == 0
- || strncmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_", 35) == 0);
+ || strncmp(prop, "LINK_INTERFACE_LIBRARIES_", 25) == 0
+ || strncmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_", 34) == 0);
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpression.cxx | 5 +-
Source/cmGeneratorExpression.h | 4 +-
Source/cmGeneratorExpressionDAGChecker.cxx | 4 +-
Source/cmGeneratorExpressionEvaluator.cxx | 22 ++++++----
Source/cmTarget.cxx | 46 +++++---------------
Source/cmTarget.h | 7 ---
.../target_link_libraries/CMakeLists.txt | 5 ++-
7 files changed, 34 insertions(+), 59 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list