ClickHouse/contrib/simdjson-cmake/CMakeLists.txt

20 lines
777 B
CMake
Raw Normal View History

if (NOT HAVE_AVX2)
message (FATAL_ERROR "No AVX2 support")
endif ()
2019-05-15 17:19:39 +00:00
set(SIMDJSON_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include")
set(SIMDJSON_SRC_DIR "${SIMDJSON_INCLUDE_DIR}/../src")
set(SIMDJSON_SRC
${SIMDJSON_SRC_DIR}/jsonioutil.cpp
${SIMDJSON_SRC_DIR}/jsonminifier.cpp
${SIMDJSON_SRC_DIR}/jsonparser.cpp
${SIMDJSON_SRC_DIR}/stage1_find_marks.cpp
${SIMDJSON_SRC_DIR}/stage2_build_tape.cpp
${SIMDJSON_SRC_DIR}/parsedjson.cpp
${SIMDJSON_SRC_DIR}/parsedjsoniterator.cpp
2019-07-08 16:42:49 +00:00
${SIMDJSON_SRC_DIR}/simdjson.cpp
)
2019-05-15 17:19:39 +00:00
add_library(${SIMDJSON_LIBRARY} ${SIMDJSON_SRC})
2019-07-08 16:01:00 +00:00
target_include_directories(${SIMDJSON_LIBRARY} SYSTEM PUBLIC "${SIMDJSON_INCLUDE_DIR}")
target_compile_options(${SIMDJSON_LIBRARY} PRIVATE -mavx2 -mbmi -mbmi2 -mpclmul)