ClickHouse/contrib/simdjson-cmake/CMakeLists.txt

12 lines
525 B
CMake
Raw Normal View History

2019-05-15 17:19:39 +00:00
set(SIMDJSON_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include")
2020-07-11 21:03:30 +00:00
set(SIMDJSON_SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/simdjson/src")
set(SIMDJSON_SRC "${SIMDJSON_SRC_DIR}/simdjson.cpp")
2020-07-11 21:03:30 +00:00
add_library(simdjson ${SIMDJSON_SRC})
target_include_directories(simdjson SYSTEM PUBLIC "${SIMDJSON_INCLUDE_DIR}" PRIVATE "${SIMDJSON_SRC_DIR}")
2021-08-10 00:46:03 +00:00
# simdjson is using its own CPU dispatching and get confused if we enable AVX/AVX2 flags.
2021-11-26 23:07:24 +00:00
if(ARCH_AMD64)
target_compile_options(simdjson PRIVATE -mno-avx -mno-avx2)
endif()