diff options
author | Brad King <brad.king@kitware.com> | 2023-05-05 16:42:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-05 16:42:23 (GMT) |
commit | 5924630e6d4a383ef76412a6f560fbe852837e50 (patch) | |
tree | fbab8184157448c3251e09feee8e4ce5c0b6234e /Tests/RunCMake | |
parent | 2b5b09556c08bdbcd949e600daa3059f63da240a (diff) | |
parent | c42630ee62df80e649211e99c510cab7ac28fc0b (diff) | |
download | CMake-5924630e6d4a383ef76412a6f560fbe852837e50.zip CMake-5924630e6d4a383ef76412a6f560fbe852837e50.tar.gz CMake-5924630e6d4a383ef76412a6f560fbe852837e50.tar.bz2 |
Merge topic 'compile-only-genex'
c42630ee62 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
0fb923c460 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8411
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt new file mode 100644 index 0000000..8c93d59 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at COMPILE_ONLY-not-compiling.cmake:1 \(add_custom_target\): + Error evaluating generator expression: + + \$<COMPILE_ONLY:something> + + \$<COMPILE_ONLY:...> may only be used for linking +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling.cmake new file mode 100644 index 0000000..1bc75f9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/COMPILE_ONLY-not-compiling.cmake @@ -0,0 +1 @@ +add_custom_target(Custom ALL COMMAND ${CMAKE_COMMAND} -E echo $<COMPILE_ONLY:something>) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index b139210..3fd9947 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -22,6 +22,7 @@ run_cmake(NonValidTarget-CXX_COMPILER_VERSION) run_cmake(NonValidTarget-Fortran_COMPILER_VERSION) run_cmake(NonValidTarget-TARGET_PROPERTY) run_cmake(NonValidTarget-TARGET_POLICY) +run_cmake(COMPILE_ONLY-not-compiling) run_cmake(LINK_ONLY-not-linking) run_cmake(TARGET_EXISTS-no-arg) run_cmake(TARGET_EXISTS-empty-arg) |