fix the grpc++ detection - do not make absl_sync mandatory

This commit is contained in:
Sylvestre Ledru 2022-12-29 10:07:53 +01:00
parent 3401ecc9bc
commit 56d03668ef

View File

@ -35,10 +35,20 @@ Index: llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/clang/cmake/modu
===================================================================
--- llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b.orig/clang/cmake/modules/AddGRPC.cmake
+++ llvm-toolchain-snapshot_16~++20221227120055+36d70a6aea6b/clang/cmake/modules/AddGRPC.cmake
@@ -7,5 +7,5 @@ function(generate_clang_protos_library L
@@ -5,7 +5,13 @@ function(generate_clang_protos_library L
cmake_parse_arguments(PARSE_ARGV 2 PROTO "" "" "")
generate_proto_sources(ProtoSource ${ProtoFile} ${PROTO_UNPARSED_ARGUMENTS})
add_clang_library(${LibraryName} ${ProtoSource}
PARTIAL_SOURCES_INTENDED
- add_clang_library(${LibraryName} ${ProtoSource}
- PARTIAL_SOURCES_INTENDED
- LINK_LIBS PUBLIC grpc++ protobuf)
+ LINK_LIBS PUBLIC protobuf gpr grpc absl_synchronization grpc++)
+ if (ABSL_SYNCHRONIZATION_LIBRARY)
+ add_clang_library(${LibraryName} ${ProtoSource}
+ PARTIAL_SOURCES_INTENDED
+ LINK_LIBS PUBLIC protobuf gpr grpc absl_synchronization grpc++)
+ else()
+ add_clang_library(${LibraryName} ${ProtoSource}
+ PARTIAL_SOURCES_INTENDED
+ LINK_LIBS PUBLIC protobuf gpr grpc grpc++)
+ endif()
endfunction()