taking inspiration from : https://cmake.org/cmake/help/v3.0/command/macro.html
I do:
macro(ARGS_TEST)
message(WARNING "\nARGN: ${ARGN}\n")
foreach(arg IN LISTS ARGN)
message(WARNING "\n ARG : ${arg} \n")
endforeach()
endmacro()
ARGS_TEST(test 1 2 3)
which prints:
ARGN: test;1;2;3
but nothing after this, meaning iteration over ARGN does not seem to be happening.
Anything I am missing ?
Answer to following question: Passing a list to a cmake macro
shows how to print the arguments as a list, but not how to iterate over them