diff --git a/cmake/modules/CMakeFunctions.cmake b/cmake/modules/CMakeFunctions.cmake index ed7b5e9e..a978a21e 100644 --- a/cmake/modules/CMakeFunctions.cmake +++ b/cmake/modules/CMakeFunctions.cmake @@ -140,7 +140,7 @@ function(apply_patches repo_dir patches_dir base_revision target_branch) message(STATUS "[OPENCL-CLANG] Patch ${patch} is already in local branch - ignore patching") else() execute_process( # Apply the patch - COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace -C0 ${patch} + COMMAND ${GIT_EXECUTABLE} am --3way --keep-non-patch --ignore-whitespace -C0 ${patch} WORKING_DIRECTORY ${repo_dir} OUTPUT_VARIABLE patching_log RESULT_VARIABLE ret_apply_patch