diff options
Diffstat (limited to 'Tests/RunCMake')
3 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake index 2b6e7a2..0f12b80 100644 --- a/Tests/RunCMake/cmake_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/cmake_command/RunCMakeTest.cmake @@ -5,6 +5,7 @@ run_cmake(cmake_command_unknown_meta_operation) 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_message) run_cmake(cmake_command_eval_message_fatal_error) diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments-stderr.txt b/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments-stderr.txt new file mode 100644 index 0000000..4670e60 --- /dev/null +++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments-stderr.txt @@ -0,0 +1,6 @@ +foo\(...\) +\[a;b\] +\[c;d\] +cmake_command\(INVOKE foo ...\) +\[a;b\] +\[c;d\] diff --git a/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments.cmake b/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments.cmake new file mode 100644 index 0000000..53ac2e6 --- /dev/null +++ b/Tests/RunCMake/cmake_command/cmake_command_invoke_preserve_arguments.cmake @@ -0,0 +1,12 @@ +function(foo arg1 arg2) + math(EXPR last "${ARGC} - 1") + foreach(i RANGE 0 ${last}) + message("[${ARGV${i}}]") + endforeach() +endfunction() + +message("foo(...)") +foo("a;b" "c;d") + +message("cmake_command(INVOKE foo ...)") +cmake_command(INVOKE foo "a;b" "c;d") |