mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
project(Datastore) renamed the CMake auto-vars ClickHouse_SOURCE_DIR/BINARY_DIR; the contrib *-cmake glue + top-level CMakeLists submodule check still referenced the old names -> undefined -> false 'submodules not initialized'. Renamed all CMake refs (incl contrib glue). Found by spark build.
16 lines
1.0 KiB
CMake
16 lines
1.0 KiB
CMake
# See contrib/usearch-cmake/CMakeLists.txt, why only enabled on x86 and ARM
|
|
if (ARCH_AMD64 OR (ARCH_AARCH64 AND NOT NO_ARMV81_OR_HIGHER AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19))
|
|
set(SIMSIMD_PROJECT_DIR "${Datastore_SOURCE_DIR}/contrib/SimSIMD")
|
|
set(SIMSIMD_SRCS ${SIMSIMD_PROJECT_DIR}/c/lib.c)
|
|
add_library(_simsimd ${SIMSIMD_SRCS})
|
|
target_include_directories(_simsimd SYSTEM PUBLIC "${SIMSIMD_PROJECT_DIR}/include")
|
|
target_compile_definitions(_simsimd PUBLIC SIMSIMD_DYNAMIC_DISPATCH)
|
|
# Disable SVE: LLVM's MemorySanitizer cannot instrument SVE scalable vector types,
|
|
# emitting unconditional `__msan_warning_noreturn` at every SVE function entry.
|
|
target_compile_definitions(_simsimd PRIVATE SIMSIMD_TARGET_SVE=0 SIMSIMD_TARGET_SVE2=0)
|
|
add_library(ch_contrib::simsimd ALIAS _simsimd)
|
|
else()
|
|
# The latter requires Clang 19 because older versions had a buggy bf16 implementation.
|
|
message(STATUS "SimSIMD library is only supported on x86_64 with SSE or ARM with ARMv8.1 and Clang 19+")
|
|
endif()
|