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.
#-------------------------------------------------------------------------------
6 7 8
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)
X
xj.lin 已提交
9
#aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper wrapper_src)
S
starlord 已提交
10
aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper/knowhere knowhere_src)
G
groot 已提交
11
aux_source_directory(./ test_srcs)
G
groot 已提交
12

13 14 15
set(util_files
        ${MILVUS_ENGINE_SRC}/utils/ValidationUtil.cpp)

G
groot 已提交
16 17 18 19 20 21 22 23 24
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 已提交
25 26 27
include_directories(/usr/local/cuda/include)
link_directories("/usr/local/cuda/lib64")

Z
zhiru 已提交
28
include_directories(/usr/include/mysql)
G
groot 已提交
29

Z
update  
zhiru 已提交
30 31
#add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)

G
groot 已提交
32
set(db_test_src
G
groot 已提交
33 34
    ${config_files}
    ${cache_srcs}
G
groot 已提交
35
    ${db_srcs}
G
groot 已提交
36
    ${db_scheduler_srcs}
G
groot 已提交
37
    ${wrapper_src}
S
starlord 已提交
38
    ${knowhere_src}
39
    ${util_files}
G
groot 已提交
40
    ${require_files}
S
starlord 已提交
41 42
    ${test_srcs}
        )
G
groot 已提交
43 44 45 46

cuda_add_executable(db_test ${db_test_src})

set(db_libs
47
        sqlite
Z
update  
zhiru 已提交
48
        boost_system_static
Z
update  
zhiru 已提交
49
        boost_filesystem_static
X
Xu Peng 已提交
50
        lz4
Z
zhiru 已提交
51
        mysqlpp
G
groot 已提交
52 53
        )

S
starlord 已提交
54 55 56 57 58 59 60 61 62
set(knowhere_libs
        knowhere
        SPTAGLibStatic
        arrow
        jemalloc_pic
        faiss
        openblas
        lapack
        tbb
S
starlord 已提交
63 64
        cudart
        cublas
S
starlord 已提交
65 66
        )

J
jinhai 已提交
67 68 69 70
target_link_libraries(db_test
        ${knowhere_libs}
        ${db_libs}
        ${unittest_libs}
Z
zhiru 已提交
71
        sqlite
Z
update  
zhiru 已提交
72
        boost_system_static
Z
update  
zhiru 已提交
73
        boost_filesystem_static
X
Xu Peng 已提交
74
        lz4
Z
zhiru 已提交
75
        mysqlpp
G
groot 已提交
76 77
        )

78
if(${BUILD_FAISS_WITH_MKL} STREQUAL "ON")
Z
zhiru 已提交
79
    set(db_libs ${db_libs} ${MKL_LIBS} ${MKL_LIBS})
Z
fix  
zhiru 已提交
80 81 82 83
else()
    set(db_libs ${db_libs}
            lapack
            openblas)
Z
zhiru 已提交
84 85
endif()

Z
zhiru 已提交
86
target_link_libraries(db_test ${db_libs} ${unittest_libs})
87

Z
zhiru 已提交
88
install(TARGETS db_test DESTINATION bin)
Z
zhiru 已提交
89