File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,11 @@ function(apply_patches repo_dir patches_dir base_revision target_branch ret)
106
106
OUTPUT_QUIET
107
107
)
108
108
if (patches_needed EQUAL 128 ) # not a git repo
109
- set (ret_not_git_repo 1 )
110
- elseif (patches_needed ) # The target branch doesn't exist
109
+ set (${ret} True PARENT_SCOPE )
110
+ message (STATUS "[OPENCL-CLANG][Warning] ${repo_dir} is not a git repository, therefore, local patches are not applied" )
111
+ return ()
112
+ endif ()
113
+ if (patches_needed EQUAL 1 ) # The target branch doesn't exist
111
114
list (SORT patches )
112
115
is_valid_revision (${repo_dir} ${base_revision} exists_base_rev )
113
116
@@ -147,15 +150,15 @@ function(apply_patches repo_dir patches_dir base_revision target_branch ret)
147
150
endif ()
148
151
endif ()
149
152
endforeach (patch )
150
- else ( ) # The target branch already exists
153
+ elseif ( patches_needed EQUAL 0 ) # The target branch already exists
151
154
execute_process ( # Check it out
152
155
COMMAND ${GIT_EXECUTABLE} checkout ${target_branch}
153
156
WORKING_DIRECTORY ${repo_dir}
154
157
OUTPUT_QUIET
155
158
RESULT_VARIABLE ret_check_out
156
159
)
157
160
endif ()
158
- if (NOT (ret_not_git_repo OR ret_check_out OR ret_apply_patch ))
161
+ if (NOT (ret_check_out OR ret_apply_patch ))
159
162
set (${ret} True PARENT_SCOPE )
160
163
else ()
161
164
message (FATAL_ERROR "[OPENCL-CLANG] Failed to apply patch!" )
You can’t perform that action at this time.
0 commit comments