diff options
author | Brad King <brad.king@kitware.com> | 2020-05-21 17:25:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-21 17:36:52 (GMT) |
commit | 94c1e4fdb35c01ef5ad57ed3284b20d8d7fc3496 (patch) | |
tree | b2dd5a73b5839d50fa6f5fb0af2c356b69815db5 /Tests | |
parent | 3c5d52579b271e99475873cec953a1ecccbea585 (diff) | |
download | CMake-94c1e4fdb35c01ef5ad57ed3284b20d8d7fc3496.zip CMake-94c1e4fdb35c01ef5ad57ed3284b20d8d7fc3496.tar.gz CMake-94c1e4fdb35c01ef5ad57ed3284b20d8d7fc3496.tar.bz2 |
cmake_language: Rename command from cmake_command
Also rename the `INVOKE` signature to `CALL`.
Fixes: #20732
Diffstat (limited to 'Tests')
82 files changed, 85 insertions, 86 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 230f168..0f94e4e 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -281,6 +281,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) endif() add_RunCMake_test(execute_process) add_RunCMake_test(export) +add_RunCMake_test(cmake_language) add_RunCMake_test(cmake_minimum_required) add_RunCMake_test(cmake_parse_arguments) add_RunCMake_test(continue) @@ -676,5 +677,3 @@ add_RunCMake_test("CTestCommandExpandLists") add_RunCMake_test(PrecompileHeaders -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) add_RunCMake_test("UnityBuild") - -add_RunCMake_test(cmake_command) diff --git a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake deleted file mode 100644 index a6b2efe..0000000 --- a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake +++ /dev/null @@ -1,23 +0,0 @@ -include(RunCMake) - -run_cmake(cmake_command_no_parameters) -run_cmake(cmake_command_unknown_meta_operation) -run_cmake(cmake_command_invoke_double_evaluation) -run_cmake(cmake_command_invoke_expanded_command) -run_cmake(cmake_command_invoke_expanded_command_and_arguments) -run_cmake(cmake_command_invoke_expanded_command_with_explicit_argument) -run_cmake(cmake_command_invoke_expand_command_name) -run_cmake(cmake_command_invoke_expand_function_name) -run_cmake(cmake_command_invoke_message) -run_cmake(cmake_command_invoke_message_fatal_error) -run_cmake(cmake_command_invoke_no_parameters) -run_cmake(cmake_command_invoke_preserve_arguments) -run_cmake(cmake_command_invoke_unknown_function) -run_cmake(cmake_command_eval_expand_command_name) -run_cmake(cmake_command_eval_expanded_command_and_arguments) -run_cmake(cmake_command_eval_extra_parameters_between_eval_and_code) -run_cmake(cmake_command_eval_message) -run_cmake(cmake_command_eval_message_fatal_error) -run_cmake(cmake_command_eval_no_code) -run_cmake(cmake_command_eval_no_parameters) -run_cmake(cmake_command_eval_variable_outside_message) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_expand_command_name.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_expand_command_name.cmake deleted file mode 100644 index 4cea393..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_expand_command_name.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set (my_eval "EVAL") -cmake_command (${my_eval} CODE message("OK!")) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code-stderr.txt deleted file mode 100644 index 13c114e..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error at cmake_command_eval_extra_parameters_between_eval_and_code.cmake:1 \(cmake_command\): - cmake_command called with unsupported arguments between EVAL and CODE - arguments -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code.cmake deleted file mode 100644 index 0927631..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(EVAL BAD CODE "message(BAD CODE)") diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake deleted file mode 100644 index 9ef5e25..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_message.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(EVAL CODE message(WORKS!)) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt deleted file mode 100644 index 6a8a124..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error at cmake_command_eval_message_fatal_error.cmake:1:EVAL:2 \(message\): - error! -Call Stack \(most recent call first\): - cmake_command_eval_message_fatal_error.cmake:1 \(cmake_command\) - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt deleted file mode 100644 index ee53312..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_eval_no_code.cmake:1 \(cmake_command\): - cmake_command called without CODE argument diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake deleted file mode 100644 index 22e1667..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(EVAL message "too many parameters") diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt deleted file mode 100644 index e9fc317..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_eval_no_parameters.cmake:1 \(cmake_command\): - cmake_command called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake deleted file mode 100644 index a5ba2c7..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(EVAL) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake deleted file mode 100644 index b7a06a5..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message.cmake +++ /dev/null @@ -1,2 +0,0 @@ -cmake_command(EVAL CODE "set(phrase \"WORKS!\")") -message(${phrase}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_double_evaluation.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_double_evaluation.cmake deleted file mode 100644 index 10970fc..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_double_evaluation.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(var [[${foo}]]) -cmake_command(INVOKE cmake_command INVOKE message "var='${var}'") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_command_name.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_command_name.cmake deleted file mode 100644 index d59afe4..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_command_name.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set (my_invoke "INVOKE") -cmake_command (${my_invoke} message "OK!") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments-stderr.txt deleted file mode 100644 index 6d0e241..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at cmake_command_invoke_expanded_command_and_arguments.cmake:2 \(cmake_command\): - cmake_command called with incorrect number of arguments -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments.cmake deleted file mode 100644 index 6bfa3a7..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(invoke_message INVOKE message a b) -cmake_command(${invoke_message}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_with_explicit_argument.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_with_explicit_argument.cmake deleted file mode 100644 index eb0411f..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_with_explicit_argument.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set (cmd INVOKE message) -cmake_command (${cmd} "OK!") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake deleted file mode 100644 index 336d78a..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_message.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(INVOKE message WORKS!) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt deleted file mode 100644 index 2c9dab5..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -CMake Error at cmake_command_invoke_message_fatal_error.cmake:1 \(message\): - error! -Call Stack \(most recent call first\): - cmake_command_invoke_message_fatal_error.cmake:1 \(cmake_command\) - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake deleted file mode 100644 index 6b42764..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(INVOKE message FATAL_ERROR error!) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt deleted file mode 100644 index 7741b41..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_invoke_no_parameters.cmake:1 \(cmake_command\): - cmake_command called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake deleted file mode 100644 index b9c5e14..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(INVOKE) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt deleted file mode 100644 index 50a81a3..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_invoke_unknown_function.cmake:1 \(unknown\): - Unknown CMake command "unknown". diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake deleted file mode 100644 index f19a04b..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(INVOKE unknown) diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt deleted file mode 100644 index 772b604..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_no_parameters.cmake:1 \(cmake_command\): - cmake_command called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake b/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake deleted file mode 100644 index b9c5e14..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_no_parameters.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(INVOKE) diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt deleted file mode 100644 index 7b9b915..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error at cmake_command_unknown_meta_operation.cmake:1 \(cmake_command\): - cmake_command called with unknown meta-operation diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake b/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake deleted file mode 100644 index f7c77e5..0000000 --- a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation.cmake +++ /dev/null @@ -1 +0,0 @@ -cmake_command(UNKNOWN) diff --git a/Tests/RunCMake/cmake_command/CMakeLists.txt b/Tests/RunCMake/cmake_language/CMakeLists.txt index 2632ffa..2632ffa 100644 --- a/Tests/RunCMake/cmake_command/CMakeLists.txt +++ b/Tests/RunCMake/cmake_language/CMakeLists.txt diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake new file mode 100644 index 0000000..c556e42 --- /dev/null +++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake @@ -0,0 +1,23 @@ +include(RunCMake) + +run_cmake(no_parameters) +run_cmake(unknown_meta_operation) +run_cmake(call_double_evaluation) +run_cmake(call_expanded_command) +run_cmake(call_expanded_command_and_arguments) +run_cmake(call_expanded_command_with_explicit_argument) +run_cmake(call_expand_command_name) +run_cmake(call_expand_function_name) +run_cmake(call_message) +run_cmake(call_message_fatal_error) +run_cmake(call_no_parameters) +run_cmake(call_preserve_arguments) +run_cmake(call_unknown_function) +run_cmake(eval_expand_command_name) +run_cmake(eval_expanded_command_and_arguments) +run_cmake(eval_extra_parameters_between_eval_and_code) +run_cmake(eval_message) +run_cmake(eval_message_fatal_error) +run_cmake(eval_no_code) +run_cmake(eval_no_parameters) +run_cmake(eval_variable_outside_message) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_double_evaluation-stderr.txt b/Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt index 59a70bd..59a70bd 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_double_evaluation-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_double_evaluation-stderr.txt diff --git a/Tests/RunCMake/cmake_language/call_double_evaluation.cmake b/Tests/RunCMake/cmake_language/call_double_evaluation.cmake new file mode 100644 index 0000000..cf8fc91 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_double_evaluation.cmake @@ -0,0 +1,2 @@ +set(var [[${foo}]]) +cmake_language(CALL cmake_language CALL message "var='${var}'") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_with_explicit_argument-stderr.txt b/Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt index d640661..d640661 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_with_explicit_argument-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_expand_command_name-stderr.txt diff --git a/Tests/RunCMake/cmake_language/call_expand_command_name.cmake b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake new file mode 100644 index 0000000..e03bb1f --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_expand_command_name.cmake @@ -0,0 +1,2 @@ +set (my_call "CALL") +cmake_language (${my_call} message "OK!") diff --git a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt b/Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_unknown_meta_operation-result.txt +++ b/Tests/RunCMake/cmake_language/call_expand_function_name-stderr.txt diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_function_name.cmake b/Tests/RunCMake/cmake_language/call_expand_function_name.cmake index 923ddaa..565a7df 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_function_name.cmake +++ b/Tests/RunCMake/cmake_language/call_expand_function_name.cmake @@ -8,4 +8,4 @@ endfunction() set(function_version 1) -cmake_command(INVOKE some_function_${function_version}) +cmake_language(CALL some_function_${function_version}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt index d640661..d640661 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_expanded_command-stderr.txt diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command.cmake b/Tests/RunCMake/cmake_language/call_expanded_command.cmake index bca7d2f..e76e612 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command.cmake +++ b/Tests/RunCMake/cmake_language/call_expanded_command.cmake @@ -2,5 +2,5 @@ function (itsok) message(OK!) endfunction() -set (cmd INVOKE itsok) -cmake_command (${cmd}) +set (cmd CALL itsok) +cmake_language (${cmd}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_no_parameters-result.txt +++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-result.txt diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt new file mode 100644 index 0000000..e87e9bc --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at call_expanded_command_and_arguments.cmake:2 \(cmake_language\): + cmake_language called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake new file mode 100644 index 0000000..4ce6b34 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_expanded_command_and_arguments.cmake @@ -0,0 +1,2 @@ +set(call_message CALL message a b) +cmake_language(${call_message}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_command_name-stderr.txt b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt index d640661..d640661 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_command_name-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument-stderr.txt diff --git a/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake new file mode 100644 index 0000000..0563400 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_expanded_command_with_explicit_argument.cmake @@ -0,0 +1,2 @@ +set (cmd CALL message) +cmake_language (${cmd} "OK!") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt b/Tests/RunCMake/cmake_language/call_message-stderr.txt index cfc8694..cfc8694 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_message-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_message-stderr.txt diff --git a/Tests/RunCMake/cmake_language/call_message.cmake b/Tests/RunCMake/cmake_language/call_message.cmake new file mode 100644 index 0000000..31aefdf --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_message.cmake @@ -0,0 +1 @@ +cmake_language(CALL message WORKS!) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt b/Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_unknown_function-result.txt +++ b/Tests/RunCMake/cmake_language/call_message_fatal_error-result.txt diff --git a/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt new file mode 100644 index 0000000..83eb3d8 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_message_fatal_error-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at call_message_fatal_error.cmake:1 \(message\): + error! +Call Stack \(most recent call first\): + call_message_fatal_error.cmake:1 \(cmake_language\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake b/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake new file mode 100644 index 0000000..935b437 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_message_fatal_error.cmake @@ -0,0 +1 @@ +cmake_language(CALL message FATAL_ERROR error!) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt b/Tests/RunCMake/cmake_language/call_no_parameters-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_no_parameters-result.txt +++ b/Tests/RunCMake/cmake_language/call_no_parameters-result.txt diff --git a/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt new file mode 100644 index 0000000..9e2c08f --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_no_parameters-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at call_no_parameters.cmake:1 \(cmake_language\): + cmake_language called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_language/call_no_parameters.cmake b/Tests/RunCMake/cmake_language/call_no_parameters.cmake new file mode 100644 index 0000000..8353e08 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_no_parameters.cmake @@ -0,0 +1 @@ +cmake_language(CALL) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments-stderr.txt b/Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt index 4670e60..8ec5483 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments-stderr.txt +++ b/Tests/RunCMake/cmake_language/call_preserve_arguments-stderr.txt @@ -1,6 +1,6 @@ foo\(...\) \[a;b\] \[c;d\] -cmake_command\(INVOKE foo ...\) +cmake_language\(CALL foo ...\) \[a;b\] \[c;d\] diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments.cmake b/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake index 53ac2e6..bfef0fd 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments.cmake +++ b/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake @@ -8,5 +8,5 @@ endfunction() message("foo(...)") foo("a;b" "c;d") -message("cmake_command(INVOKE foo ...)") -cmake_command(INVOKE foo "a;b" "c;d") +message("cmake_language(CALL foo ...)") +cmake_language(CALL foo "a;b" "c;d") diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt b/Tests/RunCMake/cmake_language/call_unknown_function-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_message_fatal_error-result.txt +++ b/Tests/RunCMake/cmake_language/call_unknown_function-result.txt diff --git a/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt b/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt new file mode 100644 index 0000000..d09e708 --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_unknown_function-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at call_unknown_function.cmake:1 \(unknown\): + Unknown CMake command "unknown". diff --git a/Tests/RunCMake/cmake_language/call_unknown_function.cmake b/Tests/RunCMake/cmake_language/call_unknown_function.cmake new file mode 100644 index 0000000..efd6baf --- /dev/null +++ b/Tests/RunCMake/cmake_language/call_unknown_function.cmake @@ -0,0 +1 @@ +cmake_language(CALL unknown) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_expanded_command_and_arguments-stderr.txt b/Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt index d640661..d640661 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_expanded_command_and_arguments-stderr.txt +++ b/Tests/RunCMake/cmake_language/eval_expand_command_name-stderr.txt diff --git a/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake b/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake new file mode 100644 index 0000000..2397232 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_expand_command_name.cmake @@ -0,0 +1,2 @@ +set (my_eval "EVAL") +cmake_language (${my_eval} CODE message("OK!")) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_expand_command_name-stderr.txt b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt index d640661..d640661 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_expand_command_name-stderr.txt +++ b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments-stderr.txt diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_expanded_command_and_arguments.cmake b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake index fcc399b..f7d2d51 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_expanded_command_and_arguments.cmake +++ b/Tests/RunCMake/cmake_language/eval_expanded_command_and_arguments.cmake @@ -1,2 +1,2 @@ set(cmd EVAL CODE [[message("OK!")]]) -cmake_command(${cmd}) +cmake_language(${cmd}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments-result.txt b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expanded_command_and_arguments-result.txt +++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-result.txt diff --git a/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt new file mode 100644 index 0000000..d32054f --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at eval_extra_parameters_between_eval_and_code.cmake:1 \(cmake_language\): + cmake_language called with unsupported arguments between EVAL and CODE + arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake new file mode 100644 index 0000000..7c004d7 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_extra_parameters_between_eval_and_code.cmake @@ -0,0 +1 @@ +cmake_language(EVAL BAD CODE "message(BAD CODE)") diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt b/Tests/RunCMake/cmake_language/eval_message-stderr.txt index cfc8694..cfc8694 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_variable_outside_message-stderr.txt +++ b/Tests/RunCMake/cmake_language/eval_message-stderr.txt diff --git a/Tests/RunCMake/cmake_language/eval_message.cmake b/Tests/RunCMake/cmake_language/eval_message.cmake new file mode 100644 index 0000000..91edcdd --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_message.cmake @@ -0,0 +1 @@ +cmake_language(EVAL CODE message(WORKS!)) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_function_name-stderr.txt b/Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_invoke_expand_function_name-stderr.txt +++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error-result.txt diff --git a/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt b/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt new file mode 100644 index 0000000..5cf11e3 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at eval_message_fatal_error.cmake:1:EVAL:2 \(message\): + error! +Call Stack \(most recent call first\): + eval_message_fatal_error.cmake:1 \(cmake_language\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake b/Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake index 22913de..72e155d 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error.cmake +++ b/Tests/RunCMake/cmake_language/eval_message_fatal_error.cmake @@ -1,4 +1,4 @@ -cmake_command(EVAL CODE +cmake_language(EVAL CODE " message(FATAL_ERROR error!) " diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt b/Tests/RunCMake/cmake_language/eval_no_code-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_parameters-result.txt +++ b/Tests/RunCMake/cmake_language/eval_no_code-result.txt diff --git a/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt b/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt new file mode 100644 index 0000000..608ba88 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_no_code-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at eval_no_code.cmake:1 \(cmake_language\): + cmake_language called without CODE argument diff --git a/Tests/RunCMake/cmake_language/eval_no_code.cmake b/Tests/RunCMake/cmake_language/eval_no_code.cmake new file mode 100644 index 0000000..7f5bc21 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_no_code.cmake @@ -0,0 +1 @@ +cmake_language(EVAL message "too many parameters") diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt b/Tests/RunCMake/cmake_language/eval_no_parameters-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_no_code-result.txt +++ b/Tests/RunCMake/cmake_language/eval_no_parameters-result.txt diff --git a/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt new file mode 100644 index 0000000..6166898 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_no_parameters-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at eval_no_parameters.cmake:1 \(cmake_language\): + cmake_language called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_language/eval_no_parameters.cmake b/Tests/RunCMake/cmake_language/eval_no_parameters.cmake new file mode 100644 index 0000000..e7ae808 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_no_parameters.cmake @@ -0,0 +1 @@ +cmake_language(EVAL) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt b/Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt index cfc8694..cfc8694 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_message-stderr.txt +++ b/Tests/RunCMake/cmake_language/eval_variable_outside_message-stderr.txt diff --git a/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake b/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake new file mode 100644 index 0000000..71f0457 --- /dev/null +++ b/Tests/RunCMake/cmake_language/eval_variable_outside_message.cmake @@ -0,0 +1,2 @@ +cmake_language(EVAL CODE "set(phrase \"WORKS!\")") +message(${phrase}) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt b/Tests/RunCMake/cmake_language/no_parameters-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_message_fatal_error-result.txt +++ b/Tests/RunCMake/cmake_language/no_parameters-result.txt diff --git a/Tests/RunCMake/cmake_language/no_parameters-stderr.txt b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt new file mode 100644 index 0000000..194bbe3 --- /dev/null +++ b/Tests/RunCMake/cmake_language/no_parameters-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at no_parameters.cmake:1 \(cmake_language\): + cmake_language called with incorrect number of arguments diff --git a/Tests/RunCMake/cmake_language/no_parameters.cmake b/Tests/RunCMake/cmake_language/no_parameters.cmake new file mode 100644 index 0000000..8353e08 --- /dev/null +++ b/Tests/RunCMake/cmake_language/no_parameters.cmake @@ -0,0 +1 @@ +cmake_language(CALL) diff --git a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code-result.txt b/Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/cmake_command/cmake_command_eval_extra_parameters_between_eval_and_code-result.txt +++ b/Tests/RunCMake/cmake_language/unknown_meta_operation-result.txt diff --git a/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt b/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt new file mode 100644 index 0000000..6a1d4fd --- /dev/null +++ b/Tests/RunCMake/cmake_language/unknown_meta_operation-stderr.txt @@ -0,0 +1,2 @@ +CMake Error at unknown_meta_operation.cmake:1 \(cmake_language\): + cmake_language called with unknown meta-operation diff --git a/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake b/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake new file mode 100644 index 0000000..699f36f --- /dev/null +++ b/Tests/RunCMake/cmake_language/unknown_meta_operation.cmake @@ -0,0 +1 @@ +cmake_language(UNKNOWN) |