[PATCH] D127893: [CMake] Fix `FindGRPC.cmake` for setting up gRPC related libraries for macOS+homebrew context

Argyrios Kyrtzidis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 13:26:52 PDT 2022


akyrtzi marked 2 inline comments as done.
akyrtzi added inline comments.


================
Comment at: llvm/cmake/modules/FindGRPC.cmake:71
       if (GRPC_HOMEBREW_RETURN_CODE EQUAL "0")
         include_directories(${GRPC_HOMEBREW_PATH}/include)
         list(APPEND GRPC_OPTS PATHS ${GRPC_HOMEBREW_PATH}/lib NO_DEFAULT_PATH)
----------------
akyrtzi wrote:
> compnerd wrote:
> > I realize that this is something that exists prior to your change, but it seems better to actually do this as `target_include_directories(grpc++ PUBLIC ${GRPC_HOMEBREW_PATH}/include)` which avoids the extra includes from being put into all targets.
> I can give it a try, will this make the search path propagate to all the targets that depend on `grpc++`?
Thanks for the suggestion! Using `target_include_directories()` seems like a much better choice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127893/new/

https://reviews.llvm.org/D127893



More information about the llvm-commits mailing list