diff options
author | Brad King <brad.king@kitware.com> | 2013-11-02 14:54:23 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-02 14:54:23 (GMT) |
commit | 872a9d64767674501ec3677066b8bea07e8fc318 (patch) | |
tree | b14bc4af6922c96304819aa85698558b271c549a /Tests/RunCMake | |
parent | 53ac9b8d86daeff15a446fe14a9ed3dd6981fa3e (diff) | |
parent | d9605897788d800e892de0d201a305046510d089 (diff) | |
download | CMake-872a9d64767674501ec3677066b8bea07e8fc318.zip CMake-872a9d64767674501ec3677066b8bea07e8fc318.tar.gz CMake-872a9d64767674501ec3677066b8bea07e8fc318.tar.bz2 |
Merge topic 'object-library-no-TARGET_FILE'
d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
Diffstat (limited to 'Tests/RunCMake')
5 files changed, 35 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt new file mode 100644 index 0000000..533d38c --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt @@ -0,0 +1,26 @@ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_SONAME_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\): + Error evaluating generator expression: + + \$<TARGET_LINKER_FILE:objlib> + + Target "objlib" is not an executable or library. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake new file mode 100644 index 0000000..c47ee2b --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake @@ -0,0 +1,7 @@ +enable_language(C) +add_library(objlib OBJECT empty.c) +add_custom_target(check ALL COMMAND echo + $<TARGET_FILE:objlib> + $<TARGET_SONAME_FILE:objlib> + $<TARGET_LINKER_FILE:objlib> + ) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 62bf29b..54d5064 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -7,4 +7,5 @@ run_cmake(BadNOT) run_cmake(BadStrEqual) run_cmake(BadZero) run_cmake(BadTargetName) +run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) diff --git a/Tests/RunCMake/GeneratorExpression/empty.c b/Tests/RunCMake/GeneratorExpression/empty.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/empty.c |