mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Remove unbundled thrift support
This commit is contained in:
parent
4bd49138b4
commit
313716be94
@ -510,7 +510,6 @@ include (cmake/find/h3.cmake)
|
||||
include (cmake/find/libxml2.cmake)
|
||||
include (cmake/find/brotli.cmake)
|
||||
include (cmake/find/protobuf.cmake)
|
||||
include (cmake/find/thrift.cmake)
|
||||
include (cmake/find/grpc.cmake)
|
||||
include (cmake/find/pdqsort.cmake)
|
||||
include (cmake/find/miniselect.cmake)
|
||||
|
@ -1,34 +0,0 @@
|
||||
option(ENABLE_THRIFT "Enable Thrift" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_THRIFT)
|
||||
message (STATUS "thrift disabled")
|
||||
set(USE_INTERNAL_THRIFT_LIBRARY 0)
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_THRIFT_LIBRARY "Set to FALSE to use system thrift library instead of bundled" ON)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/thrift")
|
||||
if (USE_INTERNAL_THRIFT_LIBRARY)
|
||||
message (WARNING "submodule contrib/thrift is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set(USE_INTERNAL_THRIFT_LIBRARY 0)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_THRIFT_LIBRARY)
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
set(THRIFT_LIBRARY thrift_static)
|
||||
else()
|
||||
set(THRIFT_LIBRARY thrift)
|
||||
endif()
|
||||
set (THRIFT_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/thrift/lib/cpp/src")
|
||||
set(USE_THRIFT 1)
|
||||
else()
|
||||
find_library(THRIFT_LIBRARY thrift)
|
||||
if (NOT THRIFT_LIBRARY)
|
||||
set(USE_THRIFT 0)
|
||||
else()
|
||||
set(USE_THRIFT 1)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using thrift=${USE_THRIFT}: ${THRIFT_INCLUDE_DIR} : ${THRIFT_LIBRARY}")
|
7
contrib/CMakeLists.txt
vendored
7
contrib/CMakeLists.txt
vendored
@ -61,8 +61,9 @@ add_subdirectory (zlib-ng-cmake)
|
||||
add_subdirectory (bzip2-cmake)
|
||||
add_subdirectory (snappy-cmake)
|
||||
add_subdirectory (rocksdb-cmake)
|
||||
add_subdirectory (thrift-cmake)
|
||||
# parquet/arrow/orc
|
||||
add_subdirectory (arrow-cmake) # requires: snappy
|
||||
add_subdirectory (arrow-cmake) # requires: snappy, thrift
|
||||
add_subdirectory (avro-cmake) # requires: snappy
|
||||
add_subdirectory (hive-metastore-cmake) # requires: thrift/avro/arrow
|
||||
|
||||
@ -166,10 +167,6 @@ if (USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
add_subdirectory(protobuf-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_THRIFT_LIBRARY)
|
||||
add_subdirectory(thrift-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_HDFS3_LIBRARY)
|
||||
add_subdirectory(libhdfs3-cmake)
|
||||
endif ()
|
||||
|
@ -441,7 +441,7 @@ target_include_directories(_parquet SYSTEM BEFORE
|
||||
target_link_libraries(_parquet
|
||||
PUBLIC _arrow
|
||||
PRIVATE
|
||||
${THRIFT_LIBRARY}
|
||||
ch_contrib::thrift
|
||||
boost::headers_only
|
||||
boost::regex
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
@ -13,5 +13,5 @@ set (SRCS
|
||||
|
||||
add_library(_hivemetastore ${SRCS})
|
||||
add_library(ch_contrib::hivemetastore ALIAS _hivemetastore)
|
||||
target_link_libraries(_hivemetastore PUBLIC ${THRIFT_LIBRARY})
|
||||
target_link_libraries(_hivemetastore PUBLIC ch_contrib::thrift)
|
||||
target_include_directories(_hivemetastore SYSTEM BEFORE PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/hive-metastore)
|
||||
|
@ -1,3 +1,10 @@
|
||||
option(ENABLE_THRIFT "Enable Thrift" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_THRIFT)
|
||||
message (STATUS "thrift disabled")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/thrift/lib/cpp")
|
||||
set(thriftcpp_SOURCES
|
||||
"${LIBRARY_DIR}/src/thrift/TApplicationException.cpp"
|
||||
@ -82,6 +89,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in" "${CMAKE_CU
|
||||
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
add_library(${THRIFT_LIBRARY} ${thriftcpp_SOURCES} ${thriftcpp_threads_SOURCES})
|
||||
target_include_directories(${THRIFT_LIBRARY} SYSTEM PUBLIC "${THRIFT_INCLUDE_DIR}" ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries (${THRIFT_LIBRARY} PUBLIC boost::headers_only)
|
||||
add_library(_thrift ${thriftcpp_SOURCES} ${thriftcpp_threads_SOURCES})
|
||||
add_library(ch_contrib::thrift ALIAS _thrift)
|
||||
target_include_directories(_thrift SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/thrift/lib/cpp/src" ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries (_thrift PUBLIC boost::headers_only)
|
||||
|
@ -81,8 +81,8 @@ target_link_libraries (shell_command_inout PRIVATE clickhouse_common_io)
|
||||
add_executable (executable_udf executable_udf.cpp)
|
||||
target_link_libraries (executable_udf PRIVATE dbms)
|
||||
|
||||
add_executable(hive_metastore_client hive_metastore_client.cpp)
|
||||
target_link_libraries (hive_metastore_client PUBLIC hivemetastore ${THRIFT_LIBRARY})
|
||||
add_executable (hive_metastore_client hive_metastore_client.cpp)
|
||||
target_link_libraries (hive_metastore_client PUBLIC hivemetastore ch_contrib::thrift)
|
||||
|
||||
add_executable (interval_tree interval_tree.cpp)
|
||||
target_link_libraries (interval_tree PRIVATE dbms)
|
||||
|
Loading…
Reference in New Issue
Block a user