ClickHouse/contrib/annoy-cmake/CMakeLists.txt

17 lines
584 B
CMake
Raw Normal View History

2022-07-18 21:59:07 +00:00
option(ENABLE_ANNOY "Enable Annoy index support" ${ENABLE_LIBRARIES})
2022-08-29 09:18:15 +00:00
if ((NOT ENABLE_ANNOY) OR (SANITIZE STREQUAL "undefined"))
2022-07-18 21:59:07 +00:00
message (STATUS "Not using annoy")
return()
endif()
2022-07-10 15:10:47 +00:00
set(ANNOY_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/annoy")
set(ANNOY_SOURCE_DIR "${ANNOY_PROJECT_DIR}/src")
2022-07-20 09:38:56 +00:00
add_library(_annoy INTERFACE)
target_include_directories(_annoy SYSTEM INTERFACE ${ANNOY_SOURCE_DIR})
2022-07-10 15:10:47 +00:00
add_library(ch_contrib::annoy ALIAS _annoy)
2022-07-20 09:38:56 +00:00
target_compile_definitions(_annoy INTERFACE ENABLE_ANNOY)
2022-08-15 14:35:51 +00:00
target_compile_definitions(_annoy INTERFACE ANNOYLIB_MULTITHREADED_BUILD)