Merge topic 'test-genex-TARGET_FILE-on-INTERFACE'

89253992 Tests: Add case for rejecting $<TARGET_FILE:...> on an INTERFACE library
This commit is contained in:
Brad King 2015-05-27 09:23:06 -04:00 committed by CMake Topic Stage
commit 76b92412be
4 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,26 @@
CMake Error at BadTargetTypeInterface.cmake:[0-9]+ \(add_custom_target\):
Error evaluating generator expression:
\$<TARGET_FILE:iface>
Target "iface" is not an executable or library.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
+
CMake Error at BadTargetTypeInterface.cmake:[0-9]+ \(add_custom_target\):
Error evaluating generator expression:
\$<TARGET_SONAME_FILE:iface>
Target "iface" is not an executable or library.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
+
CMake Error at BadTargetTypeInterface.cmake:[0-9]+ \(add_custom_target\):
Error evaluating generator expression:
\$<TARGET_LINKER_FILE:iface>
Target "iface" is not an executable or library.
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)

View File

@ -0,0 +1,6 @@
add_library(iface INTERFACE)
add_custom_target(check ALL COMMAND echo
$<TARGET_FILE:iface>
$<TARGET_SONAME_FILE:iface>
$<TARGET_LINKER_FILE:iface>
)

View File

@ -7,6 +7,7 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
run_cmake(BadTargetTypeInterface)
run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
run_cmake(CMP0044-WARN)