Skip to content

Commit

Permalink
fix: add --batch flag to PATCH_EXECUTABLE command
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jul 16, 2024
1 parent d416d9b commit 278147f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ function(cpm_add_patches)
list(APPEND temp_list "&&")
endif()
# Add the patch command to the list
list(APPEND temp_list "${PATCH_EXECUTABLE}" "-p1" "<" "${PATCH_FILE}")
# The --batch flag is used to prevent the patch command from asking for user input
# and it does not apply the patch if it is unnecessary.
list(APPEND temp_list "${PATCH_EXECUTABLE}" "--batch" "-p1" "<" "${PATCH_FILE}")
endforeach()

# Move temp out into parent scope.
Expand Down

0 comments on commit 278147f

Please sign in to comment.