Skip to content

Commit

Permalink
Update grpc to v1.57.0
Browse files Browse the repository at this point in the history
Remove patch to support vsock since it has been merged in grpc
mainline since v1.57.0(grpc/grpc@18c42a2).

Signed-off-by: Yadong Qi <yadong.qi@intel.com>
  • Loading branch information
YadongQi authored and sysopenci committed Aug 22, 2023
1 parent 2eb2f61 commit 66ccb75
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 805 deletions.
29 changes: 2 additions & 27 deletions src/cmake/gRPCFetchCMake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,12 @@

include(FetchContent)

macro(apply_git_patch REPO_PATH PATCH_PATH)
execute_process(COMMAND git apply --check ${PATCH_PATH}
WORKING_DIRECTORY ${REPO_PATH}
RESULT_VARIABLE SUCCESS
ERROR_QUIET)

if(${SUCCESS} EQUAL 0)
message("Applying git patch ${PATCH_PATH} in ${REPO_PATH} repository")
execute_process(COMMAND git am -3 ${PATCH_PATH}
WORKING_DIRECTORY ${REPO_PATH}
RESULT_VARIABLE SUCCESS)

if(${SUCCESS} EQUAL 1)
# We don't stop here because it can happen in case of parallel builds
message(WARNING "\nError: failed to apply the patch patch: ${PATCH_PATH}\n")
endif()
else()
message("Already applied: ${PATCH_PATH}")
endif()
endmacro()
set(protobuf_INSTALL OFF)

FetchContent_Declare(
grpc
GIT_REPOSITORY https://github.com/grpc/grpc
GIT_TAG v1.52.1
GIT_TAG v1.57.0
GIT_SHALLOW 1
)
set(FETCHCONTENT_QUIET OFF)
Expand All @@ -41,12 +22,6 @@ FetchContent_GetProperties(grpc)
if (NOT grpc_POPULATED)
FetchContent_Populate(grpc)

#Apply VSOCK patches
file(GLOB patches_files "${CMAKE_SOURCE_DIR}/src/external/patches/grpc/*.patch")
foreach(file ${patches_files})
apply_git_patch(${grpc_SOURCE_DIR} ${file})
endforeach()

add_subdirectory(${grpc_SOURCE_DIR} ${grpc_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

Expand Down
Loading

0 comments on commit 66ccb75

Please sign in to comment.