Pārlūkot izejas kodu

Remove use of TARGET_DEFINED from target_include_directories test.

Change the unit test introduced in commit 24dcf0c0 (Make sure
generator expressions can be used with target_include_directories.,
2013-01-16) to not use the expression, but still test the appropriate
code.
Stephen Kelly 12 gadi atpakaļ
vecāks
revīzija
2e39d21c87

+ 3 - 3
Tests/CMakeCommands/target_include_directories/CMakeLists.txt

@@ -30,12 +30,12 @@ target_include_directories(target_include_directories
   PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/poison"
 )
 target_include_directories(target_include_directories
-  BEFORE PUBLIC "$<$<TARGET_DEFINED:target_include_directories>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
+  BEFORE PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:target_include_directories,TYPE>,EXECUTABLE>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
 )
 
-# Has no effect because the target is not defined:
+# Has no effect because the target type is not SHARED_LIBRARY:
 target_include_directories(target_include_directories
-  BEFORE PUBLIC "$<$<TARGET_DEFINED:notdefined>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
+  BEFORE PUBLIC "$<$<STREQUAL:$<TARGET_PROPERTY:target_include_directories,TYPE>,SHARED_LIBRARY>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
 )
 
 add_executable(consumer