From 931a6702f6e2407d6ace8958c22324297ffff8f2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 15 Jun 2020 14:18:08 -0400 Subject: Tests: Factor out RunCMake.GenEx-COMPILE_LANGUAGE test Move the `COMPILE_LANGUAGE` cases out of `RunCMake.GeneratorExpression`. --- Tests/RunCMake/CMakeLists.txt | 1 + Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt | 3 +++ .../COMPILE_LANGUAGE-add_custom_command-result.txt | 1 + .../COMPILE_LANGUAGE-add_custom_command-stderr.txt | 10 ++++++++++ .../COMPILE_LANGUAGE-add_custom_command.cmake | 4 ++++ .../COMPILE_LANGUAGE-add_custom_target-result.txt | 1 + .../COMPILE_LANGUAGE-add_custom_target-stderr.txt | 10 ++++++++++ .../COMPILE_LANGUAGE-add_custom_target.cmake | 3 +++ .../COMPILE_LANGUAGE-add_executable-result.txt | 1 + .../COMPILE_LANGUAGE-add_executable-stderr.txt | 10 ++++++++++ .../COMPILE_LANGUAGE-add_executable.cmake | 1 + .../COMPILE_LANGUAGE-add_library-result.txt | 1 + .../COMPILE_LANGUAGE-add_library-stderr.txt | 10 ++++++++++ .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake | 1 + .../COMPILE_LANGUAGE-add_test-result.txt | 1 + .../COMPILE_LANGUAGE-add_test-stderr.txt | 10 ++++++++++ .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake | 5 +++++ .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt | 1 + .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt | 8 ++++++++ .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake | 5 +++++ .../COMPILE_LANGUAGE-target_sources-result.txt | 1 + .../COMPILE_LANGUAGE-target_sources-stderr.txt | 10 ++++++++++ .../COMPILE_LANGUAGE-target_sources.cmake | 2 ++ .../GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake | 4 ++++ Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake | 10 ++++++++++ Tests/RunCMake/GenEx-COMPILE_LANGUAGE/empty.c | 0 .../COMPILE_LANGUAGE-add_custom_command-result.txt | 1 - .../COMPILE_LANGUAGE-add_custom_command-stderr.txt | 10 ---------- .../COMPILE_LANGUAGE-add_custom_command.cmake | 4 ---- .../COMPILE_LANGUAGE-add_custom_target-result.txt | 1 - .../COMPILE_LANGUAGE-add_custom_target-stderr.txt | 10 ---------- .../COMPILE_LANGUAGE-add_custom_target.cmake | 3 --- .../COMPILE_LANGUAGE-add_executable-result.txt | 1 - .../COMPILE_LANGUAGE-add_executable-stderr.txt | 10 ---------- .../GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake | 1 - .../COMPILE_LANGUAGE-add_library-result.txt | 1 - .../COMPILE_LANGUAGE-add_library-stderr.txt | 10 ---------- .../GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake | 1 - .../GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt | 1 - .../GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt | 10 ---------- .../GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake | 5 ----- .../GeneratorExpression/COMPILE_LANGUAGE-install-result.txt | 1 - .../GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt | 8 -------- .../GeneratorExpression/COMPILE_LANGUAGE-install.cmake | 5 ----- .../COMPILE_LANGUAGE-target_sources-result.txt | 1 - .../COMPILE_LANGUAGE-target_sources-stderr.txt | 10 ---------- .../GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake | 2 -- .../GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake | 4 ---- Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 8 -------- 49 files changed, 114 insertions(+), 108 deletions(-) create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/GenEx-COMPILE_LANGUAGE/empty.c delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake delete mode 100644 Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 8bb1f27..bf73b91 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -219,6 +219,7 @@ endif() if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom") add_RunCMake_test(GenerateExportHeader) endif() +add_RunCMake_test(GenEx-COMPILE_LANGUAGE) add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorInstance) add_RunCMake_test(GeneratorPlatform) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt new file mode 100644 index 0000000..74b3ff8 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.3) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt new file mode 100644 index 0000000..c8f773a --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-add_custom_command.cmake:2 \(add_custom_command\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_command.cmake new file mode 100644 index 0000000..c3f051a --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-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_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt new file mode 100644 index 0000000..7025838 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-add_custom_target.cmake:1 \(add_custom_target\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake new file mode 100644 index 0000000..b826772 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_custom_target.cmake @@ -0,0 +1,3 @@ +add_custom_target(drive + COMMAND ${CMAKE_COMMAND} -E echo $ +) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt new file mode 100644 index 0000000..8d05e59 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-add_executable.cmake:1 \(add_executable\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake new file mode 100644 index 0000000..ff965a9 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_executable.cmake @@ -0,0 +1 @@ +add_executable(empty empty.$) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt new file mode 100644 index 0000000..2ac9b76 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-add_library.cmake:1 \(add_library\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake new file mode 100644 index 0000000..dd1b5a2 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_library.cmake @@ -0,0 +1 @@ +add_library(empty empty.$) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt new file mode 100644 index 0000000..fd8a731 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-add_test.cmake:5 \(add_test\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-add_test.cmake new file mode 100644 index 0000000..deedf65 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-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_LANGUAGE/COMPILE_LANGUAGE-install-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt new file mode 100644 index 0000000..bef7f63 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install-stderr.txt @@ -0,0 +1,8 @@ +CMake Error: + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake new file mode 100644 index 0000000..92c20e3 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-install.cmake @@ -0,0 +1,5 @@ + +install(FILES + empty.$ + DESTINATION src +) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt new file mode 100644 index 0000000..8e7f881 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at COMPILE_LANGUAGE-target_sources.cmake:2 \(target_sources\): + Error evaluating generator expression: + + \$ + + \$ may only be used to specify include directories, + compile definitions, compile options, and to evaluate components of the + file\(GENERATE\) command. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake new file mode 100644 index 0000000..a4a5abb --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-target_sources.cmake @@ -0,0 +1,2 @@ +add_library(empty) +target_sources(empty PRIVATE empty.$) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-unknown-lang.cmake new file mode 100644 index 0000000..00dd290 --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/COMPILE_LANGUAGE-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_LANGUAGE/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake new file mode 100644 index 0000000..6691fdf --- /dev/null +++ b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/RunCMakeTest.cmake @@ -0,0 +1,10 @@ +include(RunCMake) + +run_cmake(COMPILE_LANGUAGE-add_custom_target) +run_cmake(COMPILE_LANGUAGE-add_custom_command) +run_cmake(COMPILE_LANGUAGE-install) +run_cmake(COMPILE_LANGUAGE-target_sources) +run_cmake(COMPILE_LANGUAGE-add_executable) +run_cmake(COMPILE_LANGUAGE-add_library) +run_cmake(COMPILE_LANGUAGE-add_test) +run_cmake(COMPILE_LANGUAGE-unknown-lang) diff --git a/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/empty.c b/Tests/RunCMake/GenEx-COMPILE_LANGUAGE/empty.c new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt deleted file mode 100644 index c8f773a..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-add_custom_command.cmake:2 \(add_custom_command\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_command.cmake deleted file mode 100644 index c3f051a..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-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_LANGUAGE-add_custom_target-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt deleted file mode 100644 index 7025838..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-add_custom_target.cmake:1 \(add_custom_target\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake deleted file mode 100644 index b826772..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_custom_target.cmake +++ /dev/null @@ -1,3 +0,0 @@ -add_custom_target(drive - COMMAND ${CMAKE_COMMAND} -E echo $ -) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt deleted file mode 100644 index 8d05e59..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-add_executable.cmake:1 \(add_executable\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake deleted file mode 100644 index ff965a9..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_executable.cmake +++ /dev/null @@ -1 +0,0 @@ -add_executable(empty empty.$) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt deleted file mode 100644 index 2ac9b76..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-add_library.cmake:1 \(add_library\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake deleted file mode 100644 index dd1b5a2..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_library.cmake +++ /dev/null @@ -1 +0,0 @@ -add_library(empty empty.$) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt deleted file mode 100644 index fd8a731..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-add_test.cmake:5 \(add_test\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-add_test.cmake deleted file mode 100644 index deedf65..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-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_LANGUAGE-install-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt deleted file mode 100644 index bef7f63..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install-stderr.txt +++ /dev/null @@ -1,8 +0,0 @@ -CMake Error: - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake deleted file mode 100644 index 92c20e3..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-install.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -install(FILES - empty.$ - DESTINATION src -) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt deleted file mode 100644 index 8e7f881..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources-stderr.txt +++ /dev/null @@ -1,10 +0,0 @@ -CMake Error at COMPILE_LANGUAGE-target_sources.cmake:2 \(target_sources\): - Error evaluating generator expression: - - \$ - - \$ may only be used to specify include directories, - compile definitions, compile options, and to evaluate components of the - file\(GENERATE\) command. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake deleted file mode 100644 index a4a5abb..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-target_sources.cmake +++ /dev/null @@ -1,2 +0,0 @@ -add_library(empty) -target_sources(empty PRIVATE empty.$) diff --git a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake b/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-unknown-lang.cmake deleted file mode 100644 index 00dd290..0000000 --- a/Tests/RunCMake/GeneratorExpression/COMPILE_LANGUAGE-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 7d3c22b..07901ac 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_LANGUAGE-add_custom_target) -run_cmake(COMPILE_LANGUAGE-add_custom_command) -run_cmake(COMPILE_LANGUAGE-install) -run_cmake(COMPILE_LANGUAGE-target_sources) -run_cmake(COMPILE_LANGUAGE-add_executable) -run_cmake(COMPILE_LANGUAGE-add_library) -run_cmake(COMPILE_LANGUAGE-add_test) -run_cmake(COMPILE_LANGUAGE-unknown-lang) 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) -- cgit v0.12