sysbuild: use ARGN instead of ARGV1
Use of ARGV1 is undefined when number of arguments to function is less than 2. Therefore switch to ARGN which holds arguments beyond required arguments. If there are no optional arguments, then ARGN is just an empty list, thus making it safe to use. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
809c6c34d3
commit
e65c6328ce
1 changed files with 1 additions and 1 deletions
|
@ -661,7 +661,7 @@ function(sysbuild_add_subdirectory source_dir)
|
||||||
" (expected at most 2, got ${ARGC})"
|
" (expected at most 2, got ${ARGC})"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(binary_dir ${ARGV1})
|
set(binary_dir ${ARGN})
|
||||||
|
|
||||||
# Update SYSBUILD_CURRENT_SOURCE_DIR in this scope, to support nesting
|
# Update SYSBUILD_CURRENT_SOURCE_DIR in this scope, to support nesting
|
||||||
# of sysbuild_add_subdirectory() and even regular add_subdirectory().
|
# of sysbuild_add_subdirectory() and even regular add_subdirectory().
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue