From 039db8f484a8ebada3263c8c850b36082131b9d2 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 11 Apr 2018 10:42:10 +0200 Subject: [PATCH] Fix typo with arguments --- chapters/basics/functions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapters/basics/functions.md b/chapters/basics/functions.md index bbecfb5..5afacfd 100644 --- a/chapters/basics/functions.md +++ b/chapters/basics/functions.md @@ -83,7 +83,7 @@ simple(This) message("Output: ${This}") ``` -If you want positional arguments, they are listed explicitly, and all other arguments are collected in `ARGV`. You have to work around the fact that CMake does not have return values by setting variables. In the example above, you can explicitly give a variable name to set. +If you want positional arguments, they are listed explicitly, and all other arguments are collected in `ARGN` (`ARGV` holds all arguments, even the ones you list). You have to work around the fact that CMake does not have return values by setting variables. In the example above, you can explicitly give a variable name to set. ## Arguments @@ -96,6 +96,7 @@ cmake_parse_arguments( "SINGLE;ANOTHER" "ONE_VALUE;ALSO_ONE_VALUE" "MULTI_VALUES" + ${ARGN} ) endfunction()