2020-06-03 15:07:37 +00:00
|
|
|
option(ENABLE_CASSANDRA "Enable Cassandra" ${ENABLE_LIBRARIES})
|
|
|
|
|
2020-08-14 15:44:04 +00:00
|
|
|
if (NOT ENABLE_CASSANDRA)
|
|
|
|
return()
|
|
|
|
endif()
|
2020-08-14 06:25:08 +00:00
|
|
|
|
2020-08-14 15:44:04 +00:00
|
|
|
if (APPLE)
|
|
|
|
set(CMAKE_MACOSX_RPATH ON)
|
|
|
|
endif()
|
2020-08-09 03:42:09 +00:00
|
|
|
|
2020-08-14 15:44:04 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
|
|
|
message (ERROR "submodule contrib/libuv is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libuv needed for Cassandra")
|
|
|
|
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
|
|
|
message (ERROR "submodule contrib/cassandra is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal Cassandra")
|
|
|
|
else()
|
|
|
|
set (LIBUV_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
|
|
|
set (CASSANDRA_INCLUDE_DIR
|
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
|
|
|
|
if (MAKE_STATIC_LIBRARIES)
|
|
|
|
set (LIBUV_LIBRARY uv_a)
|
|
|
|
set (CASSANDRA_LIBRARY cassandra_static)
|
|
|
|
else()
|
|
|
|
set (LIBUV_LIBRARY uv)
|
|
|
|
set (CASSANDRA_LIBRARY cassandra)
|
2020-08-13 20:10:06 +00:00
|
|
|
endif()
|
2020-08-14 15:44:04 +00:00
|
|
|
|
|
|
|
set (USE_CASSANDRA 1)
|
|
|
|
set (CASS_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
2020-05-19 02:21:27 +00:00
|
|
|
endif()
|
2020-06-03 15:07:37 +00:00
|
|
|
|
|
|
|
message (STATUS "Using cassandra=${USE_CASSANDRA}: ${CASSANDRA_INCLUDE_DIR} : ${CASSANDRA_LIBRARY}")
|
|
|
|
message (STATUS "Using libuv: ${LIBUV_ROOT_DIR} : ${LIBUV_LIBRARY}")
|