Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/core/algorithm/flat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)
#message(STATUS "PROJECT_ROOT_DIR = ${PROJECT_ROOT_DIR}")

if(NOT APPLE)
set(CORE_KNN_FLAT_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_flat
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm ${PROJECT_ROOT_DIR}/src/core/framework
LDFLAGS "${CORE_KNN_FLAT_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
9 changes: 9 additions & 0 deletions src/core/algorithm/flat_sparse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

# --exclude-libs is GNU ld / LLVM lld only; Apple ld does not support it.
# On macOS (Mach-O), symbol interposition works differently and the
# Arrow/Parquet double-free issue does not apply.
if(NOT APPLE)
set(CORE_KNN_FLAT_SPARSE_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_flat_sparse
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_FLAT_SPARSE_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/algorithm/hnsw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_KNN_HNSW_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_hnsw
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework sparsehash
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_HNSW_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/algorithm/hnsw_rabitq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ if(AUTO_DETECT_ARCH)
endforeach()
endif()

if(NOT APPLE)
set(CORE_KNN_HNSW_RABITQ_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_hnsw_rabitq
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework rabitqlib sparsehash
INCS . ${PROJECT_ROOT_DIR}/src ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_HNSW_RABITQ_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/algorithm/hnsw_sparse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_KNN_HNSW_SPARSE_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_hnsw_sparse
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework sparsehash
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_HNSW_SPARSE_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/algorithm/ivf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_KNN_IVF_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_ivf STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego core_framework core_knn_cluster
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_IVF_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/algorithm/vamana/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_KNN_VAMANA_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_knn_vamana
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS core_framework core_knn_hnsw sparsehash
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
LDFLAGS "${CORE_KNN_VAMANA_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/metric/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_METRIC_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_metric
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego zvec_turbo core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core
LDFLAGS "${CORE_METRIC_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/mixed_reducer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_MIX_REDUCER_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_mix_reducer STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core
LDFLAGS "${CORE_MIX_REDUCER_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/quantizer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_QUANTIZER_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_quantizer
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core
LDFLAGS "${CORE_QUANTIZER_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
6 changes: 6 additions & 0 deletions src/core/utility/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)

if(NOT APPLE)
set(CORE_UTILITY_LDFLAGS
"-Wl,--exclude-libs,libparquet.a:libarrow.a:libarrow_bundled_dependencies.a")
endif()

cc_library(
NAME core_utility
STATIC SHARED STRICT ALWAYS_LINK
SRCS *.cc
LIBS zvec_ailego core_framework
INCS . ${PROJECT_ROOT_DIR}/src/core
LDFLAGS "${CORE_UTILITY_LDFLAGS}"
VERSION "${PROXIMA_ZVEC_VERSION}"
)
Loading