Skip to content

Commit dc91c4e

Browse files
authored
Fix MacOS compile (#6062)
1 parent 61d98f2 commit dc91c4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/external/grpc.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ SET(GRPC_INSTALL_DIR ${THIRD_PARTY_PATH}/install/grpc)
2424
SET(GRPC_INCLUDE_DIR "${GRPC_INSTALL_DIR}/include/" CACHE PATH "grpc include directory." FORCE)
2525
SET(GRPC_CPP_PLUGIN "${GRPC_INSTALL_DIR}/bin/grpc_cpp_plugin" CACHE FILEPATH "GRPC_CPP_PLUGIN" FORCE)
2626
IF(APPLE)
27-
SET(BUILD_CMD make -n | sed "s/-Werror//g" | sh)
27+
SET(BUILD_CMD make -n HAS_SYSTEM_PROTOBUF=false -s -j8 static grpc_cpp_plugin | sed "s/-Werror//g" | sh)
2828
ELSE()
29-
SET(BUILD_CMD make)
29+
SET(BUILD_CMD make HAS_SYSTEM_PROTOBUF=false -s -j8 static grpc_cpp_plugin)
3030
ENDIF()
3131

3232
ExternalProject_Add(
@@ -42,7 +42,7 @@ ExternalProject_Add(
4242
# Disable -Werror, otherwise the compile will fail in MacOS.
4343
# It seems that we cannot configure that by make command.
4444
# Just dry run make command and remove `-Werror`, then use a shell to run make commands
45-
BUILD_COMMAND ${BUILD_CMD} HAS_SYSTEM_PROTOBUF=false -s -j8 static grpc_cpp_plugin
45+
BUILD_COMMAND ${BUILD_CMD}
4646
INSTALL_COMMAND make prefix=${GRPC_INSTALL_DIR} install
4747
)
4848

0 commit comments

Comments
 (0)