From e94ef9e1df9f215213886c4cacae821141a66034 Mon Sep 17 00:00:00 2001 From: Yang Yu Date: Tue, 28 Nov 2017 14:41:57 +0800 Subject: [PATCH] Fix MacOS compile --- cmake/external/grpc.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/external/grpc.cmake b/cmake/external/grpc.cmake index f431c037fd5..a7779667f37 100644 --- a/cmake/external/grpc.cmake +++ b/cmake/external/grpc.cmake @@ -33,7 +33,11 @@ ExternalProject_Add( UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 - BUILD_COMMAND make + # NOTE(yuyang18): + # Disable -Werror, otherwise the compile will fail in MacOS. + # It seems that we cannot configure that by make command. + # Just dry run make command and remove `-Werror`, then use a shell to run make commands + BUILD_COMMAND make -n | sed "s/-Werror//g" | sh INSTALL_COMMAND make prefix=${GRPC_INSTALL_DIR} install ) @@ -55,4 +59,3 @@ SET_PROPERTY(TARGET grpc_unsecure PROPERTY IMPORTED_LOCATION include_directories(${GRPC_INCLUDE_DIR}) ADD_DEPENDENCIES(grpc++_unsecure extern_grpc) - -- GitLab