z_vcpkg_function_arguments

Warning

This is an internal helper function used internally to implement vcpkg. 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_vcpkg_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.

Form ARGV z_vcpkg_function_arguments()
fun(A B) "A;B" "A;B"
fun("A;B") "A;B" "A\;B"

Examples

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

Source

scripts/cmake/z_vcpkg_function_arguments.cmake