Skip to content

Commit

Permalink
cmake: fix ko_write_gitclone_script function
Browse files Browse the repository at this point in the history
The value of `ARGV4` is undefined when the number of arguments passed to the function is less than 5.
  • Loading branch information
benoit-pierre committed Nov 19, 2023
1 parent c8f1694 commit f43dcff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion thirdparty/cmake_modules/koreader_thirdparty_git.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ function(ko_write_gitclone_script script_filename git_repository git_tag build_s
set(work_dir ${CMAKE_CURRENT_BINARY_DIR}/git_checkout)
set(tmp_dir ${work_dir}/tmp)
set(stamp_dir ${work_dir}/stamp)
set(git_submodules ${ARGV4})
if(ARGC GREATER 4)
set(git_submodules ${ARGV4})
endif()

set(${script_filename} ${tmp_dir}/${PROJECT_NAME}-gitclone-${git_tag}.cmake)
set(${script_filename} ${${script_filename}} PARENT_SCOPE)
Expand Down

0 comments on commit f43dcff

Please sign in to comment.