ClickHouse/cmake/find/stats.cmake

25 lines
997 B
CMake
Raw Normal View History

2021-07-06 11:34:33 +00:00
option(ENABLE_STATS "Enable StatsLib library" ${ENABLE_LIBRARIES})
2020-07-29 11:00:04 +00:00
if (ENABLE_STATS)
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/stats")
2021-10-17 23:29:04 +00:00
message (WARNING "submodule contrib/stats is missing. to fix try run: \n git submodule update --init")
2020-07-29 11:00:04 +00:00
set (ENABLE_STATS 0)
set (USE_STATS 0)
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/gcem")
2021-10-17 23:29:04 +00:00
message (WARNING "submodule contrib/gcem is missing. to fix try run: \n git submodule update --init")
2020-07-29 11:00:04 +00:00
set (ENABLE_STATS 0)
set (USE_STATS 0)
else()
set(STATS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/stats/include)
set(GCEM_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/gcem/include)
set (USE_STATS 1)
endif()
if (NOT USE_STATS)
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable stats library")
endif()
2020-07-29 11:00:04 +00:00
endif()
message (STATUS "Using stats=${USE_STATS} : ${STATS_INCLUDE_DIR}")
message (STATUS "Using gcem=${USE_STATS}: ${GCEM_INCLUDE_DIR}")