cmake/Tests/RunCMake/cmake_language/call_preserve_arguments.cmake

13 lines
259 B
CMake
Raw Normal View History

2020-08-30 11:54:41 +02:00
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_language(CALL foo ...)")
cmake_language(CALL foo "a;b" "c;d")