ClickHouse/cmake/find/cassandra.cmake

35 lines
1.0 KiB
CMake
Raw Normal View History

2021-04-26 06:45:52 +00:00
if (MISSING_INTERNAL_LIBUV_LIBRARY)
message (WARNING "Disabling cassandra due to missing libuv")
2021-04-09 00:28:24 +00:00
set (ENABLE_CASSANDRA OFF CACHE INTERNAL "")
endif()
2020-06-03 15:07:37 +00:00
option(ENABLE_CASSANDRA "Enable Cassandra" ${ENABLE_LIBRARIES})
if (NOT ENABLE_CASSANDRA)
return()
endif()
2020-08-14 06:25:08 +00:00
if (APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
2021-04-26 06:45:52 +00:00
if (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")
2021-04-26 06:45:52 +00:00
set (USE_CASSANDRA 0)
return()
endif()
2021-04-26 06:45:52 +00:00
set (USE_CASSANDRA 1)
set (CASSANDRA_INCLUDE_DIR
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
if (MAKE_STATIC_LIBRARIES)
set (CASSANDRA_LIBRARY cassandra_static)
else()
set (CASSANDRA_LIBRARY cassandra)
endif()
2020-06-03 15:07:37 +00:00
2021-04-26 06:45:52 +00:00
set (CASS_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
2021-04-18 01:35:24 +00:00
2021-04-26 06:45:52 +00:00
message (STATUS "Using cassandra=${USE_CASSANDRA}: ${CASSANDRA_INCLUDE_DIR} : ${CASSANDRA_LIBRARY}")