summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-05 13:54:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-05 13:54:20 (GMT)
commitd3c8688ecdcdcea89373af2d6a30c4ba66315465 (patch)
tree827f12a133ab4d91edd09103a86e83e9505d59e1 /Source/cmGeneratorExpressionEvaluator.cxx
parentaa025cc60a56da31dfe8461faec0dc3aa517cc10 (diff)
parent5b222354de7060af409d0d80aa06180ed1b3ac64 (diff)
downloadCMake-d3c8688ecdcdcea89373af2d6a30c4ba66315465.zip
CMake-d3c8688ecdcdcea89373af2d6a30c4ba66315465.tar.gz
CMake-d3c8688ecdcdcea89373af2d6a30c4ba66315465.tar.bz2
Merge topic 'fix-genex-HEAD-target'
5b22235 Genex: Fix the HEAD target used for evaluated expressions
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 5e7d00d..28f749d 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -500,6 +500,7 @@ static const char* targetPropertyTransitiveWhitelist[] = {
std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
cmTarget *target,
+ cmTarget *headTarget,
cmGeneratorExpressionContext *context,
cmGeneratorExpressionDAGChecker *dagChecker,
const std::string &interfacePropertyName)
@@ -530,7 +531,7 @@ std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
std::string linkedTargetsContent = cge->Evaluate(context->Makefile,
context->Config,
context->Quiet,
- context->HeadTarget,
+ headTarget,
target,
dagChecker);
if (cge->GetHadContextSensitiveCondition())
@@ -729,6 +730,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName = "INTERFACE_COMPILE_OPTIONS";
}
+ cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target;
+
const char **transBegin = targetPropertyTransitiveWhitelist;
const char **transEnd = targetPropertyTransitiveWhitelist
+ (sizeof(targetPropertyTransitiveWhitelist) /
@@ -738,11 +741,12 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
- context->HeadTarget);
+ headTarget);
if(iface)
{
linkedTargetsContent =
getLinkedTargetsContent(iface->Libraries, target,
+ headTarget,
context, &dagChecker,
interfacePropertyName);
}
@@ -752,11 +756,12 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
context->Config,
- context->HeadTarget);
+ headTarget);
if(impl)
{
linkedTargetsContent =
getLinkedTargetsContent(impl->Libraries, target,
+ headTarget,
context, &dagChecker,
interfacePropertyName);
}
@@ -805,7 +810,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
std::string result = cge->Evaluate(context->Makefile,
context->Config,
context->Quiet,
- context->HeadTarget,
+ headTarget,
target,
&dagChecker);