diff options
author | Brad King <brad.king@kitware.com> | 2015-05-27 13:23:06 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-27 13:23:06 (GMT) |
commit | 76b92412be6acac328de4ca9f11705af75216acb (patch) | |
tree | 01624af7d3d1203ff31e806174448795183aa689 | |
parent | 337f9b842e027e83256016ad96c321fe5238b78b (diff) | |
parent | 89253992b8237d8c3bd93c2194dcd8bc18fa55db (diff) | |
download | CMake-76b92412be6acac328de4ca9f11705af75216acb.zip CMake-76b92412be6acac328de4ca9f11705af75216acb.tar.gz CMake-76b92412be6acac328de4ca9f11705af75216acb.tar.bz2 |
Merge topic 'test-genex-TARGET_FILE-on-INTERFACE'
89253992 Tests: Add case for rejecting $<TARGET_FILE:...> on an INTERFACE library
4 files changed, 34 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-stderr.txt new file mode 100644 index 0000000..3aa457e --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface.cmake new file mode 100644 index 0000000..19566f4 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeInterface.cmake @@ -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> + ) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 542b7fc..1c8fab5 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -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) |