- Switch $GRPC_OPTS references to ${GRPC_OPTS}
- Also find and include the search path for abseil headers
- Only setup the gRPC related targets once, so that include(FindGRPC) can be called from multiple tools
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/cmake/modules/FindGRPC.cmake | ||
---|---|---|
71 | 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. | |
79 | Why is the header search path for all targets being modified to add abseil? Is that a dependency for some other target that is being imported here? Perhaps we should add it to that particular library and let CMake propagate it properly? |
Use target_include_directories() to add include search paths only for the targets the depend on gRPC
llvm/cmake/modules/FindGRPC.cmake | ||
---|---|---|
71 | Thanks for the suggestion! Using target_include_directories() seems like a much better choice. |
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.