diff options
author | Brad King <brad.king@kitware.com> | 2020-09-21 17:51:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-29 21:12:33 (GMT) |
commit | e8b0359a4318bb682c96e527de7ed7f5be02c38f (patch) | |
tree | 5ea4137b78124e4619bb4aff1856a04b729f93fd /Tests/RunCMake/cmake_language | |
parent | 98805494055f8fb4afc2da9f96a487987333981a (diff) | |
download | CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.zip CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.gz CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.bz2 |
cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
Diffstat (limited to 'Tests/RunCMake/cmake_language')
125 files changed, 417 insertions, 0 deletions
diff --git a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake index 29a4d23..6480b2e 100644 --- a/Tests/RunCMake/cmake_language/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_language/RunCMakeTest.cmake @@ -32,3 +32,53 @@ run_cmake(eval_message_fatal_error) run_cmake(eval_no_code) run_cmake(eval_no_parameters) run_cmake(eval_variable_outside_message) +run_cmake(defer_call) +run_cmake(defer_call_add_subdirectory) +run_cmake(defer_call_enable_language) +run_cmake(defer_call_ids) +foreach(command IN ITEMS + "function" "endfunction" + "macro" "endmacro" + "if" "elseif" "else" "endif" + "while" "endwhile" + "foreach" "endforeach" + "return" + ) + message(STATUS "Running defer_call_invalid_command for ${command}...") + run_cmake_with_options(defer_call_invalid_command -Dcommand=${command}) +endforeach() +run_cmake(defer_call_invalid_directory) +run_cmake(defer_call_error) +run_cmake(defer_call_missing_directory) +run_cmake(defer_call_policy_PUSH) +run_cmake(defer_call_syntax_error) +run_cmake_with_options(defer_call_trace --trace-expand) +run_cmake_with_options(defer_call_trace_json --trace --trace-format=json-v1) +run_cmake(defer_cancel_call_unknown_argument) +run_cmake(defer_cancel_call_invalid_directory) +run_cmake(defer_cancel_call_id) +run_cmake(defer_cancel_call_id_var) +run_cmake(defer_directory_empty) +run_cmake(defer_directory_missing) +run_cmake(defer_directory_multiple) +run_cmake(defer_id_empty) +run_cmake(defer_id_missing) +run_cmake(defer_id_multiple) +run_cmake(defer_id_var_empty) +run_cmake(defer_id_var_missing) +run_cmake(defer_id_var_multiple) +run_cmake(defer_get_call_ids_missing_var) +run_cmake(defer_get_call_ids_too_many_args) +run_cmake(defer_get_call_ids_invalid_directory) +run_cmake(defer_get_call_ids_id) +run_cmake(defer_get_call_ids_id_var) +run_cmake(defer_get_call_missing_id) +run_cmake(defer_get_call_missing_var) +run_cmake(defer_get_call_too_many_args) +run_cmake(defer_get_call_id_empty) +run_cmake(defer_get_call_unknown_argument) +run_cmake(defer_get_call_id) +run_cmake(defer_get_call_id_var) +run_cmake(defer_missing_arg) +run_cmake(defer_missing_call) +run_cmake(defer_unknown_option) diff --git a/Tests/RunCMake/cmake_language/defer_call-stderr.txt b/Tests/RunCMake/cmake_language/defer_call-stderr.txt new file mode 100644 index 0000000..7e8d8ca --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call-stderr.txt @@ -0,0 +1,15 @@ +^CMake Deprecation Warning at defer_call/CMakeLists.txt:[0-9]+ \(cmake_policy\): + The OLD behavior for policy CMP0053 will be removed from a future version + of CMake. + + The cmake-policies\(7\) manual explains that the OLD behaviors of all + policies are deprecated and that a policy should be set to OLD only under + specific short-term circumstances. Projects should be ported to the NEW + behavior and not rely on setting a policy to OLD. ++ +CMake Warning at defer_call/CMakeLists.txt:3 \(message\): + Double-Deferred Warning In Subdirectory: + + '[^']*/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt:DEFERRED:id3' +Call Stack \(most recent call first\): + defer_call/CMakeLists.txt:DEFERRED$ diff --git a/Tests/RunCMake/cmake_language/defer_call-stdout.txt b/Tests/RunCMake/cmake_language/defer_call-stdout.txt new file mode 100644 index 0000000..fcf9f29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call-stdout.txt @@ -0,0 +1,8 @@ +-- Immediate Message In Subdirectory: ids='__0;__1' +-- Deferred Message In Subdirectory: '[^']*/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt:DEFERRED:id1' +-- Deferred Message In Included File: '[^']*/Tests/RunCMake/cmake_language/defer_call/include.cmake:1' +-- Immediate Message: ids='__0;__1;__2;__3;__4' +-- First Deferred Message +-- Deferred Message From Subdirectory +-- Deferred Message: ids='__4;__5' +-- Final Deferred Message diff --git a/Tests/RunCMake/cmake_language/defer_call.cmake b/Tests/RunCMake/cmake_language/defer_call.cmake new file mode 100644 index 0000000..2e9595f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call.cmake @@ -0,0 +1,12 @@ +set(message_command "message") +set(final_message "This should not be printed because variable evaluation is deferred too.") +cmake_language(DEFER CALL ${message_command} STATUS "First Deferred Message") +add_subdirectory(defer_call) +cmake_language(DEFER CALL cmake_language DEFER CALL "${final_message_command}" STATUS "${final_message}") +cmake_language(DEFER CALL cmake_language DEFER GET_CALL_IDS ids) +cmake_language(DEFER CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]]) +cmake_language(DEFER GET_CALL_IDS ids) +message(STATUS "Immediate Message: ids='${ids}'") +set(final_message_command "message") +set(final_message "Final Deferred Message") +set(subdir_message "Deferred Message From Subdirectory") diff --git a/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt new file mode 100644 index 0000000..544b9f4 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_policy(SET CMP0053 OLD) +cmake_language(DEFER ID id1 CALL message STATUS "Deferred Message In Subdirectory: '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'") +cmake_language(DEFER ID id2 CALL + cmake_language DEFER ID id3 CALL + message WARNING "Double-Deferred Warning In Subdirectory:\n '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'") +cmake_language(DEFER ID id4 CALL include "${CMAKE_CURRENT_LIST_DIR}/include.cmake") + +set(subdir_message "This should not be printed because variable evaluation is in deferred scope.") +cmake_language(DEFER DIRECTORY .. CALL message STATUS "${subdir_message}") +cmake_language(DEFER DIRECTORY .. GET_CALL_IDS ids) +message(STATUS "Immediate Message In Subdirectory: ids='${ids}'") diff --git a/Tests/RunCMake/cmake_language/defer_call/include.cmake b/Tests/RunCMake/cmake_language/defer_call/include.cmake new file mode 100644 index 0000000..272c61b --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call/include.cmake @@ -0,0 +1 @@ +message(STATUS "Deferred Message In Included File: '${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}'") diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt new file mode 100644 index 0000000..ec20b8f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_call_add_subdirectory.cmake:1 \(add_subdirectory\): + Subdirectories may not be created during deferred execution. +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED ++ +CMake Error at defer_call_add_subdirectory.cmake:2 \(subdirs\): + Subdirectories may not be created during deferred execution. +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED$ diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake new file mode 100644 index 0000000..6b7ee63 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory.cmake @@ -0,0 +1,2 @@ +cmake_language(DEFER CALL add_subdirectory defer_call_add_subdirectory) +cmake_language(DEFER CALL subdirs defer_call_add_subdirectory) diff --git a/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_add_subdirectory/CMakeLists.txt diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt b/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_enable_language-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt new file mode 100644 index 0000000..65a0b99 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_enable_language-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_call_enable_language.cmake:1 \(enable_language\): + Languages may not be enabled during deferred execution. +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED ++ +CMake Error at defer_call_enable_language.cmake:2 \(project\): + Languages may not be enabled during deferred execution. +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED$ diff --git a/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake b/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake new file mode 100644 index 0000000..eb43f80 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_enable_language.cmake @@ -0,0 +1,2 @@ +cmake_language(DEFER CALL enable_language C) +cmake_language(DEFER CALL project foo C) diff --git a/Tests/RunCMake/cmake_language/defer_call_error-result.txt b/Tests/RunCMake/cmake_language/defer_call_error-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_error-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt new file mode 100644 index 0000000..63ce145 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_error-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_call_error.cmake:2 \(message\): + Deferred Error +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED ++ +CMake Error at defer_call_error/CMakeLists.txt:2 \(message\): + Deferred Error from Subdirectory +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED$ diff --git a/Tests/RunCMake/cmake_language/defer_call_error.cmake b/Tests/RunCMake/cmake_language/defer_call_error.cmake new file mode 100644 index 0000000..083e82a --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_error.cmake @@ -0,0 +1,3 @@ +# Error message backtrace points here but call stack shows DEFERRED execution. +cmake_language(DEFER CALL message SEND_ERROR "Deferred Error") +add_subdirectory(defer_call_error) diff --git a/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt new file mode 100644 index 0000000..0acac69 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_error/CMakeLists.txt @@ -0,0 +1,2 @@ +# Error message backtrace points here but call stack shows DEFERRED execution in parent. +cmake_language(DEFER DIRECTORY .. CALL message SEND_ERROR "Deferred Error from Subdirectory") diff --git a/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt new file mode 100644 index 0000000..2fd194d --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_ids-stdout.txt @@ -0,0 +1,13 @@ +-- Immediate Message: ids='message0;getCallIds1;messageIds1;cancelCall;getCallIds2;messageIds2;toBeCancelled;message3' +-- Immediate Message: message0='message;STATUS;First Deferred Message' +-- Immediate Message: getCallIds1='cmake_language;DEFER;GET_CALL_IDS;ids' +-- Immediate Message: messageIds1='cmake_language;EVAL;CODE;message\(STATUS "Deferred Message: ids='\${ids}'"\)' +-- Immediate Message: cancelCall='cmake_language;DEFER;CANCEL_CALL;toBeCancelled' +-- Immediate Message: getCallIds2='cmake_language;DEFER;GET_CALL_IDS;ids' +-- Immediate Message: messageIds2='cmake_language;EVAL;CODE;message\(STATUS "Deferred Message: ids='\${ids}'"\)' +-- Immediate Message: toBeCancelled='message;STATUS;Cancelled Message' +-- Immediate Message: message3='message;STATUS;Final Deferred Message' +-- First Deferred Message +-- Deferred Message: ids='messageIds1;cancelCall;getCallIds2;messageIds2;toBeCancelled;message3' +-- Deferred Message: ids='messageIds2;message3' +-- Final Deferred Message diff --git a/Tests/RunCMake/cmake_language/defer_call_ids.cmake b/Tests/RunCMake/cmake_language/defer_call_ids.cmake new file mode 100644 index 0000000..2874894 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_ids.cmake @@ -0,0 +1,14 @@ +cmake_language(DEFER ID message0 CALL message STATUS "First Deferred Message") +cmake_language(DEFER ID getCallIds1 CALL cmake_language DEFER GET_CALL_IDS ids) +cmake_language(DEFER ID messageIds1 CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]]) +cmake_language(DEFER ID cancelCall CALL cmake_language DEFER CANCEL_CALL toBeCancelled) +cmake_language(DEFER ID getCallIds2 CALL cmake_language DEFER GET_CALL_IDS ids) +cmake_language(DEFER ID messageIds2 CALL cmake_language EVAL CODE [[message(STATUS "Deferred Message: ids='${ids}'")]]) +cmake_language(DEFER ID toBeCancelled CALL message STATUS "Cancelled Message") +cmake_language(DEFER ID message3 CALL message STATUS "Final Deferred Message") +cmake_language(DEFER GET_CALL_IDS ids) +message(STATUS "Immediate Message: ids='${ids}'") +foreach(id ${ids}) + cmake_language(DEFER GET_CALL ${id} call) + message(STATUS "Immediate Message: ${id}='${call}'") +endforeach() diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt new file mode 100644 index 0000000..4cdbf0c --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_call_invalid_command.cmake:1 \(cmake_language\): + cmake_language invalid command specified: [A-Za-z_]+ +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake b/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake new file mode 100644 index 0000000..d6cc936 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_command.cmake @@ -0,0 +1 @@ +cmake_language(DEFER CALL ${command}) diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt new file mode 100644 index 0000000..afe9a0e --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_call_invalid_directory.cmake:2 \(cmake_language\): + cmake_language DEFER CALL may not be scheduled in directory: + + [^ +]*/Tests/RunCMake/cmake_language/defer_call_invalid_directory-build/defer_call_invalid_directory + + at this time. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake new file mode 100644 index 0000000..cc1eb8d --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory.cmake @@ -0,0 +1,2 @@ +add_subdirectory(defer_call_invalid_directory) +cmake_language(DEFER DIRECTORY defer_call_invalid_directory CALL message "Should not be allowed.") diff --git a/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_invalid_directory/CMakeLists.txt diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt b/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt new file mode 100644 index 0000000..db4f90e --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_call_missing_directory.cmake:1 \(cmake_language\): + cmake_language DEFER DIRECTORY: + + [^ +]*/Tests/RunCMake/cmake_language/does_not_exist + + is not known. It may not have been processed yet. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake b/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake new file mode 100644 index 0000000..01f4c40 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_missing_directory.cmake @@ -0,0 +1 @@ +cmake_language(DEFER DIRECTORY does_not_exist CALL message "Should not be allowed.") diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt new file mode 100644 index 0000000..923be13 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error at CMakeLists.txt:DEFERRED: + cmake_policy PUSH without matching POP$ diff --git a/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake new file mode 100644 index 0000000..66cb760 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_policy_PUSH.cmake @@ -0,0 +1 @@ +cmake_language(DEFER CALL cmake_policy PUSH) diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt b/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt new file mode 100644 index 0000000..80db4aa --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error-stderr.txt @@ -0,0 +1,13 @@ +^CMake Error at defer_call_syntax_error.cmake:2 \(message\): + Syntax error in cmake code at + + [^ +]*/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake:2 + + when parsing string + + Deferred \\X Error + + Invalid character escape '\\X'. +Call Stack \(most recent call first\): + CMakeLists.txt:DEFERRED$ diff --git a/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake b/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake new file mode 100644 index 0000000..c3c044b --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_syntax_error.cmake @@ -0,0 +1,2 @@ +# Argument syntax error evaluated at deferred call site. +cmake_language(DEFER CALL message "Deferred \X Error") diff --git a/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt new file mode 100644 index 0000000..b61b236 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_trace-stderr.txt @@ -0,0 +1,8 @@ +[^ +]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(2\): cmake_language\(DEFER CALL message Deferred Message \) +[^ +]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(3\): message\(Immediate Message \) +Immediate Message +[^ +]*/Tests/RunCMake/cmake_language/defer_call_trace.cmake\(2\):DEFERRED:__0: message\(Deferred Message \) +Deferred Message$ diff --git a/Tests/RunCMake/cmake_language/defer_call_trace.cmake b/Tests/RunCMake/cmake_language/defer_call_trace.cmake new file mode 100644 index 0000000..5ed383f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_trace.cmake @@ -0,0 +1,3 @@ +# The --trace and --trace-expand output point here for deferred call. +cmake_language(DEFER CALL message "Deferred Message") +message("Immediate Message") diff --git a/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt b/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt new file mode 100644 index 0000000..647beb0 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_trace_json-stderr.txt @@ -0,0 +1,5 @@ +{"args":\["DEFER","CALL","message","Deferred Message"\],"cmd":"cmake_language","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":2,"line":2,"time":[0-9.]+} +{"args":\["Immediate Message"\],"cmd":"message","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":2,"line":3,"time":[0-9.]+} +Immediate Message +{"args":\["Deferred Message"],"cmd":"message","defer":"__0","file":"[^"]*/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake","frame":1,"line":2,"time":[0-9.]+} +Deferred Message$ diff --git a/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake b/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake new file mode 100644 index 0000000..5ed383f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_call_trace_json.cmake @@ -0,0 +1,3 @@ +# The --trace and --trace-expand output point here for deferred call. +cmake_language(DEFER CALL message "Deferred Message") +message("Immediate Message") diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt new file mode 100644 index 0000000..8a13c0d --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_cancel_call_id.cmake:1 \(cmake_language\): + cmake_language DEFER CANCEL_CALL does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake new file mode 100644 index 0000000..6e5b5c8 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID id CANCEL_CALL) diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt new file mode 100644 index 0000000..5783c50 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_cancel_call_id_var.cmake:1 \(cmake_language\): + cmake_language DEFER CANCEL_CALL does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake new file mode 100644 index 0000000..9f75221 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_id_var.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR id_var CANCEL_CALL) diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt new file mode 100644 index 0000000..cacbf9a --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_cancel_call_invalid_directory.cmake:2 \(cmake_language\): + cmake_language DEFER CANCEL_CALL may not update directory: + + [^ +]*/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory-build/defer_cancel_call_invalid_directory + + at this time. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake new file mode 100644 index 0000000..29a8fc2 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory.cmake @@ -0,0 +1,2 @@ +add_subdirectory(defer_cancel_call_invalid_directory) +cmake_language(DEFER DIRECTORY defer_cancel_call_invalid_directory CANCEL_CALL _) diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_invalid_directory/CMakeLists.txt diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt new file mode 100644 index 0000000..eb8f2b9 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at defer_cancel_call_unknown_argument.cmake:1 \(cmake_language\): + cmake_language DEFER CANCEL_CALL unknown argument: + + UNKNOWN +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake new file mode 100644 index 0000000..fbc6309 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_cancel_call_unknown_argument.cmake @@ -0,0 +1 @@ +cmake_language(DEFER CANCEL_CALL UNKNOWN) diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt b/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_empty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt new file mode 100644 index 0000000..587dfa9 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_empty-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_directory_empty.cmake:1 \(cmake_language\): + cmake_language DEFER DIRECTORY may not be empty +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_directory_empty.cmake b/Tests/RunCMake/cmake_language/defer_directory_empty.cmake new file mode 100644 index 0000000..f4e4553 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_empty.cmake @@ -0,0 +1 @@ +cmake_language(DEFER DIRECTORY "") diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt b/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_missing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt new file mode 100644 index 0000000..1db8e99 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_missing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_directory_missing.cmake:1 \(cmake_language\): + cmake_language DEFER DIRECTORY missing value +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_directory_missing.cmake b/Tests/RunCMake/cmake_language/defer_directory_missing.cmake new file mode 100644 index 0000000..fbdb177 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_missing.cmake @@ -0,0 +1 @@ +cmake_language(DEFER DIRECTORY) diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_multiple-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt new file mode 100644 index 0000000..f4d09b9 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_multiple-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_directory_multiple.cmake:1 \(cmake_language\): + cmake_language DEFER given multiple DIRECTORY arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake b/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake new file mode 100644 index 0000000..baf037b --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_directory_multiple.cmake @@ -0,0 +1 @@ +cmake_language(DEFER DIRECTORY . DIRECTORY x CALL message "Should not be allowed.") diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt new file mode 100644 index 0000000..e161a5f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_id.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id.cmake new file mode 100644 index 0000000..7a395ea --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID id GET_CALL) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt new file mode 100644 index 0000000..c7c534b --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_id_empty.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL id may not be empty +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake new file mode 100644 index 0000000..4f39f2d --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_empty.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL "" var) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt new file mode 100644 index 0000000..2cfd942 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_id_var.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake new file mode 100644 index 0000000..ade0815 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_id_var.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR id_var GET_CALL) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt new file mode 100644 index 0000000..072ee45 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_ids_id.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL_IDS does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake new file mode 100644 index 0000000..4eb2555 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID id GET_CALL_IDS) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt new file mode 100644 index 0000000..e4a288c --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_ids_id_var.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL_IDS does not accept ID or ID_VAR. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake new file mode 100644 index 0000000..c27de79 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_id_var.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR id_var GET_CALL_IDS) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt new file mode 100644 index 0000000..edebe32 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-stderr.txt @@ -0,0 +1,9 @@ +^CMake Error at defer_get_call_ids_invalid_directory.cmake:2 \(cmake_language\): + cmake_language DEFER GET_CALL_IDS may not access directory: + + [^ +]*/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory-build/defer_get_call_ids_invalid_directory + + at this time. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake new file mode 100644 index 0000000..81f098e --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory.cmake @@ -0,0 +1,2 @@ +add_subdirectory(defer_get_call_ids_invalid_directory) +cmake_language(DEFER DIRECTORY defer_get_call_ids_invalid_directory GET_CALL_IDS var) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_invalid_directory/CMakeLists.txt diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt new file mode 100644 index 0000000..a2951cf --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_ids_missing_var.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL_IDS missing output variable +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake new file mode 100644 index 0000000..b171f04 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_missing_var.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL_IDS) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt new file mode 100644 index 0000000..5691519 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_ids_too_many_args.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL_IDS given too many arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake new file mode 100644 index 0000000..0158684 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_ids_too_many_args.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL_IDS var extra) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt new file mode 100644 index 0000000..081aa95 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_missing_id.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL missing id +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake b/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake new file mode 100644 index 0000000..0542abc --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_id.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt new file mode 100644 index 0000000..1b2641f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_missing_var.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL missing output variable +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake b/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake new file mode 100644 index 0000000..7916d29 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_missing_var.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL id) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt new file mode 100644 index 0000000..b6ee2d6 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_get_call_too_many_args.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL given too many arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake new file mode 100644 index 0000000..ed65779 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_too_many_args.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL id var extra) diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt new file mode 100644 index 0000000..ac16596 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at defer_get_call_unknown_argument.cmake:1 \(cmake_language\): + cmake_language DEFER GET_CALL unknown argument: + + UNKNOWN +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake new file mode 100644 index 0000000..d0caa39 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_get_call_unknown_argument.cmake @@ -0,0 +1 @@ +cmake_language(DEFER GET_CALL UNKNOWN var) diff --git a/Tests/RunCMake/cmake_language/defer_id_empty-result.txt b/Tests/RunCMake/cmake_language/defer_id_empty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_empty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt new file mode 100644 index 0000000..1e7f772 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_empty-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_empty.cmake:1 \(cmake_language\): + cmake_language DEFER ID may not be empty +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_empty.cmake b/Tests/RunCMake/cmake_language/defer_id_empty.cmake new file mode 100644 index 0000000..326762c --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_empty.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID "") diff --git a/Tests/RunCMake/cmake_language/defer_id_missing-result.txt b/Tests/RunCMake/cmake_language/defer_id_missing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_missing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt new file mode 100644 index 0000000..cef5f0e --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_missing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_missing.cmake:1 \(cmake_language\): + cmake_language DEFER ID missing value +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_missing.cmake b/Tests/RunCMake/cmake_language/defer_id_missing.cmake new file mode 100644 index 0000000..4de687d --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_missing.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID) diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_multiple-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt new file mode 100644 index 0000000..1725521 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_multiple-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_multiple.cmake:1 \(cmake_language\): + cmake_language DEFER given multiple ID arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_multiple.cmake b/Tests/RunCMake/cmake_language/defer_id_multiple.cmake new file mode 100644 index 0000000..69187af --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_multiple.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID a ID b CALL message "Should not be allowed.") diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_empty-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt new file mode 100644 index 0000000..bb5cd43 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_empty-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_var_empty.cmake:1 \(cmake_language\): + cmake_language DEFER ID_VAR may not be empty +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake b/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake new file mode 100644 index 0000000..c7198f5 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_empty.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR "") diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_missing-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt new file mode 100644 index 0000000..f4e0d6e --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_missing-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_var_missing.cmake:1 \(cmake_language\): + cmake_language DEFER ID_VAR missing variable name +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake b/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake new file mode 100644 index 0000000..359d149 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_missing.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR) diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt b/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt b/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt new file mode 100644 index 0000000..4368b06 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_id_var_multiple.cmake:1 \(cmake_language\): + cmake_language DEFER given multiple ID_VAR arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake b/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake new file mode 100644 index 0000000..665ea94 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_id_var_multiple.cmake @@ -0,0 +1 @@ +cmake_language(DEFER ID_VAR a ID_VAR b CALL message "Should not be allowed.") diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt b/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_arg-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt b/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt new file mode 100644 index 0000000..3e656cd --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_arg-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_missing_arg.cmake:1 \(cmake_language\): + cmake_language DEFER requires at least one argument +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_missing_arg.cmake b/Tests/RunCMake/cmake_language/defer_missing_arg.cmake new file mode 100644 index 0000000..737a8c8 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_arg.cmake @@ -0,0 +1 @@ +cmake_language(DEFER) diff --git a/Tests/RunCMake/cmake_language/defer_missing_call-result.txt b/Tests/RunCMake/cmake_language/defer_missing_call-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_call-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt b/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt new file mode 100644 index 0000000..7eeef76 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_call-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at defer_missing_call.cmake:1 \(cmake_language\): + cmake_language DEFER must be followed by a CALL argument +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_missing_call.cmake b/Tests/RunCMake/cmake_language/defer_missing_call.cmake new file mode 100644 index 0000000..0b330ef --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_missing_call.cmake @@ -0,0 +1 @@ +cmake_language(DEFER DIRECTORY .) diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt b/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_unknown_option-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt b/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt new file mode 100644 index 0000000..95d87c6 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_unknown_option-stderr.txt @@ -0,0 +1,6 @@ +^CMake Error at defer_unknown_option.cmake:1 \(cmake_language\): + cmake_language DEFER unknown option: + + UNKNOWN +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/cmake_language/defer_unknown_option.cmake b/Tests/RunCMake/cmake_language/defer_unknown_option.cmake new file mode 100644 index 0000000..876b3f1 --- /dev/null +++ b/Tests/RunCMake/cmake_language/defer_unknown_option.cmake @@ -0,0 +1 @@ +cmake_language(DEFER UNKNOWN) |