Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -529,16 +529,16 @@ function(cpm_add_patches)
# Convert to absolute path for use with patch file command.
get_filename_component(PATCH_FILE "${PATCH_FILE}" ABSOLUTE)

# The first patch entry must be preceded by "PATCH_COMMAND" while the following items are
# preceded by "&&".
# The first patch entry must be preceded by "PATCH_COMMAND". Subsequent
# commands are preceeded by "COMMAND".
if(first_item)
set(first_item False)
list(APPEND temp_list "PATCH_COMMAND")
else()
list(APPEND temp_list "&&")
list(APPEND temp_list "COMMAND")
endif()
# Add the patch command to the list
list(APPEND temp_list "${PATCH_EXECUTABLE}" "-p1" "<" "${PATCH_FILE}")
list(APPEND temp_list "${PATCH_EXECUTABLE}" "-p1" "-i" "${PATCH_FILE}")
endforeach()

# Move temp out into parent scope.
Expand Down
Loading