Skip to content

Commit 61afe6d

Browse files
intel-kzhavoroigcbot
authored andcommitted
Abort configuration on SPIRV patching failure
1 parent 36debf9 commit 61afe6d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

IGC/VectorCompiler/cmake/spirv.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,28 @@ function(apply_patches repo_dir patches_dir base_revision target_branch)
3535
execute_process( # Create the target branch
3636
COMMAND ${GIT_EXECUTABLE} checkout -b ${target_branch} ${base_revision}
3737
WORKING_DIRECTORY ${repo_dir}
38+
RESULT_VARIABLE es
3839
)
40+
if(NOT es EQUAL 0)
41+
message(FATAL_ERROR "Could not checkout base revision")
42+
endif()
3943
execute_process( # Apply the pathces
4044
COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patches}
4145
WORKING_DIRECTORY ${repo_dir}
46+
RESULT_VARIABLE es
4247
)
48+
if(NOT es EQUAL 0)
49+
message(FATAL_ERROR "Could not apply SPIRV patches")
50+
endif()
4351
else() # The target branch already exists
4452
execute_process( # Check it out
4553
COMMAND ${GIT_EXECUTABLE} checkout ${target_branch}
4654
WORKING_DIRECTORY ${repo_dir}
55+
RESULT_VARIABLE es
4756
)
57+
if(NOT es EQUAL 0)
58+
message(FATAL_ERROR "Could not checkout branch")
59+
endif()
4860
endif()
4961
endfunction()
5062

0 commit comments

Comments
 (0)