mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
d456aa86ef
This reverts commit 89419ceb9b
(curl part moved to separate commit)
Squashed:
- termcap removed
- fix for cassandra on apple merged
- cmake: fix "Can't find system zlib library" in unbundled build
- cmake: fix condition when testing for rdkafka platform
- cmake: PROTOBUF_OLD_ABI_COMPAT shouldn't be enabled for internal protobuf
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
39 lines
1.4 KiB
CMake
39 lines
1.4 KiB
CMake
option (ENABLE_GRPC "Use gRPC" ${ENABLE_LIBRARIES})
|
|
|
|
if (NOT ENABLE_GRPC)
|
|
if (USE_INTERNAL_GRPC_LIBRARY)
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal gRPC library with ENABLE_GRPC=OFF")
|
|
endif()
|
|
return()
|
|
endif()
|
|
|
|
option (USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
if (NOT USE_INTERNAL_GRPC_LIBRARY)
|
|
find_package(grpc)
|
|
if (GRPC_INCLUDE_DIR AND GRPC_LIBRARY)
|
|
set (USE_GRPC ON)
|
|
else()
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system gRPC")
|
|
endif()
|
|
endif()
|
|
|
|
if (NOT USE_GRPC)
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/include/grpc++/grpc++.h")
|
|
message (WARNING "submodule contrib/grpc is missing. To fix try run: \n git submodule update --init --recursive")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal gRPC")
|
|
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
|
elseif (NOT USE_PROTOBUF)
|
|
message (WARNING "gRPC requires protobuf which is disabled")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Will not use internal gRPC without protobuf")
|
|
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
|
else()
|
|
set (GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc/include")
|
|
set (GRPC_LIBRARY "libgrpc++")
|
|
set (USE_GRPC ON)
|
|
set (USE_INTERNAL_GRPC_LIBRARY ON)
|
|
endif()
|
|
endif()
|
|
|
|
message (STATUS "Using gRPC=${USE_GRPC}: ${GRPC_INCLUDE_DIR} : ${GRPC_LIBRARY}")
|