[PATCH] D79387: [clangd] Fix remote index build for macOS with Homebrew-installed gRPC and Protobuf
Kirill Bobyrev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 11 01:02:16 PDT 2020
kbobyrev updated this revision to Diff 263111.
kbobyrev added a comment.
Rebase on top of master.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79387/new/
https://reviews.llvm.org/D79387
Files:
llvm/cmake/modules/FindGRPC.cmake
Index: llvm/cmake/modules/FindGRPC.cmake
===================================================================
--- llvm/cmake/modules/FindGRPC.cmake
+++ llvm/cmake/modules/FindGRPC.cmake
@@ -21,6 +21,23 @@
else()
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)
find_program(PROTOC protoc)
+ if (${APPLE})
+ find_program(HOMEBREW brew)
+ if (NOT HOMEBREW-NOTFOUND)
+ execute_process(COMMAND ${HOMEBREW} --prefix grpc
+ OUTPUT_VARIABLE GRPC_HOMEBREW_PATH
+ RESULT_VARIABLE GRPC_HOMEBREW_RETURN_CODE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${HOMEBREW} --prefix protobuf
+ OUTPUT_VARIABLE PROTOBUF_HOMEBREW_PATH
+ RESULT_VARIABLE PROTOBUF_HOMEBREW_RETURN_CODE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if (GRPC_HOMEBREW_RETURN_CODE EQUAL "0" AND PROTOBUF_HOMEBREW_RETURN_CODE EQUAL "0")
+ include_directories(${GRPC_HOMEBREW_PATH}/include ${PROTOBUF_HOMEBREW_PATH}/include)
+ link_directories(${GRPC_HOMEBREW_PATH}/lib ${PROTOBUF_HOMEBREW_PATH}/lib)
+ endif()
+ endif()
+ endif()
endif()
# Proto headers are generated in ${CMAKE_CURRENT_BINARY_DIR}.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79387.263111.patch
Type: text/x-patch
Size: 1158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200511/9bde1185/attachment.bin>
More information about the llvm-commits
mailing list