mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #22207 from pingyu/datasketches-cmake
Datasketches support (cmake part)
This commit is contained in:
commit
2646a5d514
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -221,3 +221,6 @@
|
|||||||
[submodule "contrib/NuRaft"]
|
[submodule "contrib/NuRaft"]
|
||||||
path = contrib/NuRaft
|
path = contrib/NuRaft
|
||||||
url = https://github.com/ClickHouse-Extras/NuRaft.git
|
url = https://github.com/ClickHouse-Extras/NuRaft.git
|
||||||
|
[submodule "contrib/datasketches-cpp"]
|
||||||
|
path = contrib/datasketches-cpp
|
||||||
|
url = https://github.com/ClickHouse-Extras/datasketches-cpp.git
|
||||||
|
@ -509,6 +509,7 @@ include (cmake/find/msgpack.cmake)
|
|||||||
include (cmake/find/cassandra.cmake)
|
include (cmake/find/cassandra.cmake)
|
||||||
include (cmake/find/sentry.cmake)
|
include (cmake/find/sentry.cmake)
|
||||||
include (cmake/find/stats.cmake)
|
include (cmake/find/stats.cmake)
|
||||||
|
include (cmake/find/datasketches.cmake)
|
||||||
|
|
||||||
set (USE_INTERNAL_CITYHASH_LIBRARY ON CACHE INTERNAL "")
|
set (USE_INTERNAL_CITYHASH_LIBRARY ON CACHE INTERNAL "")
|
||||||
find_contrib_lib(cityhash)
|
find_contrib_lib(cityhash)
|
||||||
|
29
cmake/find/datasketches.cmake
Normal file
29
cmake/find/datasketches.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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" ${NOT_UNBUNDLED})
|
||||||
|
|
||||||
|
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 --recursive")
|
||||||
|
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/datasketches-cpp
vendored
Submodule
1
contrib/datasketches-cpp
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit f915d35b2de676683493c86c585141a1e1c83334
|
@ -471,6 +471,10 @@ if (USE_LIBPQXX)
|
|||||||
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${LIBPQXX_INCLUDE_DIR})
|
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${LIBPQXX_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (USE_DATASKETCHES)
|
||||||
|
target_include_directories (clickhouse_aggregate_functions SYSTEM BEFORE PRIVATE ${DATASKETCHES_INCLUDE_DIR})
|
||||||
|
endif ()
|
||||||
|
|
||||||
dbms_target_link_libraries(PRIVATE _boost_context)
|
dbms_target_link_libraries(PRIVATE _boost_context)
|
||||||
|
|
||||||
include (${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake)
|
include (${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake)
|
||||||
|
Loading…
Reference in New Issue
Block a user