diff options
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression')
79 files changed, 390 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt new file mode 100644 index 0000000..eb15834 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\): + Error evaluating generator expression: + + \$<DEVICE_LINK> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake new file mode 100644 index 0000000..01b3784 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_command.cmake @@ -0,0 +1,4 @@ +add_custom_target(drive) +add_custom_command(TARGET drive PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK> +) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt new file mode 100644 index 0000000..cdd3043 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\): + Error evaluating generator expression: + + \$<DEVICE_LINK> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake new file mode 100644 index 0000000..35728e9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_custom_target.cmake @@ -0,0 +1,3 @@ +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK> +) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt new file mode 100644 index 0000000..56b595c --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-add_executable.cmake:[0-9]+ \(add_executable\): + Error evaluating generator expression: + + \$<DEVICE_LINK:empty.c> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake new file mode 100644 index 0000000..899f8f6 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_executable.cmake @@ -0,0 +1 @@ +add_executable(empty $<DEVICE_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt new file mode 100644 index 0000000..4477e00 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-add_library.cmake:[0-9]+ \(add_library\): + Error evaluating generator expression: + + \$<DEVICE_LINK:empty.c> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake new file mode 100644 index 0000000..fc8547b --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_library.cmake @@ -0,0 +1 @@ +add_library(empty $<DEVICE_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt new file mode 100644 index 0000000..99561fe --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-add_test.cmake:[0-9]+ \(add_test\): + Error evaluating generator expression: + + \$<DEVICE_LINK> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake new file mode 100644 index 0000000..87d6ba1 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-add_test.cmake @@ -0,0 +1,5 @@ + +include(CTest) +enable_testing() + +add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<DEVICE_LINK>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt new file mode 100644 index 0000000..afb3090 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install-stderr.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$<DEVICE_LINK:empty> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake new file mode 100644 index 0000000..4b6dbef --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-install.cmake @@ -0,0 +1,5 @@ + +install(FILES + $<DEVICE_LINK:empty> + DESTINATION src +) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt new file mode 100644 index 0000000..4fa0522 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends-stderr.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$<DEVICE_LINK:lib> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake new file mode 100644 index 0000000..8129514 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-link_depends.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +set_property(TARGET empty PROPERTY LINK_DEPENDS $<DEVICE_LINK:lib>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt new file mode 100644 index 0000000..c0185e3 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\): + Error evaluating generator expression: + + \$<DEVICE_LINK:DEF> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake new file mode 100644 index 0000000..aaa8efc --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_definitions.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_compile_definitions(empty PRIVATE $<DEVICE_LINK:DEF>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt new file mode 100644 index 0000000..34ca4f2 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\): + Error evaluating generator expression: + + \$<DEVICE_LINK:-OPT> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake new file mode 100644 index 0000000..a9cb7fd --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_compile_options.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_compile_options(empty PRIVATE $<DEVICE_LINK:-OPT>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt new file mode 100644 index 0000000..4d1642d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\): + Error evaluating generator expression: + + \$<DEVICE_LINK:/DIR> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake new file mode 100644 index 0000000..03cc413 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_include_directories.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_include_directories(empty PRIVATE $<DEVICE_LINK:/DIR>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt new file mode 100644 index 0000000..d924916 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\): + Error evaluating generator expression: + + \$<DEVICE_LINK:/DIR> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake new file mode 100644 index 0000000..e50d27d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_directories.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +target_link_directories(empty PRIVATE $<DEVICE_LINK:/DIR>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt new file mode 100644 index 0000000..1436fa8 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\): + Error evaluating generator expression: + + \$<DEVICE_LINK:lib> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake new file mode 100644 index 0000000..971f562 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_link_libraries.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +target_link_libraries(empty PRIVATE $<DEVICE_LINK:lib>) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt new file mode 100644 index 0000000..c9b602d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at DEVICE_LINK-target_sources.cmake:[0-9]+ \(target_sources\): + Error evaluating generator expression: + + \$<DEVICE_LINK:empty.c> + + \$<DEVICE_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake new file mode 100644 index 0000000..94bac9e --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/DEVICE_LINK-target_sources.cmake @@ -0,0 +1,2 @@ +add_library(empty) +target_sources(empty PRIVATE $<DEVICE_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt new file mode 100644 index 0000000..5ad41b9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-add_custom_command.cmake:[0-9]+ \(add_custom_command\): + Error evaluating generator expression: + + \$<HOST_LINK> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake new file mode 100644 index 0000000..4d6e305 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_command.cmake @@ -0,0 +1,4 @@ +add_custom_target(drive) +add_custom_command(TARGET drive PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK> +) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt new file mode 100644 index 0000000..c44202a --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-add_custom_target.cmake:[0-9]+ \(add_custom_target\): + Error evaluating generator expression: + + \$<HOST_LINK> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake new file mode 100644 index 0000000..eec072a --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_custom_target.cmake @@ -0,0 +1,3 @@ +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK> +) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt new file mode 100644 index 0000000..b395515 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-add_executable.cmake:[0-9]+ \(add_executable\): + Error evaluating generator expression: + + \$<HOST_LINK:empty.c> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake new file mode 100644 index 0000000..c9f74a5 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_executable.cmake @@ -0,0 +1 @@ +add_executable(empty $<HOST_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt new file mode 100644 index 0000000..4bd27be --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-add_library.cmake:[0-9]+ \(add_library\): + Error evaluating generator expression: + + \$<HOST_LINK:empty.c> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake new file mode 100644 index 0000000..44135af --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_library.cmake @@ -0,0 +1 @@ +add_library(empty $<HOST_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt new file mode 100644 index 0000000..012ad21 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-add_test.cmake:[0-9]+ \(add_test\): + Error evaluating generator expression: + + \$<HOST_LINK> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake new file mode 100644 index 0000000..4b472af --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-add_test.cmake @@ -0,0 +1,5 @@ + +include(CTest) +enable_testing() + +add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $<HOST_LINK>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt new file mode 100644 index 0000000..c265ec4 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install-stderr.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$<HOST_LINK:empty> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake new file mode 100644 index 0000000..b4dff68 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-install.cmake @@ -0,0 +1,5 @@ + +install(FILES + $<HOST_LINK:empty> + DESTINATION src +) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt new file mode 100644 index 0000000..24b8b82 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends-stderr.txt @@ -0,0 +1,7 @@ +CMake Error: + Error evaluating generator expression: + + \$<HOST_LINK:lib> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake new file mode 100644 index 0000000..0402f43 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-link_depends.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +set_property(TARGET empty PROPERTY LINK_DEPENDS $<HOST_LINK:lib>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt new file mode 100644 index 0000000..6ab3c14 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_compile_definitions.cmake:[0-9]+ \(target_compile_definitions\): + Error evaluating generator expression: + + \$<HOST_LINK:DEF> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake new file mode 100644 index 0000000..f6c130d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_definitions.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_compile_definitions(empty PRIVATE $<HOST_LINK:DEF>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt new file mode 100644 index 0000000..0f5bbc3 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_compile_options.cmake:[0-9]+ \(target_compile_options\): + Error evaluating generator expression: + + \$<HOST_LINK:-OPT> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake new file mode 100644 index 0000000..53afea1 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_compile_options.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_compile_options(empty PRIVATE $<HOST_LINK:-OPT>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt new file mode 100644 index 0000000..9a2634a --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_include_directories.cmake:[0-9]+ \(target_include_directories\): + Error evaluating generator expression: + + \$<HOST_LINK:/DIR> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake new file mode 100644 index 0000000..aff1009 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_include_directories.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_include_directories(empty PRIVATE $<HOST_LINK:/DIR>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt new file mode 100644 index 0000000..5225a52 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_link_directories.cmake:[0-9]+ \(target_link_directories\): + Error evaluating generator expression: + + \$<HOST_LINK:/DIR> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake new file mode 100644 index 0000000..97488ee --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_directories.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +target_link_directories(empty PRIVATE $<HOST_LINK:/DIR>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt new file mode 100644 index 0000000..6c4441f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_link_libraries.cmake:[0-9]+ \(target_link_libraries\): + Error evaluating generator expression: + + \$<HOST_LINK:lib> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake new file mode 100644 index 0000000..d74c92d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_link_libraries.cmake @@ -0,0 +1,7 @@ + +enable_language(C) + +add_library(lib empty.c) + +add_executable(empty empty.c) +target_link_libraries(empty PRIVATE $<HOST_LINK:lib>) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt new file mode 100644 index 0000000..0e25568 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at HOST_LINK-target_sources.cmake:[0-9]+ \(target_sources\): + Error evaluating generator expression: + + \$<HOST_LINK:empty.c> + + \$<HOST_LINK:...> may only be used with binary targets to specify link + options. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake new file mode 100644 index 0000000..ea7bf55 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/HOST_LINK-target_sources.cmake @@ -0,0 +1,2 @@ +add_library(empty) +target_sources(empty PRIVATE $<HOST_LINK:empty.c>) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 6550f84..24c3642 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -64,6 +64,36 @@ run_cmake(LINK_LANG_AND_ID-wrong-usage1) run_cmake(LINK_LANG_AND_ID-wrong-usage2) run_cmake(LINK_LANG_AND_ID-wrong-usage3) run_cmake(LINK_LANG_AND_ID-file_generate) +run_cmake(HOST_LINK-add_custom_target) +run_cmake(HOST_LINK-add_custom_command) +run_cmake(HOST_LINK-install) +run_cmake(HOST_LINK-add_executable) +run_cmake(HOST_LINK-add_library) +run_cmake(HOST_LINK-add_test) +run_cmake(HOST_LINK-target_sources) +run_cmake(HOST_LINK-target_compile_definitions) +run_cmake(HOST_LINK-target_compile_options) +run_cmake(HOST_LINK-target_include_directories) +run_cmake(HOST_LINK-target_link_libraries) +run_cmake(HOST_LINK-target_link_directories) +if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)") + run_cmake(HOST_LINK-link_depends) +endif() +run_cmake(DEVICE_LINK-add_custom_target) +run_cmake(DEVICE_LINK-add_custom_command) +run_cmake(DEVICE_LINK-install) +run_cmake(DEVICE_LINK-add_executable) +run_cmake(DEVICE_LINK-add_library) +run_cmake(DEVICE_LINK-add_test) +run_cmake(DEVICE_LINK-target_sources) +run_cmake(DEVICE_LINK-target_compile_definitions) +run_cmake(DEVICE_LINK-target_compile_options) +run_cmake(DEVICE_LINK-target_include_directories) +run_cmake(DEVICE_LINK-target_link_libraries) +run_cmake(DEVICE_LINK-target_link_directories) +if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)") + run_cmake(DEVICE_LINK-link_depends) +endif() run_cmake(TARGET_FILE-recursion) run_cmake(OUTPUT_NAME-recursion) run_cmake(TARGET_FILE_PREFIX) |