summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-21 13:02:22 -0400
committerBrad King <brad.king@kitware.com>2014-07-21 13:02:22 -0400
commit807e4ffeefb0e10ef0546e0eb7383f3d5533809b (patch)
tree0faa99cb8c0479245755fa2e4347ae47a91872ac /Source/cmGeneratorExpressionEvaluator.cxx
parent46099b82ed71394f1dc6e0bbb91704d274edab7d (diff)
downloadcmake-807e4ffeefb0e10ef0546e0eb7383f3d5533809b.tar.gz
Genex: Track whether an expression depends on the 'head' target
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 28879f1c59..7a53d65c92 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -840,6 +840,10 @@ getLinkedTargetsContent(
{
context->HadContextSensitiveCondition = true;
}
+ if (cge->GetHadHeadSensitiveCondition())
+ {
+ context->HadHeadSensitiveCondition = true;
+ }
}
linkedTargetsContent =
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
@@ -871,6 +875,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmTarget const* target = context->HeadTarget;
std::string propertyName = *parameters.begin();
+ if (parameters.size() == 1)
+ {
+ context->HadHeadSensitiveCondition = true;
+ }
if (!target && parameters.size() == 1)
{
reportError(context, content->GetOriginalExpression(),
@@ -1190,6 +1198,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
context->HadContextSensitiveCondition = true;
}
+ if (cge->GetHadHeadSensitiveCondition())
+ {
+ context->HadHeadSensitiveCondition = true;
+ }
if (!linkedTargetsContent.empty())
{
result += (result.empty() ? "" : ";") + linkedTargetsContent;
@@ -1313,6 +1325,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
"not be used with add_custom_command or add_custom_target.");
return std::string();
}
+ context->HadHeadSensitiveCondition = true;
typedef std::map<std::string, std::vector<std::string> > LangMap;
static LangMap availableFeatures;
@@ -1446,6 +1459,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
}
context->HadContextSensitiveCondition = true;
+ context->HadHeadSensitiveCondition = true;
for (size_t i = 1; i < cmArraySize(targetPolicyWhitelist); ++i)
{