Skip to content
Open
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
29 changes: 29 additions & 0 deletions .github/workflows/03-macos-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,35 @@ jobs:
setuptools_scm
shell: bash

- name: Check CMake subproject integration
if: matrix.platform == 'linux-x64'
run: |
SMOKE_SOURCE="$RUNNER_TEMP/zvec-subproject-smoke"
SMOKE_BUILD="$RUNNER_TEMP/zvec-subproject-build"

mkdir -p "$SMOKE_SOURCE" "$SMOKE_BUILD"
cat > "$SMOKE_SOURCE/CMakeLists.txt" <<'EOF'
cmake_minimum_required(VERSION 3.13)
project(zvec_subproject_smoke LANGUAGES C CXX)

if(NOT ZVEC_SOURCE_DIR)
message(FATAL_ERROR "ZVEC_SOURCE_DIR is required")
endif()

add_subdirectory("${ZVEC_SOURCE_DIR}" zvec)
EOF

cmake -S "$SMOKE_SOURCE" -B "$SMOKE_BUILD" -G Ninja \
-DZVEC_SOURCE_DIR="$GITHUB_WORKSPACE" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TOOLS=OFF \
-DBUILD_C_BINDINGS=OFF \
-DBUILD_PYTHON_BINDINGS=OFF \
-DENABLE_WERROR=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
shell: bash

- name: Build from source
run: |
cd "$GITHUB_WORKSPACE"
Expand Down
4 changes: 2 additions & 2 deletions src/core/algorithm/diskann/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(${CMAKE_SOURCE_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)

file(GLOB_RECURSE ALL_SRCS *.cc *.c)

Expand Down Expand Up @@ -54,4 +54,4 @@ endif()
# as an optional plugin that users load at runtime via zvec::LoadDiskAnnPlugin().
set_target_properties(core_knn_diskann PROPERTIES
OUTPUT_NAME zvec_diskann_plugin
)
)
6 changes: 3 additions & 3 deletions tests/core/algorithm/diskann/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(${CMAKE_SOURCE_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)

file(GLOB_RECURSE ALL_TEST_SRCS *_test.cc)

Expand All @@ -9,6 +9,6 @@ foreach(CC_SRCS ${ALL_TEST_SRCS})
STRICT
LIBS zvec_ailego core_framework core_utility core_metric core_quantizer core_knn_cluster core_plugin core_knn_diskann
SRCS ${CC_SRCS}
INCS . ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/algorithm/diskann
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm/diskann
)
endforeach()
endforeach()
2 changes: 1 addition & 1 deletion thirdparty/FastPFOR/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include(${CMAKE_SOURCE_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)

# On ARM platforms, FastPFOR uses SIMDe to emulate SSE intrinsics.
# Detection covers native ARM builds AND cross-compilation (e.g. iOS/Android).
Expand Down
Loading