diff --git a/cmake/find/simdjson.cmake b/cmake/find/simdjson.cmake index 2a9f50a8859..4b1f3224076 100644 --- a/cmake/find/simdjson.cmake +++ b/cmake/find/simdjson.cmake @@ -1,17 +1,8 @@ -if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include/simdjson/jsonparser.h") +if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include/simdjson.h") message (WARNING "submodule contrib/simdjson is missing. to fix try run: \n git submodule update --init --recursive") return() endif () -if (NOT HAVE_SSE42) - message (WARNING "submodule contrib/simdjson requires support of SSE4.2 instructions") - return() -elseif (NOT HAVE_PCLMULQDQ) - message (WARNING "submodule contrib/simdjson requires support of PCLMULQDQ instructions") - return() -endif () - option (USE_SIMDJSON "Use simdjson" ON) -set (SIMDJSON_LIBRARY "simdjson") -message(STATUS "Using simdjson=${USE_SIMDJSON}: ${SIMDJSON_LIBRARY}") +message(STATUS "Using simdjson=${USE_SIMDJSON}") diff --git a/contrib/simdjson-cmake/CMakeLists.txt b/contrib/simdjson-cmake/CMakeLists.txt index a07dcd487be..2fb60b905da 100644 --- a/contrib/simdjson-cmake/CMakeLists.txt +++ b/contrib/simdjson-cmake/CMakeLists.txt @@ -1,14 +1,6 @@ set(SIMDJSON_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include") -set(SIMDJSON_SRC_DIR "${SIMDJSON_INCLUDE_DIR}/../src") -set(SIMDJSON_SRC - ${SIMDJSON_SRC_DIR}/document.cpp - ${SIMDJSON_SRC_DIR}/error.cpp - ${SIMDJSON_SRC_DIR}/implementation.cpp - ${SIMDJSON_SRC_DIR}/jsonioutil.cpp - ${SIMDJSON_SRC_DIR}/jsonminifier.cpp - ${SIMDJSON_SRC_DIR}/stage1_find_marks.cpp - ${SIMDJSON_SRC_DIR}/stage2_build_tape.cpp -) +set(SIMDJSON_SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/simdjson/src") +set(SIMDJSON_SRC ${SIMDJSON_SRC_DIR}/simdjson.cpp) -add_library(${SIMDJSON_LIBRARY} ${SIMDJSON_SRC}) -target_include_directories(${SIMDJSON_LIBRARY} SYSTEM PUBLIC "${SIMDJSON_INCLUDE_DIR}" PRIVATE "${SIMDJSON_SRC_DIR}") +add_library(simdjson ${SIMDJSON_SRC}) +target_include_directories(simdjson SYSTEM PUBLIC "${SIMDJSON_INCLUDE_DIR}" PRIVATE "${SIMDJSON_SRC_DIR}") diff --git a/src/Functions/CMakeLists.txt b/src/Functions/CMakeLists.txt index 244d08e104c..38ea9a89c6c 100644 --- a/src/Functions/CMakeLists.txt +++ b/src/Functions/CMakeLists.txt @@ -89,7 +89,7 @@ endif() target_link_libraries(clickhouse_functions PRIVATE hyperscan) if(USE_SIMDJSON) - target_link_libraries(clickhouse_functions PRIVATE ${SIMDJSON_LIBRARY}) + target_link_libraries(clickhouse_functions PRIVATE simdjson) endif() if(USE_RAPIDJSON)