CMakeLists.txt 1.6 KB
Newer Older
J
jinhai 已提交
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.
#-------------------------------------------------------------------------------

J
jinhai 已提交
7 8 9 10
aux_source_directory(cache cache_files)
aux_source_directory(config config_files)
aux_source_directory(server server_files)
aux_source_directory(utils utils_files)
G
groot 已提交
11
aux_source_directory(db db_files)
X
xj.lin 已提交
12
aux_source_directory(wrapper wrapper_files)
G
groot 已提交
13

G
groot 已提交
14 15 16
set(service_files
        thrift/gen-cpp/VecService.cpp
        thrift/gen-cpp/VectorService_constants.cpp
G
groot 已提交
17 18
        thrift/gen-cpp/VectorService_types.cpp
        )
G
groot 已提交
19

J
jinhai 已提交
20 21
set(vecwise_engine_src
        ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
G
groot 已提交
22
        ${cache_files}
G
groot 已提交
23
        ${db_files}
G
groot 已提交
24 25
        ${wrapper_files}
        )
X
xj.lin 已提交
26 27 28

include_directories(/usr/local/cuda/include)
find_library(cuda_library cudart cublas HINTS /usr/local/cuda/lib64)
J
jinhai 已提交
29

G
groot 已提交
30 31 32 33 34 35 36 37 38
cuda_add_library(vecwise_engine STATIC ${vecwise_engine_src})

set(engine_libs
        pthread
        faiss
        cudart
        cublas
        sqlite3
        )
G
groot 已提交
39

G
groot 已提交
40 41 42
target_link_libraries(vecwise_engine ${engine_libs} ${cuda_library})

add_executable(vecwise_server
G
groot 已提交
43 44 45
        ${config_files}
        ${server_files}
        ${utils_files}
G
groot 已提交
46
        ${service_files}
G
groot 已提交
47
        ${VECWISE_THIRD_PARTY_BUILD}/include/easylogging++.cc
G
groot 已提交
48 49
        )

G
groot 已提交
50
set(server_libs
G
groot 已提交
51 52 53
        yaml-cpp
        boost_system
        boost_filesystem
G
groot 已提交
54 55
        thrift
        pthread
G
groot 已提交
56
        vecwise_engine
G
groot 已提交
57
        )
G
groot 已提交
58 59

target_link_libraries(vecwise_server ${server_libs})