CMakeLists.txt 2.3 KB
Newer Older
G
groot 已提交
1 2 3 4 5
#-------------------------------------------------------------------------------
# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.
#-------------------------------------------------------------------------------
S
starlord 已提交
6 7 8 9
aux_source_directory(${MILVUS_ENGINE_SRC}/db db_main_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/engine db_engine_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/insert db_insert_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/meta db_meta_files)
10 11
aux_source_directory(${MILVUS_ENGINE_SRC}/config config_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/cache cache_srcs)
S
starlord 已提交
12
aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper/knowhere knowhere_src)
G
groot 已提交
13
aux_source_directory(./ test_srcs)
G
groot 已提交
14

15 16 17
set(util_files
        ${MILVUS_ENGINE_SRC}/utils/ValidationUtil.cpp)

G
groot 已提交
18 19 20 21 22 23 24 25 26
aux_source_directory(${MILVUS_ENGINE_SRC}/db/scheduler scheduler_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/scheduler/context scheduler_context_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/scheduler/task scheduler_task_files)
set(db_scheduler_srcs
        ${scheduler_files}
        ${scheduler_context_files}
        ${scheduler_task_files}
        )

G
groot 已提交
27 28 29
include_directories(/usr/local/cuda/include)
link_directories("/usr/local/cuda/lib64")

Z
zhiru 已提交
30
include_directories(/usr/include/mysql)
G
groot 已提交
31

Z
update  
zhiru 已提交
32 33
#add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)

G
groot 已提交
34
set(db_test_src
G
groot 已提交
35 36
    ${config_files}
    ${cache_srcs}
S
starlord 已提交
37 38 39 40
    ${db_main_files}
    ${db_engine_files}
    ${db_insert_files}
    ${db_meta_files}
G
groot 已提交
41
    ${db_scheduler_srcs}
G
groot 已提交
42
    ${wrapper_src}
S
starlord 已提交
43
    ${knowhere_src}
44
    ${util_files}
G
groot 已提交
45
    ${require_files}
S
starlord 已提交
46
    ${test_srcs}
S
starlord 已提交
47
    )
G
groot 已提交
48 49 50 51

cuda_add_executable(db_test ${db_test_src})

set(db_libs
52
        sqlite
Z
update  
zhiru 已提交
53
        boost_system_static
Z
update  
zhiru 已提交
54
        boost_filesystem_static
X
Xu Peng 已提交
55
        lz4
Z
zhiru 已提交
56
        mysqlpp
G
groot 已提交
57 58
        )

S
starlord 已提交
59 60 61 62 63 64 65 66 67
set(knowhere_libs
        knowhere
        SPTAGLibStatic
        arrow
        jemalloc_pic
        faiss
        openblas
        lapack
        tbb
S
starlord 已提交
68 69
        cudart
        cublas
S
starlord 已提交
70 71
        )

72
if(${BUILD_FAISS_WITH_MKL} STREQUAL "ON")
Z
zhiru 已提交
73
    set(db_libs ${db_libs} ${MKL_LIBS} ${MKL_LIBS})
Z
fix  
zhiru 已提交
74 75 76 77
else()
    set(db_libs ${db_libs}
            lapack
            openblas)
Z
zhiru 已提交
78 79
endif()

Z
zhiru 已提交
80
target_link_libraries(db_test ${db_libs} ${knowhere_libs} ${unittest_libs})
81

Z
zhiru 已提交
82
install(TARGETS db_test DESTINATION bin)
Z
zhiru 已提交
83