summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-12-21 14:49:19 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-05 00:18:36 (GMT)
commitc67b8124f735e7f96567a276e16969607b300e43 (patch)
treefded8ddde1e820f600daaa054f8547b80e0f586c /Source/cmGeneratorExpressionDAGChecker.h
parentd0f950fdba88ac08d0e25e340fe558eba008810e (diff)
downloadCMake-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/cmGeneratorExpressionDAGChecker.h')
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h
index ffc84f8..48f26ed 100644
--- a/Source/cmGeneratorExpressionDAGChecker.h
+++ b/Source/cmGeneratorExpressionDAGChecker.h
@@ -25,12 +25,18 @@ struct cmGeneratorExpressionDAGChecker
const GeneratorExpressionContent *content,
cmGeneratorExpressionDAGChecker *parent);
- bool check() const;
+ enum Result {
+ DAG,
+ SELF_REFERENCE,
+ CYCLIC_REFERENCE
+ };
+
+ Result check() const;
void reportError(cmGeneratorExpressionContext *context,
const std::string &expr);
private:
- bool isDAG() const;
+ Result checkGraph() const;
private:
const cmGeneratorExpressionDAGChecker * const Parent;
@@ -38,7 +44,7 @@ private:
const std::string Property;
const GeneratorExpressionContent * const Content;
const cmListFileBacktrace Backtrace;
- bool IsDAG;
+ Result CheckResult;
};
#endif