[Cmake-commits] CMake branch, next, updated. v2.8.11-2338-g74692d9
Stephen Kelly
steveire at gmail.com
Thu May 30 09:53:46 EDT 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 74692d9161fea652f8b1e0dea03c8f0757183906 (commit)
via 3aa9ce441f010362e404e6f9126ecd3028de76b9 (commit)
via 0b39fefeac550c8277ebde308fcb9198e43e46a7 (commit)
via 53164ac997f6ce2a4fd1245956a815bfdb893c27 (commit)
from 7cb69cc65d95247c928a524c9a485eb1be14fca5 (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=74692d9161fea652f8b1e0dea03c8f0757183906
commit 74692d9161fea652f8b1e0dea03c8f0757183906
Merge: 7cb69cc 3aa9ce4
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 30 09:53:42 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 30 09:53:42 2013 -0400
Merge topic 'fix-INCLUDE_DIRECTORIES-genex-read' into next
3aa9ce4 GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
0b39fef GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
53164ac cmTarget: Remove some hardcoding of transitive property names.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3aa9ce441f010362e404e6f9126ecd3028de76b9
commit 3aa9ce441f010362e404e6f9126ecd3028de76b9
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 30 15:30:24 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 30 15:43:42 2013 +0200
GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
This property should come from the content of the property itself,
plus the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*.
In contrast, when the INTERFACE_INCLUDE_DIRECTORIES is evaluated for
a target, the INTERFACE_INCLUDE_DIRECTORIES of the link *interface*
is used.
Similar logic applies for the COMPILE_DEFINITIONS target properties.
If the propertyName is already an INTERFACE_ variant of the property,
ie, the expression is similar to
$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>
then the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* of foo
is used.
However, if the propertyName is not an INTERFACE_ variant, and the
interfacePropertyName is, ie, the expression is similar to:
$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>
then the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*
of foo is used.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index ba74e60..de6371a 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -543,7 +543,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
+ (sizeof(targetPropertyTransitiveWhitelist) /
sizeof(*targetPropertyTransitiveWhitelist));
if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
+ TransitiveWhitelistCompare(propertyName)) != transEnd)
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
@@ -556,6 +556,20 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName);
}
}
+ else if (std::find_if(transBegin, transEnd,
+ TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
+ {
+ const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
+ context->Config,
+ context->HeadTarget);
+ if(impl)
+ {
+ linkedTargetsContent =
+ getLinkedTargetsContent(impl->Libraries, target,
+ context, &dagChecker,
+ interfacePropertyName);
+ }
+ }
linkedTargetsContent =
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b39fefeac550c8277ebde308fcb9198e43e46a7
commit 0b39fefeac550c8277ebde308fcb9198e43e46a7
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 29 00:34:30 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 30 15:43:42 2013 +0200
GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
This will be used to process transitive components of properties
which depend on linked targets. Currently only the link interface
of the target can be used as the source of the linked targets, but
in the next commit it will be possible to use the link implementation
as the source of link targets.
This commit does not change the semantics of the code.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 60c969e..ba74e60 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -313,6 +313,48 @@ static const char* targetPropertyTransitiveWhitelist[] = {
, "INTERFACE_COMPILE_DEFINITIONS"
};
+std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
+ cmTarget *target,
+ cmGeneratorExpressionContext *context,
+ cmGeneratorExpressionDAGChecker *dagChecker,
+ const std::string &interfacePropertyName)
+{
+ cmGeneratorExpression ge(context->Backtrace);
+
+ std::string sep;
+ std::string depString;
+ for (std::vector<std::string>::const_iterator
+ it = libraries.begin();
+ it != libraries.end(); ++it)
+ {
+ if (*it == target->GetName())
+ {
+ // Broken code can have a target in its own link interface.
+ // Don't follow such link interface entries so as not to create a
+ // self-referencing loop.
+ continue;
+ }
+ if (context->Makefile->FindTargetToUse(it->c_str()))
+ {
+ depString +=
+ sep + "$<TARGET_PROPERTY:" + *it + "," + interfacePropertyName + ">";
+ sep = ";";
+ }
+ }
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(depString);
+ std::string linkedTargetsContent = cge->Evaluate(context->Makefile,
+ context->Config,
+ context->Quiet,
+ context->HeadTarget,
+ target,
+ dagChecker);
+ if (cge->GetHadContextSensitiveCondition())
+ {
+ context->HadContextSensitiveCondition = true;
+ }
+ return linkedTargetsContent;
+}
+
//----------------------------------------------------------------------------
struct TransitiveWhitelistCompare
{
@@ -508,41 +550,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
context->HeadTarget);
if(iface)
{
- cmGeneratorExpression ge(context->Backtrace);
-
- std::string sep;
- std::string depString;
- for (std::vector<std::string>::const_iterator
- it = iface->Libraries.begin();
- it != iface->Libraries.end(); ++it)
- {
- if (*it == target->GetName())
- {
- // Broken code can have a target in its own link interface.
- // Don't follow such link interface entries so as not to create a
- // self-referencing loop.
- continue;
- }
- if (context->Makefile->FindTargetToUse(it->c_str()))
- {
- depString +=
- sep + "$<TARGET_PROPERTY:" + *it + ","
- + interfacePropertyName + ">";
- sep = ";";
- }
- }
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
- ge.Parse(depString);
- linkedTargetsContent = cge->Evaluate(context->Makefile,
- context->Config,
- context->Quiet,
- context->HeadTarget,
- target,
- &dagChecker);
- if (cge->GetHadContextSensitiveCondition())
- {
- context->HadContextSensitiveCondition = true;
- }
+ linkedTargetsContent =
+ getLinkedTargetsContent(iface->Libraries, target,
+ context, &dagChecker,
+ interfacePropertyName);
}
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53164ac997f6ce2a4fd1245956a815bfdb893c27
commit 53164ac997f6ce2a4fd1245956a815bfdb893c27
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 16 15:52:14 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 30 15:43:37 2013 +0200
cmTarget: Remove some hardcoding of transitive property names.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 6618e83..60c969e 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -314,6 +314,17 @@ static const char* targetPropertyTransitiveWhitelist[] = {
};
//----------------------------------------------------------------------------
+struct TransitiveWhitelistCompare
+{
+ explicit TransitiveWhitelistCompare(const std::string &needle)
+ : Needle(needle) {}
+ bool operator() (const char *item)
+ { return strcmp(item, this->Needle.c_str()) == 0; }
+private:
+ std::string Needle;
+};
+
+//----------------------------------------------------------------------------
static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
TargetPropertyNode() {}
@@ -485,8 +496,12 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName = "INTERFACE_COMPILE_DEFINITIONS";
}
- if (interfacePropertyName == "INTERFACE_INCLUDE_DIRECTORIES"
- || interfacePropertyName == "INTERFACE_COMPILE_DEFINITIONS")
+ const char **transBegin = targetPropertyTransitiveWhitelist;
+ const char **transEnd = targetPropertyTransitiveWhitelist
+ + (sizeof(targetPropertyTransitiveWhitelist) /
+ sizeof(*targetPropertyTransitiveWhitelist));
+ if (std::find_if(transBegin, transEnd,
+ TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpressionEvaluator.cxx | 114 +++++++++++++++++++---------
1 files changed, 77 insertions(+), 37 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list