Skip to content

Commit

Permalink
Exit CMake processing when apply patch failed (#306)
Browse files Browse the repository at this point in the history
* Exit CMake processing when apply patch failed

Signed-off-by: haonanya <haonan.yang@intel.com>

* Skip the rest when apply patch failed

Signed-off-by: haonanya <haonan.yang@intel.com>
  • Loading branch information
haonanya committed Jan 25, 2022
1 parent 4a1ded0 commit 16ff905
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/modules/CMakeFunctions.cmake
Expand Up @@ -146,8 +146,12 @@ function(apply_patches repo_dir patches_dirs base_revision target_branch ret)
WORKING_DIRECTORY ${repo_dir}
OUTPUT_VARIABLE patching_log
ERROR_QUIET
RESULT_VARIABLE ret_apply_patch
)
message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
if (ret_apply_patch)
break()
endif()
endif()
endforeach(patch)
else() # The target branch already exists
Expand All @@ -161,6 +165,8 @@ function(apply_patches repo_dir patches_dirs base_revision target_branch ret)
endif()
if (NOT (ret_not_git_repo OR ret_check_out OR ret_apply_patch))
set(${ret} True PARENT_SCOPE)
else()
message(FATAL_ERROR "[OPENCL-CLANG] Failed to apply patch!")
endif()
endfunction()

Expand Down

0 comments on commit 16ff905

Please sign in to comment.