Browse Source

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.
Stephen Kelly 12 years ago
parent
commit
21a342c8b1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Tests/CMakeCommands/target_link_libraries/CMakeLists.txt

+ 4 - 4
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>)