summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix DAG checker finding cycling dependencies.Stephen Kelly2013-02-231-1/+1
| | | | | | | | | | | | | | | | Before this patch, the following is reported falsely as a self-reference: target_link_libraries(empty2 LINK_PUBLIC empty3) target_link_libraries(empty3 LINK_PUBLIC empty2) add_custom_target(... -DINCLUDES=$<TARGET_PROPERTY:empty2,INTERFACE_INCLUDE_DIRECTORIES> ) The reason is that the existing code assumed that all reading of include directories would be done through cmTarget::GetIncludeDirectories() and would therefore be initialized with a DagChecker. That is not the case if reading the property with an 'external' generator expression.
* Fix determination of when we're evaluating compile definitions.Stephen Kelly2013-02-121-1/+2
| | | | Also handle the config-specific property.
* Fix determination of evaluating link libraries.Stephen Kelly2013-02-071-2/+2
| | | | | Added in commit 6fbe3ce4 (Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation., 2013-01-23)
* Optimize genex evaluation for includes and defines.Stephen Kelly2013-02-021-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | While porting boost to use these features, the generation step took too long (several minutes before I stopped it). The reason was that the boost libraries form a large interdependent mesh. The libraries list their dependencies in their INTERFACE such as: $<LINKED:boost::core>;$<LINKED:boost::config>;$<LINKED:boost::mpl> As boost::core already depends on the boost::config libraries, that expression has no impact on the end-content, as it is removed after the generation step. There is no DAG issue though, so the generator expression evaluation would fully evaluate them. In the case of the config library, it also depends on the core library, so all depends are followed through that again, despite the fact that they've just been evaluated. After this patch, the evaluation skips libraries if they have already been seen via depends or directly in the content. This patch keeps track of targets whose INTERFACE has been consumed already. The INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS properties are whitelisted because repeated content will be stripped out later during generation. For other properties now and in the future, that may not be the case.
* Add API to check if we're reading a includes or defines property.Stephen Kelly2013-01-311-0/+16
| | | | This will allow the implementation of the LINKED generator expression.
* Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.Stephen Kelly2013-01-241-2/+8
| | | | | | These interface-related link-libraries properties are used to determine the value of the other INTERFACE properties, so we were getting infinite recursion and segfaults otherwise.
* Make INTERFACE determined properties readable in generator expressions.Stephen Kelly2013-01-201-0/+13
| | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* Make cycles in target properties ignored, not an error.Stephen Kelly2013-01-051-7/+9
| | | | | | | | | | | | | | | | 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>)
* Make all relevant targets available in the genex context.Stephen Kelly2013-01-051-1/+1
| | | | | The current node being evaluated transitively in the generator expression must be available to resolve mapped configs.
* Add API to check that dependent target properties form a DAG.Stephen Kelly2012-09-281-0/+106
Initially this will only be used to check for self-references, but can be extended to check for cycles when chaining properties of other targets.