summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_link_libraries
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-25 14:31:40 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-25 14:33:07 (GMT)
commit21a342c8b16df2cc9ea34ef494ba8ffd7f3a450a (patch)
treebcd86fb40961c7f4de7cc5dcf7be991fff69a209 /Tests/CMakeCommands/target_link_libraries
parent47b8d322a4d9598706948553dfbf9daebe80dcef (diff)
downloadCMake-21a342c8b16df2cc9ea34ef494ba8ffd7f3a450a.zip
CMake-21a342c8b16df2cc9ea34ef494ba8ffd7f3a450a.tar.gz
CMake-21a342c8b16df2cc9ea34ef494ba8ffd7f3a450a.tar.bz2
Remove use of TARGET_DEFINED from the target_link_libraries test.
Update the unit test introduced in commit 57175d55 (Only use early evaluation termination for transitive properties., 2013-02-07) to not use the expression, but still test the appropriate code.
Diffstat (limited to 'Tests/CMakeCommands/target_link_libraries')
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index 19ee59f..b13c13d 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -103,7 +103,7 @@ target_compile_definitions(depG INTERFACE
)
add_executable(targetC targetC.cpp)
-# Creates a generator expression for include directories like
-# $<$<TARGET_DEFINED:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>>:\
-# $<TARGET_PROPERTY:$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>,INTERFACE_INCLUDE_DIRECTORIES>>
-target_link_libraries(targetC $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:depG>)
+# The TARGET_PROPERTY expression is duplicated below to test that there is no
+# shortcutting of the evaluation by returning an empty string.
+set(_exe_test $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
+target_link_libraries(targetC $<$<AND:${_exe_test},${_exe_test}>:depG>)