[Cmake-commits] CMake branch, next, updated. v2.8.11-2290-g385560c
Stephen Kelly
steveire at gmail.com
Tue May 28 19:08:59 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 385560cf4a62642dd87dbe96e3d145136d81c791 (commit)
via 886facc343aaabb054d4471dd2c496be5842ff20 (commit)
from 14bc56ac6962a4cf8768b8a91d7634628ba7e9ff (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=385560cf4a62642dd87dbe96e3d145136d81c791
commit 385560cf4a62642dd87dbe96e3d145136d81c791
Merge: 14bc56a 886facc
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 28 19:08:43 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 28 19:08:43 2013 -0400
Merge topic 'fix-INCLUDE_DIRECTORIES-genex-read' into next
886facc GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
diff --cc Source/cmGeneratorExpressionEvaluator.cxx
index 8e08b9a,e3fdf71..445f599
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@@ -495,9 -397,50 +495,51 @@@ static const struct JoinNode : public c
static const char* targetPropertyTransitiveWhitelist[] = {
"INTERFACE_INCLUDE_DIRECTORIES"
, "INTERFACE_COMPILE_DEFINITIONS"
+ , "INTERFACE_COMPILE_OPTIONS"
};
+ 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
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=886facc343aaabb054d4471dd2c496be5842ff20
commit 886facc343aaabb054d4471dd2c496be5842ff20
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 29 00:34:30 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed May 29 01:05:28 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.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 3a8aaae..e3fdf71 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -399,6 +399,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
{
@@ -595,41 +637,24 @@ 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);
+ }
+ }
+ else if (std::find_if(transBegin, transEnd,
+ TransitiveWhitelistCompare(propertyName)) != transEnd)
+ {
+ const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
+ context->Config,
+ context->HeadTarget);
+ if(impl)
+ {
+ linkedTargetsContent =
+ getLinkedTargetsContent(impl->Libraries, target,
+ context, &dagChecker,
+ interfacePropertyName);
}
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpressionEvaluator.cxx | 95 ++++++++++++++++++-----------
1 files changed, 60 insertions(+), 35 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list