From faadf62bd5b1b18feec5f057c03660b5ebda885f Mon Sep 17 00:00:00 2001 From: feihongxu0824 Date: Mon, 8 Jun 2026 09:54:16 +0800 Subject: [PATCH] fix: use project root for diskann cmake paths (#464) --- src/core/algorithm/diskann/CMakeLists.txt | 2 +- tests/core/algorithm/diskann/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/algorithm/diskann/CMakeLists.txt b/src/core/algorithm/diskann/CMakeLists.txt index 443be55..1b22524 100644 --- a/src/core/algorithm/diskann/CMakeLists.txt +++ b/src/core/algorithm/diskann/CMakeLists.txt @@ -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) diff --git a/tests/core/algorithm/diskann/CMakeLists.txt b/tests/core/algorithm/diskann/CMakeLists.txt index 86d3848..2d919f2 100644 --- a/tests/core/algorithm/diskann/CMakeLists.txt +++ b/tests/core/algorithm/diskann/CMakeLists.txt @@ -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) @@ -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() \ No newline at end of file