[PATCH] D131593: [CMake] Update FindGPRC to use add_llvm_library

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 09:42:27 PDT 2022


steven_wu created this revision.
steven_wu added reviewers: kbobyrev, sammccall, akyrtzi.
Herald added subscribers: usaxena95, ributzka, kadircet, mgorny.
Herald added a project: All.
steven_wu requested review of this revision.
Herald added a subscriber: ilya-biryukov.
Herald added a project: LLVM.

add_clang_library is not available in components other than clang and
clang-tool-extras. Trying to use this module elsewhere will cause cmake
error. `add_clang_library` doesn't seem necessary for clangd's GRPC.
Change it to a more generic `add_llvm_library` so it is easier to build
other downstream projects with GRPC that doesn't depend on clang.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131593

Files:
  llvm/cmake/modules/FindGRPC.cmake


Index: llvm/cmake/modules/FindGRPC.cmake
===================================================================
--- llvm/cmake/modules/FindGRPC.cmake
+++ llvm/cmake/modules/FindGRPC.cmake
@@ -132,7 +132,7 @@
         ARGS ${Flags} "${ProtoSourceAbsolutePath}"
         DEPENDS "${ProtoSourceAbsolutePath}")
 
-  add_clang_library(${LibraryName} ${GeneratedProtoSource}
+  add_llvm_library(${LibraryName} ${GeneratedProtoSource}
     PARTIAL_SOURCES_INTENDED
     LINK_LIBS PUBLIC grpc++ protobuf)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131593.451524.patch
Type: text/x-patch
Size: 496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220810/a1e65e09/attachment.bin>


More information about the llvm-commits mailing list