summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-07 11:33:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-07 15:21:09 (GMT)
commit57175d559ee2bdd56c360a3b45aacf13b15b9270 (patch)
tree3612657425033c4ed02ad99bd0736a2272319cb4 /Source/cmGeneratorExpressionEvaluator.cxx
parent4cf161a5e7af6f32d76263ac751600577e4d7bd3 (diff)
downloadCMake-57175d559ee2bdd56c360a3b45aacf13b15b9270.zip
CMake-57175d559ee2bdd56c360a3b45aacf13b15b9270.tar.gz
CMake-57175d559ee2bdd56c360a3b45aacf13b15b9270.tar.bz2
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.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx13
1 files changed, 11 insertions, 2 deletions
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;
}