Skip to content

Commit e65c632

Browse files
tejlmandfabiobaltieri
authored andcommitted
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 <[email protected]>
1 parent 809c6c3 commit e65c632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

share/sysbuild/cmake/modules/sysbuild_extensions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ function(sysbuild_add_subdirectory source_dir)
661661
" (expected at most 2, got ${ARGC})"
662662
)
663663
endif()
664-
set(binary_dir ${ARGV1})
664+
set(binary_dir ${ARGN})
665665

666666
# Update SYSBUILD_CURRENT_SOURCE_DIR in this scope, to support nesting
667667
# of sysbuild_add_subdirectory() and even regular add_subdirectory().

0 commit comments

Comments
 (0)