You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2023/07/10 04:34:44 UTC
[arrow] branch main updated: MINOR: [C++] Cleanup FindgRPCAlt (#36584)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 3d006682dc MINOR: [C++] Cleanup FindgRPCAlt (#36584)
3d006682dc is described below
commit 3d006682dc7c50b4a87c14f57672c853c1e16b1f
Author: Jacob Wujciak-Jens <ja...@wujciak.de>
AuthorDate: Mon Jul 10 06:34:38 2023 +0200
MINOR: [C++] Cleanup FindgRPCAlt (#36584)
This removes some redundant code by moving the adding of threads to grpc link libs outside of the if()
Lead-authored-by: Jacob Wujciak-Jens <ja...@wujciak.de>
Co-authored-by: Sutou Kouhei <ko...@cozmixng.org>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
cpp/cmake_modules/FindgRPCAlt.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpp/cmake_modules/FindgRPCAlt.cmake b/cpp/cmake_modules/FindgRPCAlt.cmake
index c5d8c8a812..81d8cf7ca6 100644
--- a/cpp/cmake_modules/FindgRPCAlt.cmake
+++ b/cpp/cmake_modules/FindgRPCAlt.cmake
@@ -36,7 +36,7 @@ if(GRPCPP_PC_FOUND)
# gRPC's pkg-config file neglects to specify pthreads.
find_package(Threads REQUIRED)
if(ARROW_GRPC_USE_SHARED)
- set(GRPCPP_LINK_LIBRARIES ${GRPCPP_PC_LINK_LIBRARIES} Threads::Threads)
+ set(GRPCPP_LINK_LIBRARIES ${GRPCPP_PC_LINK_LIBRARIES})
set(GRPCPP_LINK_OPTIONS ${GRPCPP_PC_LDFLAGS_OTHER})
set(GRPCPP_COMPILE_OPTIONS ${GRPCPP_PC_CFLAGS_OTHER})
else()
@@ -47,10 +47,10 @@ if(GRPCPP_PC_FOUND)
HINTS ${GRPCPP_PC_STATIC_LIBRARY_DIRS})
list(APPEND GRPCPP_LINK_LIBRARIES "${GRPCPP_LIBRARY_${GRPCPP_LIBRARY_NAME}}")
endforeach()
- list(APPEND GRPCPP_LINK_LIBRARIES Threads::Threads)
set(GRPCPP_LINK_OPTIONS ${GRPCPP_PC_STATIC_LDFLAGS_OTHER})
set(GRPCPP_COMPILE_OPTIONS ${GRPCPP_PC_STATIC_CFLAGS_OTHER})
endif()
+ list(APPEND GRPCPP_LINK_LIBRARIES Threads::Threads)
list(GET GRPCPP_LINK_LIBRARIES 0 GRPCPP_IMPORTED_LOCATION)
list(REMOVE_AT GRPCPP_LINK_LIBRARIES 0)
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin