Skip to content

Commit d518019

Browse files
authored
Exit CMake processing when apply patch failed (#305)
Signed-off-by: haonanya <[email protected]>
1 parent 44ecaa4 commit d518019

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/CMakeFunctions.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ function(apply_patches repo_dir patches_dirs base_revision target_branch ret)
146146
WORKING_DIRECTORY ${repo_dir}
147147
OUTPUT_VARIABLE patching_log
148148
ERROR_QUIET
149+
RESULT_VARIABLE ret_apply_patch
149150
)
150151
message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
151152
endif()
@@ -161,6 +162,8 @@ function(apply_patches repo_dir patches_dirs base_revision target_branch ret)
161162
endif()
162163
if (NOT (ret_not_git_repo OR ret_check_out OR ret_apply_patch))
163164
set(${ret} True PARENT_SCOPE)
165+
else()
166+
message(FATAL_ERROR "[OPENCL-CLANG] Failed to apply patch!")
164167
endif()
165168
endfunction()
166169

0 commit comments

Comments
 (0)