CMakeLists.txt 2.0 KB
Newer Older
G
groot 已提交
1 2 3 4 5 6
#-------------------------------------------------------------------------------
# Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited.
# Proprietary and confidential.
#-------------------------------------------------------------------------------
include_directories(../../src)
G
groot 已提交
7
include_directories(/usr/include)
G
groot 已提交
8

G
groot 已提交
9
include_directories(/usr/local/cuda/include)
X
xj.lin 已提交
10
link_directories(/usr/local/cuda/lib64)
G
groot 已提交
11

G
groot 已提交
12
aux_source_directory(../../src/config config_files)
G
groot 已提交
13
aux_source_directory(../../src/cache cache_srcs)
G
groot 已提交
14
aux_source_directory(../../src/wrapper wrapper_src)
G
groot 已提交
15
aux_source_directory(./ test_srcs)
G
groot 已提交
16

G
groot 已提交
17
set(utils_srcs
18
        ${MILVUS_ENGINE_SRC}/utils/StringHelpFunctions.cpp
G
groot 已提交
19 20
        ${MILVUS_ENGINE_SRC}/utils/TimeRecorder.cpp
        ${MILVUS_ENGINE_SRC}/utils/CommonUtil.cpp
G
groot 已提交
21
        ${MILVUS_ENGINE_SRC}/utils/LogUtil.cpp
22
        ${MILVUS_ENGINE_SRC}/utils/ValidationUtil.cpp
G
groot 已提交
23 24
        )

G
groot 已提交
25
cuda_add_executable(server_test
G
groot 已提交
26
        ${unittest_srcs}
G
groot 已提交
27
        ${config_files}
G
groot 已提交
28
        ${cache_srcs}
G
groot 已提交
29
        ${wrapper_src}
G
groot 已提交
30
        ${test_srcs}
G
groot 已提交
31
        ${utils_srcs}
G
groot 已提交
32
        ${require_files}
G
groot 已提交
33
        )
G
groot 已提交
34

G
groot 已提交
35
set(require_libs
X
MS-154  
xj.lin 已提交
36
        knowhere
G
groot 已提交
37
        faiss
X
MS-154  
xj.lin 已提交
38 39 40
        openblas
        lapack
        stdc++
G
groot 已提交
41 42
        cudart
        cublas
Z
zhiru 已提交
43 44 45
        sqlite
        boost_system_static
        boost_filesystem_static
G
groot 已提交
46 47 48 49
        snappy
        z
        bz2
        zstd
X
Xu Peng 已提交
50
        lz4
G
groot 已提交
51
        pthread
G
groot 已提交
52 53
        )

54
if(${BUILD_FAISS_WITH_MKL} STREQUAL "ON")
Z
zhiru 已提交
55
    set(require_libs ${require_libs} ${MKL_LIBS} ${MKL_LIBS})
Z
fix  
zhiru 已提交
56 57 58 59
else()
    set(require_libs ${require_libs}
            lapack
            openblas)
Z
zhiru 已提交
60 61
endif()

G
groot 已提交
62 63
target_link_libraries(server_test
        ${require_libs}
G
groot 已提交
64
        ${cuda_library}
Z
zhiru 已提交
65
        ${unittest_libs}
G
groot 已提交
66
        )
67 68

install(TARGETS server_test DESTINATION bin)
G
groot 已提交
69 70 71 72 73 74 75 76

configure_file(appendix/server_config.yaml
        "${CMAKE_CURRENT_BINARY_DIR}/milvus/conf/server_config.yaml"
        COPYONLY)

configure_file(appendix/log_config.conf
        "${CMAKE_CURRENT_BINARY_DIR}/milvus/conf/log_config.conf"
        COPYONLY)