Skip to content

Commit b6acc8b

Browse files
committed
Corrected formatting.
1 parent 9af0d28 commit b6acc8b

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

cmake/modules/CMakeFunctions.cmake

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ endmacro(use_eh)
4343
# This function assumes that each of files starts with (for example):
4444
# From 1a400928bf8fc86fa0f062524c25d0985c94ac6f Mon Sep 17 00:00:00 2001
4545
function(get_backport_patch_hash patch_path patch_hash)
46-
file(READ ${patch_path} first_line LIMIT 40 OFFSET 5)
47-
string(STRIP ${first_line} first_line_strip)
48-
set(patch_hash ${first_line_strip} PARENT_SCOPE)
46+
file(READ ${patch_path} first_line LIMIT 40 OFFSET 5)
47+
string(STRIP ${first_line} first_line_strip)
48+
set(patch_hash ${first_line_strip} PARENT_SCOPE)
4949
endfunction()
5050

5151
# Checks if the the patch is present in current local branch
@@ -56,18 +56,18 @@ function(is_backport_patch_present patch_path repo_dir base_branch patch_in_bran
5656
COMMAND ${GIT_EXECUTABLE} branch --contains ${patch_hash}
5757
WORKING_DIRECTORY ${repo_dir}
5858
OUTPUT_VARIABLE patch_in_branches
59-
ERROR_QUIET
59+
ERROR_QUIET
6060
)
61-
if(NOT patch_in_branches)
62-
set(patch_in_branch False PARENT_SCOPE) # The patch is not present in local branch
63-
else()
64-
string(FIND ${patch_in_branches} ${base_branch} match_branch)
61+
if(NOT patch_in_branches)
62+
set(patch_in_branch False PARENT_SCOPE) # The patch is not present in local branch
63+
else()
64+
string(FIND ${patch_in_branches} ${base_branch} match_branch)
6565
if(${match_branch} EQUAL -1)
66-
set(patch_in_branch False PARENT_SCOPE) # The patch is not present in local branch
66+
set(patch_in_branch False PARENT_SCOPE) # The patch is not present in local branch
6767
else()
68-
set(patch_in_branch True PARENT_SCOPE) # The patch is not present in local branch
69-
endif()
70-
endif()
68+
set(patch_in_branch True PARENT_SCOPE) # The patch is not present in local branch
69+
endif()
70+
endif()
7171
endfunction()
7272

7373
#
@@ -94,36 +94,36 @@ function(apply_patches repo_dir patches_dirs base_revision target_branch ret)
9494
RESULT_VARIABLE patches_needed
9595
)
9696
if(patches_needed EQUAL 128) # not a git repo
97-
set(ret_not_git_repo 1)
98-
message(STATUS "[OPENCL-CLANG] Is not a git repo")
97+
set(ret_not_git_repo 1)
98+
message(STATUS "[OPENCL-CLANG] Is not a git repo")
9999
elseif(patches_needed) # The target branch doesn't exist
100-
list(SORT patches)
100+
list(SORT patches)
101101
execute_process( # Create the target branch
102102
COMMAND ${GIT_EXECUTABLE} branch
103103
WORKING_DIRECTORY ${repo_dir}
104104
OUTPUT_VARIABLE git_out_base_branch
105105
)
106-
STRING(REGEX REPLACE "\\* (.*)" "\\1" base_branch ${git_out_base_branch})
107-
message(STATUS "[OPENCL-CLANG] Base branch : ${base_branch}")
108-
execute_process( # Create the target branch
106+
STRING(REGEX REPLACE "\\* (.*)" "\\1" base_branch ${git_out_base_branch})
107+
message(STATUS "[OPENCL-CLANG] Base branch : ${base_branch}")
108+
execute_process( # Create the target branch
109109
COMMAND ${GIT_EXECUTABLE} checkout -b ${target_branch} ${base_revision}
110110
WORKING_DIRECTORY ${repo_dir}
111111
RESULT_VARIABLE ret_check_out
112-
ERROR_VARIABLE checkout_log
112+
ERROR_VARIABLE checkout_log
113113
)
114-
message(STATUS "[OPENCL-CLANG] ${checkout_log}")
115-
foreach(patch ${patches})
116-
is_backport_patch_present(${patch} ${repo_dir} ${base_branch} patch_in_branch)
117-
if(${patch_in_branch})
114+
message(STATUS "[OPENCL-CLANG] ${checkout_log}")
115+
foreach(patch ${patches})
116+
is_backport_patch_present(${patch} ${repo_dir} ${base_branch} patch_in_branch)
117+
if(${patch_in_branch})
118118
message(STATUS "[OPENCL-CLANG] Patch ${patch} is already in local branch - ignore patching")
119-
else()
119+
else()
120120
execute_process( # Apply the patch
121-
COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patch}
122-
WORKING_DIRECTORY ${repo_dir}
123-
OUTPUT_VARIABLE patching_log
124-
)
125-
message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
126-
endif()
121+
COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patch}
122+
WORKING_DIRECTORY ${repo_dir}
123+
OUTPUT_VARIABLE patching_log
124+
)
125+
message(STATUS "[OPENCL-CLANG] Not present - ${patching_log}")
126+
endif()
127127
endforeach(patch)
128128
else() # The target branch already exists
129129
execute_process( # Check it out

0 commit comments

Comments
 (0)