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

aux_source_directory(../../src/db db_srcs)
G
groot 已提交
9
aux_source_directory(../../src/db/scheduler db_scheduler_srcs)
G
groot 已提交
10 11
aux_source_directory(../../src/config config_files)
aux_source_directory(../../src/cache cache_srcs)
G
groot 已提交
12 13 14 15 16
aux_source_directory(../../src/wrapper wrapper_src)

include_directories(/usr/local/cuda/include)
link_directories("/usr/local/cuda/lib64")

G
groot 已提交
17 18 19 20 21
set(require_files
        ../../src/server/ServerConfig.cpp
        ../../src/utils/CommonUtil.cpp
        ../../src/utils/TimeRecorder.cpp
        )
G
groot 已提交
22 23 24

set(db_test_src
    ${unittest_srcs}
G
groot 已提交
25 26
    ${config_files}
    ${cache_srcs}
G
groot 已提交
27
    ${db_srcs}
G
groot 已提交
28
    ${db_scheduler_srcs}
G
groot 已提交
29
    ${wrapper_src}
G
groot 已提交
30
    ${require_files}
Z
update  
zhiru 已提交
31
    MySQLMetaImpl_test.cpp
X
Xu Peng 已提交
32
    utils.cpp
X
Xu Peng 已提交
33
    db_tests.cpp
X
Xu Peng 已提交
34
    meta_tests.cpp)
G
groot 已提交
35

Z
update  
zhiru 已提交
36 37
include_directories(/usr/include/mysql)

G
groot 已提交
38 39 40 41 42 43 44 45 46
cuda_add_executable(db_test ${db_test_src})

set(db_libs
        faiss
        cudart
        cublas
        sqlite3
        boost_system
        boost_filesystem
X
Xu Peng 已提交
47
        lz4
G
groot 已提交
48 49
        )

Z
update  
zhiru 已提交
50
target_link_libraries(db_test ${db_libs} ${unittest_libs} /usr/local/lib/libmysqlpp.so)