[llvm] cae7658 - [CMake] Update FindGPRC to use add_llvm_library
Steven Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 08:54:22 PDT 2022
Author: Steven Wu
Date: 2022-08-15T08:54:15-07:00
New Revision: cae76582b07f392659a3c5791eb5f1ba44a1e868
URL: https://github.com/llvm/llvm-project/commit/cae76582b07f392659a3c5791eb5f1ba44a1e868
DIFF: https://github.com/llvm/llvm-project/commit/cae76582b07f392659a3c5791eb5f1ba44a1e868.diff
LOG: [CMake] Update FindGPRC to use add_llvm_library
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.
Reviewed By: akyrtzi
Differential Revision: https://reviews.llvm.org/D131593
Added:
Modified:
llvm/cmake/modules/FindGRPC.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/FindGRPC.cmake b/llvm/cmake/modules/FindGRPC.cmake
index faaa96808850..c61eb791f902 100644
--- a/llvm/cmake/modules/FindGRPC.cmake
+++ b/llvm/cmake/modules/FindGRPC.cmake
@@ -132,7 +132,7 @@ function(generate_protos LibraryName ProtoFile)
ARGS ${Flags} "${ProtoSourceAbsolutePath}"
DEPENDS "${ProtoSourceAbsolutePath}")
- add_clang_library(${LibraryName} ${GeneratedProtoSource}
+ add_llvm_library(${LibraryName} ${GeneratedProtoSource}
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC grpc++ protobuf)
More information about the llvm-commits
mailing list