Skip to main content

z_kmpkg_function_arguments

warning

This is an internal helper function used internally to implement kmpkg. Behavior and arguments will change in breaking ways without notice. Do not use this function.

Get a list of function arguments suitable for perfect forwarding to another function.

Usage

z_kmpkg_function_arguments(<out-var> [<N>])

Parameters

<out-var>

The variable to set to the list of arguments

<N>

The index to start accumulating arguments.

Defaults to 0 so all arguments will be gathered.

Notes

This macro improves over ARGV by making it possible to distinguish list arguments.

FormARGVz_kmpkg_function_arguments()
fun(A B)"A;B""A;B"
fun("A;B")"A;B""A\;B"

Examples

function(fun)
z_kmpkg_function_arguments(ARGS)
message("fun() is deprecated, use fun_replacement()")
fun_replacement(${ARGS})
endfunction()

Source

scripts/cmake/z_kmpkg_function_arguments.cmake