CMakeLists.txt 1.9 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
G
groot 已提交
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
G
groot 已提交
36
        stdc++
G
groot 已提交
37
        faiss
G
groot 已提交
38 39
        cudart
        cublas
Z
zhiru 已提交
40 41 42
        sqlite
        boost_system_static
        boost_filesystem_static
G
groot 已提交
43 44 45 46
        snappy
        z
        bz2
        zstd
X
Xu Peng 已提交
47
        lz4
G
groot 已提交
48
        pthread
G
groot 已提交
49 50
        )

51
if(${BUILD_FAISS_WITH_MKL} STREQUAL "ON")
Z
zhiru 已提交
52 53 54
    set(require_libs ${require_libs} ${MKL_LIBS} ${MKL_LIBS})
endif()

G
groot 已提交
55 56
target_link_libraries(server_test
        ${require_libs}
G
groot 已提交
57
        ${cuda_library}
Z
zhiru 已提交
58
        ${unittest_libs}
G
groot 已提交
59
        )
60 61

install(TARGETS server_test DESTINATION bin)
G
groot 已提交
62 63 64 65 66 67 68 69

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)