2021-04-02 10:57:46 +00:00
|
|
|
if(ARCH_AMD64 AND NOT OS_FREEBSD AND NOT OS_DARWIN)
|
2019-10-05 19:25:31 +00:00
|
|
|
option(ENABLE_FASTOPS "Enable fast vectorized mathematical functions library by Mikhail Parakhin" ${ENABLE_LIBRARIES})
|
2020-08-14 15:44:04 +00:00
|
|
|
elseif(ENABLE_FASTOPS)
|
2021-04-02 10:57:46 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Fastops library is supported on x86_64 only, and not FreeBSD or Darwin")
|
2019-10-05 19:25:31 +00:00
|
|
|
endif()
|
2019-08-01 00:29:32 +00:00
|
|
|
|
2020-08-14 15:44:04 +00:00
|
|
|
if(NOT ENABLE_FASTOPS)
|
2019-08-01 00:29:32 +00:00
|
|
|
set(USE_FASTOPS 0)
|
2020-08-14 15:44:04 +00:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/fastops/fastops/fastops.h")
|
2021-10-17 23:29:04 +00:00
|
|
|
message(WARNING "submodule contrib/fastops is missing. to fix try run: \n git submodule update --init")
|
2020-08-14 15:44:04 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal fastops library")
|
|
|
|
set(MISSING_INTERNAL_FASTOPS_LIBRARY 1)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT MISSING_INTERNAL_FASTOPS_LIBRARY)
|
|
|
|
set(USE_FASTOPS 1)
|
|
|
|
set(FASTOPS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/fastops/)
|
|
|
|
set(FASTOPS_LIBRARY fastops)
|
2019-10-05 19:25:31 +00:00
|
|
|
endif()
|
2019-08-01 00:29:32 +00:00
|
|
|
|
2019-10-05 19:25:31 +00:00
|
|
|
message(STATUS "Using fastops=${USE_FASTOPS}: ${FASTOPS_INCLUDE_DIR} : ${FASTOPS_LIBRARY}")
|