diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-12-21 14:49:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-05 00:18:36 (GMT) |
commit | c67b8124f735e7f96567a276e16969607b300e43 (patch) | |
tree | fded8ddde1e820f600daaa054f8547b80e0f586c /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | d0f950fdba88ac08d0e25e340fe558eba008810e (diff) | |
download | CMake-c67b8124f735e7f96567a276e16969607b300e43.zip CMake-c67b8124f735e7f96567a276e16969607b300e43.tar.gz CMake-c67b8124f735e7f96567a276e16969607b300e43.tar.bz2 |
Make cycles in target properties ignored, not an error.
Constructs such as these are an error as they are direct self-references:
set_property(TARGET foo APPEND PROPERTY
INCLUDE_DIRECTORIES $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>)
set_property(TARGET foo APPEND PROPERTY
INCLUDE_DIRECTORIES $<TARGET_PROPERTY:INCLUDE_DIRECTORIES>)
However, this is an indirect self-reference in a cycle, and not an error:
set_property(TARGET foo APPEND PROPERTY
INCLUDE_DIRECTORIES $<TARGET_PROPERTY:bar,INCLUDE_DIRECTORIES>)
set_property(TARGET bar APPEND PROPERTY
INCLUDE_DIRECTORIES $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>)
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 8b8b860..4b44ebe 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -381,10 +381,16 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode content, dagCheckerParent); - if (!dagChecker.check()) + switch (dagChecker.check()) { + case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: dagChecker.reportError(context, content->GetOriginalExpression()); return std::string(); + case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: + // No error. We just skip cyclic references. + return std::string(); + case cmGeneratorExpressionDAGChecker::DAG: + break; } const char *prop = target->GetProperty(propertyName.c_str()); |