ClickHouse/cmake/find/nuraft.cmake

25 lines
779 B
CMake
Raw Normal View History

2020-12-24 20:10:47 +00:00
option(ENABLE_NURAFT "Enable NuRaft" ${ENABLE_LIBRARIES})
2021-02-10 09:31:01 +00:00
if (NOT ENABLE_NURAFT)
2020-12-24 20:10:47 +00:00
return()
endif()
2021-10-24 07:11:23 +00:00
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/NuRaft/src")
2021-10-17 23:29:04 +00:00
message (WARNING "submodule contrib/NuRaft is missing. to fix try run: \n git submodule update --init")
2020-12-24 20:10:47 +00:00
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal NuRaft library")
set (USE_NURAFT 0)
return()
endif ()
2021-04-08 14:17:57 +00:00
if (NOT OS_FREEBSD)
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()