From 1410dc8695ac8051a85970d44e00378b588e7cbd Mon Sep 17 00:00:00 2001 From: starlord Date: Mon, 8 Jul 2019 09:42:54 +0800 Subject: [PATCH] fix build error Former-commit-id: b32b8705608b064a0209be5c8012e5a5d58c1b93 --- cpp/unittest/db/CMakeLists.txt | 13 ++++++------- cpp/unittest/metrics/CMakeLists.txt | 23 ++++++++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/cpp/unittest/db/CMakeLists.txt b/cpp/unittest/db/CMakeLists.txt index 3b0fb11b..44b09d7b 100644 --- a/cpp/unittest/db/CMakeLists.txt +++ b/cpp/unittest/db/CMakeLists.txt @@ -7,6 +7,7 @@ aux_source_directory(${MILVUS_ENGINE_SRC}/db db_srcs) aux_source_directory(${MILVUS_ENGINE_SRC}/config config_files) aux_source_directory(${MILVUS_ENGINE_SRC}/cache cache_srcs) aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper wrapper_src) +aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper/knowhere knowhere_src) aux_source_directory(./ test_srcs) aux_source_directory(${MILVUS_ENGINE_SRC}/db/scheduler scheduler_files) @@ -30,18 +31,14 @@ set(db_test_src ${db_srcs} ${db_scheduler_srcs} ${wrapper_src} + ${knowhere_src} ${require_files} - ${test_srcs}) + ${test_srcs} + ) cuda_add_executable(db_test ${db_test_src}) set(db_libs - knowhere - faiss - openblas - lapack - cudart - cublas sqlite3 boost_system boost_filesystem @@ -58,6 +55,8 @@ set(knowhere_libs openblas lapack tbb + cudart + cublas ) target_link_libraries(db_test ${db_libs} ${unittest_libs} ${knowhere_libs}) diff --git a/cpp/unittest/metrics/CMakeLists.txt b/cpp/unittest/metrics/CMakeLists.txt index be5a542d..d7ae12af 100644 --- a/cpp/unittest/metrics/CMakeLists.txt +++ b/cpp/unittest/metrics/CMakeLists.txt @@ -12,11 +12,12 @@ include_directories(../../src) -aux_source_directory(../../src/db db_srcs) -aux_source_directory(../../src/config config_files) -aux_source_directory(../../src/cache cache_srcs) -aux_source_directory(../../src/wrapper wrapper_src) -aux_source_directory(../../src/metrics metrics_src) +aux_source_directory(${MILVUS_ENGINE_SRC}/db db_srcs) +aux_source_directory(${MILVUS_ENGINE_SRC}/config config_files) +aux_source_directory(${MILVUS_ENGINE_SRC}/cache cache_srcs) +aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper wrapper_src) +aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper/knowhere knowhere_src) +aux_source_directory(${MILVUS_ENGINE_SRC}/src/metrics metrics_src) aux_source_directory(./ test_srcs) aux_source_directory(${MILVUS_ENGINE_SRC}/db/scheduler scheduler_files) @@ -54,18 +55,26 @@ set(count_test_src ${db_srcs} ${db_scheduler_srcs} ${wrapper_src} + ${knowhere_src} ${metrics_src} ${test_srcs} ) - add_executable(metrics_test ${count_test_src} ${require_files} ) -target_link_libraries(metrics_test +set(knowhere_libs knowhere + SPTAGLibStatic + arrow + jemalloc_pic faiss openblas lapack + tbb + ) + +target_link_libraries(metrics_test + ${knowhere_libs} cudart cublas sqlite3 -- GitLab