summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsJava.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-04-29 10:00:53 (GMT)
committerBrad King <brad.king@kitware.com>2013-05-06 13:55:45 (GMT)
commit26dba6a1622422d3742254aa2ecab97f9a58cb2b (patch)
tree6b83e62275e5f435d5ac915d9f1501df4b39535d /Source/cmDependsJava.h
parentb8259c3d69258b884383559b74d37486b6a06ca2 (diff)
downloadCMake-26dba6a1622422d3742254aa2ecab97f9a58cb2b.zip
CMake-26dba6a1622422d3742254aa2ecab97f9a58cb2b.tar.gz
CMake-26dba6a1622422d3742254aa2ecab97f9a58cb2b.tar.bz2
Fix include dir propagation from conditionally linked targets
Generator expressions, including configuration-specific expressions may be used as link libraries of targets. The old-style keywords of target_link_libraries are handled in terms of new generator expressions. However, the generator expressions expect target names to be valid against a regular expression, whereas target_link_libraries does not require validation. In generator expression constructed without any action from the user we need to ensure that only valid expressions are generated. Ensure that strings which are not valid target names are not used in generator expressions which validate the argument. Code like target_link_libraries(B debug A) generates usage requirement references such as "$<$<CONFIG:DEBUG>:A>". When cmTarget::GetIncludeDirectories uses such references it generates expressions like: $<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES> When the conditions are false such references evaluate as an empty string and the expression fails with an error such as: $<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name. Fix this by teaching cmTarget::GetIncludeDirectories to wrap the above expression inside a conditional: $<$<BOOL:$<$<CONFIG:DEBUG>:A>>:...> so that $<TARGET_PROPERTY:...> will not be evaluated with an empty target.
Diffstat (limited to 'Source/cmDependsJava.h')
0 files changed, 0 insertions, 0 deletions