From 983adb8bed989b68dc4b7de08d14e3a6eea874d8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 15 Jun 2020 14:25:22 -0400 Subject: Tests: Factor out RunCMake.GenEx-COMPILE_LANG_AND_ID test Move the `COMPILE_LANG_AND_ID` cases out of `RunCMake.GeneratorExpression`. --- Tests/RunCMake/CMakeLists.txt | 1 + Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/CMakeLists.txt | 3 +++ .../COMPILE_LANG_AND_ID-add_custom_command-result.txt | 1 + .../COMPILE_LANG_AND_ID-add_custom_command-stderr.txt | 8 ++++++++ .../COMPILE_LANG_AND_ID-add_custom_command.cmake | 4 ++++ .../COMPILE_LANG_AND_ID-add_custom_target-result.txt | 1 + .../COMPILE_LANG_AND_ID-add_custom_target-stderr.txt | 11 +++++++++++ .../COMPILE_LANG_AND_ID-add_custom_target.cmake | 4 ++++ .../COMPILE_LANG_AND_ID-add_executable-result.txt | 1 + .../COMPILE_LANG_AND_ID-add_executable-stderr.txt | 11 +++++++++++ .../COMPILE_LANG_AND_ID-add_executable.cmake | 5 +++++ .../COMPILE_LANG_AND_ID-add_library-result.txt | 1 + .../COMPILE_LANG_AND_ID-add_library-stderr.txt | 11 +++++++++++ .../COMPILE_LANG_AND_ID-add_library.cmake | 2 ++ .../COMPILE_LANG_AND_ID-add_test-result.txt | 1 + .../COMPILE_LANG_AND_ID-add_test-stderr.txt | 11 +++++++++++ .../COMPILE_LANG_AND_ID-add_test.cmake | 5 +++++ .../COMPILE_LANG_AND_ID-install-result.txt | 1 + .../COMPILE_LANG_AND_ID-install-stderr.txt | 9 +++++++++ .../COMPILE_LANG_AND_ID-install.cmake | 5 +++++ .../COMPILE_LANG_AND_ID-target_sources-result.txt | 1 + .../COMPILE_LANG_AND_ID-target_sources-stderr.txt | 8 ++++++++ .../COMPILE_LANG_AND_ID-target_sources.cmake | 2 ++ .../COMPILE_LANG_AND_ID-unknown-lang.cmake | 4 ++++ Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake | 10 ++++++++++ Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/empty.c | 0 .../COMPILE_LANG_AND_ID-add_custom_command-result.txt | 1 - .../COMPILE_LANG_AND_ID-add_custom_command-stderr.txt | 8 -------- .../COMPILE_LANG_AND_ID-add_custom_command.cmake | 4 ---- .../COMPILE_LANG_AND_ID-add_custom_target-result.txt | 1 - .../COMPILE_LANG_AND_ID-add_custom_target-stderr.txt | 11 ----------- .../COMPILE_LANG_AND_ID-add_custom_target.cmake | 4 ---- .../COMPILE_LANG_AND_ID-add_executable-result.txt | 1 - .../COMPILE_LANG_AND_ID-add_executable-stderr.txt | 11 ----------- .../COMPILE_LANG_AND_ID-add_executable.cmake | 5 ----- .../COMPILE_LANG_AND_ID-add_library-result.txt | 1 - .../COMPILE_LANG_AND_ID-add_library-stderr.txt | 11 ----------- .../GeneratorExpression/COMPILE_LANG_AND_ID-add_library.cmake | 2 -- .../COMPILE_LANG_AND_ID-add_test-result.txt | 1 - .../COMPILE_LANG_AND_ID-add_test-stderr.txt | 11 ----------- .../GeneratorExpression/COMPILE_LANG_AND_ID-add_test.cmake | 5 ----- .../COMPILE_LANG_AND_ID-install-result.txt | 1 - .../COMPILE_LANG_AND_ID-install-stderr.txt | 9 --------- .../GeneratorExpression/COMPILE_LANG_AND_ID-install.cmake | 5 ----- .../COMPILE_LANG_AND_ID-target_sources-result.txt | 1 - .../COMPILE_LANG_AND_ID-target_sources-stderr.txt | 8 -------- .../COMPILE_LANG_AND_ID-target_sources.cmake | 2 -- .../COMPILE_LANG_AND_ID-unknown-lang.cmake | 4 ---- Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 8 -------- 49 files changed, 121 insertions(+), 115 deletions(-) create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/CMakeLists.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/empty.c delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-unknown-lang.cmake diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index bf73b91..e87e468 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -220,6 +220,7 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom") add_RunCMake_test(GenerateExportHeader) endif() add_RunCMake_test(GenEx-COMPILE_LANGUAGE) +add_RunCMake_test(GenEx-COMPILE_LANG_AND_ID) add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorInstance) add_RunCMake_test(GeneratorPlatform) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/CMakeLists.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/CMakeLists.txt new file mode 100644 index 0000000..77030d6 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.15) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt new file mode 100644 index 0000000..2ee96ed --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at COMPILE_LANG_AND_ID-add_custom_command.cmake:2 \(add_custom_command\): + Error evaluating generator expression: + + \$ + + \$ expression requires at least two parameters. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake new file mode 100644 index 0000000..9bd5e8e --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_command.cmake @@ -0,0 +1,4 @@ +add_custom_target(drive) +add_custom_command(TARGET drive PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E echo $ +) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt new file mode 100644 index 0000000..589e64b --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at COMPILE_LANG_AND_ID-add_custom_target.cmake:2 \(add_custom_target\): + Error evaluating generator expression: + + \$ + + \$ may only be used with binary targets to + specify include directories, compile definitions, and compile options. It + may not be used with the add_custom_command, add_custom_target, or + file\(GENERATE\) commands. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake new file mode 100644 index 0000000..398db19 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_custom_target.cmake @@ -0,0 +1,4 @@ + +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $ +) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt new file mode 100644 index 0000000..3b3f38d --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at COMPILE_LANG_AND_ID-add_executable.cmake:1 \(add_executable\): + Error evaluating generator expression: + + \$ + + \$ may only be used with binary targets to + specify include directories, compile definitions, and compile options. It + may not be used with the add_custom_command, add_custom_target, or + file\(GENERATE\) commands. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake new file mode 100644 index 0000000..2245f50 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_executable.cmake @@ -0,0 +1,5 @@ +add_executable(empty main.c + $<$:empty.c> + $<$:empty2.c> + $<$:empty3.c> + ) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt new file mode 100644 index 0000000..4cbf000 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at COMPILE_LANG_AND_ID-add_library.cmake:2 \(add_library\): + Error evaluating generator expression: + + \$ + + \$ may only be used with binary targets to + specify include directories, compile definitions, and compile options. It + may not be used with the add_custom_command, add_custom_target, or + file\(GENERATE\) commands. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake new file mode 100644 index 0000000..044962a --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_library.cmake @@ -0,0 +1,2 @@ + +add_library(empty empty.$) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt new file mode 100644 index 0000000..26a5940 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at COMPILE_LANG_AND_ID-add_test.cmake:5 \(add_test\): + Error evaluating generator expression: + + \$ + + \$ may only be used with binary targets to + specify include directories, compile definitions, and compile options. It + may not be used with the add_custom_command, add_custom_target, or + file\(GENERATE\) commands. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake new file mode 100644 index 0000000..b5b6c2b --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-add_test.cmake @@ -0,0 +1,5 @@ + +include(CTest) +enable_testing() + +add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt new file mode 100644 index 0000000..0c4ecd0 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install-stderr.txt @@ -0,0 +1,9 @@ +CMake Error: + Error evaluating generator expression: + + \$ + + \$ may only be used with binary targets to + specify include directories, compile definitions, and compile options. It + may not be used with the add_custom_command, add_custom_target, or + file\(GENERATE\) commands. diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake new file mode 100644 index 0000000..c13eda6 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-install.cmake @@ -0,0 +1,5 @@ + +install(FILES + empty.$ + DESTINATION src +) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt new file mode 100644 index 0000000..3ecbdc3 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at COMPILE_LANG_AND_ID-target_sources.cmake:2 \(target_sources\): + Error evaluating generator expression: + + \$ + + \$ expression requires at least two parameters. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake new file mode 100644 index 0000000..a2c9b03 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-target_sources.cmake @@ -0,0 +1,2 @@ +add_library(empty) +target_sources(empty PRIVATE empty.$) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake new file mode 100644 index 0000000..b9e840b --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/COMPILE_LANG_AND_ID-unknown-lang.cmake @@ -0,0 +1,4 @@ + +enable_language(C) +add_executable(empty empty.c) +target_compile_options(empty PRIVATE $<$:$>) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake new file mode 100644 index 0000000..a0a7bb9 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/RunCMakeTest.cmake @@ -0,0 +1,10 @@ +include(RunCMake) + +run_cmake(COMPILE_LANG_AND_ID-add_custom_target) +run_cmake(COMPILE_LANG_AND_ID-add_custom_command) +run_cmake(COMPILE_LANG_AND_ID-install) +run_cmake(COMPILE_LANG_AND_ID-target_sources) +run_cmake(COMPILE_LANG_AND_ID-add_executable) +run_cmake(COMPILE_LANG_AND_ID-add_library) +run_cmake(COMPILE_LANG_AND_ID-add_test) +run_cmake(COMPILE_LANG_AND_ID-unknown-lang) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/empty.c b/Tests/RunCMake/GenEx-COMPILE_LANG_AND_ID/empty.c new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt deleted file mode 100644 index 2ee96ed..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command-stderr.txt +++ /dev/null @@ -1,8 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-add_custom_command.cmake:2 \(add_custom_command\): - Error evaluating generator expression: - - \$ - - \$ expression requires at least two parameters. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command.cmake deleted file mode 100644 index 9bd5e8e..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_command.cmake +++ /dev/null @@ -1,4 +0,0 @@ -add_custom_target(drive) -add_custom_command(TARGET drive PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E echo $ -) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt deleted file mode 100644 index 589e64b..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-add_custom_target.cmake:2 \(add_custom_target\): - Error evaluating generator expression: - - \$ - - \$ may only be used with binary targets to - specify include directories, compile definitions, and compile options. It - may not be used with the add_custom_command, add_custom_target, or - file\(GENERATE\) commands. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target.cmake deleted file mode 100644 index 398db19..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_custom_target.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -add_custom_target(drive - COMMAND ${CMAKE_COMMAND} -E echo $ -) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-stderr.txt deleted file mode 100644 index 3b3f38d..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-add_executable.cmake:1 \(add_executable\): - Error evaluating generator expression: - - \$ - - \$ may only be used with binary targets to - specify include directories, compile definitions, and compile options. It - may not be used with the add_custom_command, add_custom_target, or - file\(GENERATE\) commands. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable.cmake deleted file mode 100644 index 2245f50..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_executable.cmake +++ /dev/null @@ -1,5 +0,0 @@ -add_executable(empty main.c - $<$:empty.c> - $<$:empty2.c> - $<$:empty3.c> - ) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-stderr.txt deleted file mode 100644 index 4cbf000..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-add_library.cmake:2 \(add_library\): - Error evaluating generator expression: - - \$ - - \$ may only be used with binary targets to - specify include directories, compile definitions, and compile options. It - may not be used with the add_custom_command, add_custom_target, or - file\(GENERATE\) commands. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library.cmake deleted file mode 100644 index 044962a..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_library.cmake +++ /dev/null @@ -1,2 +0,0 @@ - -add_library(empty empty.$) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-stderr.txt deleted file mode 100644 index 26a5940..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test-stderr.txt +++ /dev/null @@ -1,11 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-add_test.cmake:5 \(add_test\): - Error evaluating generator expression: - - \$ - - \$ may only be used with binary targets to - specify include directories, compile definitions, and compile options. It - may not be used with the add_custom_command, add_custom_target, or - file\(GENERATE\) commands. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test.cmake deleted file mode 100644 index b5b6c2b..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-add_test.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -include(CTest) -enable_testing() - -add_test(NAME dummy COMMAND ${CMAKE_COMMAND} -E echo $) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-stderr.txt deleted file mode 100644 index 0c4ecd0..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install-stderr.txt +++ /dev/null @@ -1,9 +0,0 @@ -CMake Error: - Error evaluating generator expression: - - \$ - - \$ may only be used with binary targets to - specify include directories, compile definitions, and compile options. It - may not be used with the add_custom_command, add_custom_target, or - file\(GENERATE\) commands. diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install.cmake deleted file mode 100644 index c13eda6..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-install.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -install(FILES - empty.$ - DESTINATION src -) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-stderr.txt deleted file mode 100644 index 3ecbdc3..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources-stderr.txt +++ /dev/null @@ -1,8 +0,0 @@ -CMake Error at COMPILE_LANG_AND_ID-target_sources.cmake:2 \(target_sources\): - Error evaluating generator expression: - - \$ - - \$ expression requires at least two parameters. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources.cmake deleted file mode 100644 index a2c9b03..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-target_sources.cmake +++ /dev/null @@ -1,2 +0,0 @@ -add_library(empty) -target_sources(empty PRIVATE empty.$) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-unknown-lang.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-unknown-lang.cmake deleted file mode 100644 index b9e840b..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANG_AND_ID-unknown-lang.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -enable_language(C) -add_executable(empty empty.c) -target_compile_options(empty PRIVATE $<$:$>) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 07901ac..6f9acc7 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -23,14 +23,6 @@ run_cmake(NonValidTarget-TARGET_BUNDLE_DIR) run_cmake(NonValidTarget-TARGET_BUNDLE_CONTENT_DIR) run_cmake(NonValidTarget-TARGET_PROPERTY) run_cmake(NonValidTarget-TARGET_POLICY) -run_cmake(COMPILE_LANG_AND_ID-add_custom_target) -run_cmake(COMPILE_LANG_AND_ID-add_custom_command) -run_cmake(COMPILE_LANG_AND_ID-install) -run_cmake(COMPILE_LANG_AND_ID-target_sources) -run_cmake(COMPILE_LANG_AND_ID-add_executable) -run_cmake(COMPILE_LANG_AND_ID-add_library) -run_cmake(COMPILE_LANG_AND_ID-add_test) -run_cmake(COMPILE_LANG_AND_ID-unknown-lang) run_cmake(LINK_LANGUAGE-add_custom_target) run_cmake(LINK_LANGUAGE-add_custom_command) run_cmake(LINK_LANGUAGE-install) -- cgit v0.12