ClickHouse/cmake/find/nuraft.cmake

25 lines
821 B
CMake
Raw Normal View History

2020-12-24 20:10:47 +00:00
option(ENABLE_NURAFT "Enable NuRaft" ${ENABLE_LIBRARIES})
2021-02-01 13:18:17 +00:00
if (NOT ENABLE_NURAFT)
2020-12-24 20:10:47 +00:00
return()
endif()
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/NuRaft/CMakeLists.txt")
message (WARNING "submodule contrib/NuRaft is missing. to fix try run: \n git submodule update --init --recursive")
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal NuRaft library")
set (USE_NURAFT 0)
return()
endif ()
2021-02-01 13:18:17 +00:00
if (NOT OS_FREEBSD AND NOT OS_DARWIN)
set (USE_NURAFT 1)
set (NURAFT_LIBRARY nuraft)
2020-12-24 20:10:47 +00:00
set (NURAFT_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/NuRaft/include")
2020-12-24 20:10:47 +00:00
message (STATUS "Using NuRaft=${USE_NURAFT}: ${NURAFT_INCLUDE_DIR} : ${NURAFT_LIBRARY}")
else()
2020-12-25 13:43:01 +00:00
set (USE_NURAFT 0)
2021-02-01 13:18:17 +00:00
message (STATUS "Using internal NuRaft library on FreeBSD and Darwin is not supported")
endif()