mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
Remove unbundled datasketches support
This commit is contained in:
parent
3147bbab51
commit
6a721baa59
@ -489,7 +489,6 @@ include (GNUInstallDirs)
|
||||
include (cmake/find/llvm.cmake)
|
||||
include (cmake/find/s3.cmake)
|
||||
include (cmake/find/nlp.cmake)
|
||||
include (cmake/find/datasketches.cmake)
|
||||
|
||||
# Need to process before "contrib" dir:
|
||||
include (cmake/find/mysqlclient.cmake)
|
||||
|
@ -1,29 +0,0 @@
|
||||
option (ENABLE_DATASKETCHES "Enable DataSketches" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_DATASKETCHES)
|
||||
|
||||
option (USE_INTERNAL_DATASKETCHES_LIBRARY "Set to FALSE to use system DataSketches library instead of bundled" ON)
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/theta/CMakeLists.txt")
|
||||
if (USE_INTERNAL_DATASKETCHES_LIBRARY)
|
||||
message(WARNING "submodule contrib/datasketches-cpp is missing. to fix try run: \n git submodule update --init")
|
||||
endif()
|
||||
set(MISSING_INTERNAL_DATASKETCHES_LIBRARY 1)
|
||||
set(USE_INTERNAL_DATASKETCHES_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_DATASKETCHES_LIBRARY)
|
||||
set(DATASKETCHES_LIBRARY theta)
|
||||
set(DATASKETCHES_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/common/include" "${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/theta/include")
|
||||
elseif (NOT MISSING_INTERNAL_DATASKETCHES_LIBRARY)
|
||||
find_library(DATASKETCHES_LIBRARY theta)
|
||||
find_path(DATASKETCHES_INCLUDE_DIR NAMES theta_sketch.hpp PATHS ${DATASKETCHES_INCLUDE_PATHS})
|
||||
endif()
|
||||
|
||||
if (DATASKETCHES_LIBRARY AND DATASKETCHES_INCLUDE_DIR)
|
||||
set(USE_DATASKETCHES 1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using datasketches=${USE_DATASKETCHES}: ${DATASKETCHES_INCLUDE_DIR} : ${DATASKETCHES_LIBRARY}")
|
1
contrib/CMakeLists.txt
vendored
1
contrib/CMakeLists.txt
vendored
@ -139,6 +139,7 @@ add_subdirectory (libpqxx-cmake)
|
||||
add_subdirectory (libpq-cmake)
|
||||
add_subdirectory (nuraft-cmake)
|
||||
add_subdirectory (fast_float-cmake)
|
||||
add_subdirectory (datasketches-cpp-cmake)
|
||||
|
||||
if (USE_NLP)
|
||||
add_subdirectory(libstemmer-c-cmake)
|
||||
|
14
contrib/datasketches-cpp-cmake/CMakeLists.txt
Normal file
14
contrib/datasketches-cpp-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
option (ENABLE_DATASKETCHES "Enable DataSketches" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_DATASKETCHES)
|
||||
message(STATUS "Not using DataSketches")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(DATASKETCHES_LIBRARY theta)
|
||||
add_library(_datasketches INTERFACE)
|
||||
target_include_directories(_datasketches SYSTEM BEFORE INTERFACE
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/common/include"
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/theta/include")
|
||||
|
||||
add_library(ch_contrib::datasketches ALIAS _datasketches)
|
@ -485,8 +485,8 @@ if (TARGET ch_contrib::libpqxx)
|
||||
dbms_target_link_libraries(PUBLIC ch_contrib::libpqxx)
|
||||
endif()
|
||||
|
||||
if (USE_DATASKETCHES)
|
||||
target_include_directories (clickhouse_aggregate_functions SYSTEM BEFORE PRIVATE ${DATASKETCHES_INCLUDE_DIR})
|
||||
if (TARGET ch_contrib::datasketches)
|
||||
target_link_libraries (clickhouse_aggregate_functions PRIVATE ch_contrib::datasketches)
|
||||
endif ()
|
||||
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::lz4)
|
||||
|
@ -67,3 +67,6 @@ endif()
|
||||
if (TARGET ch_contrib::sentry)
|
||||
set(USE_SENTRY 1)
|
||||
endif()
|
||||
if (TARGET ch_contrib::datasketches)
|
||||
set(USE_DATASKETCHES 1)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user