CMakeLists.txt 3.2 KB
Newer Older
G
groot 已提交
1
#-------------------------------------------------------------------------------
J
jinhai 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
G
groot 已提交
18
#-------------------------------------------------------------------------------
J
jinhai 已提交
19

S
starlord 已提交
20 21 22 23
aux_source_directory(${MILVUS_ENGINE_SRC}/db db_main_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/engine db_engine_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/insert db_insert_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/db/meta db_meta_files)
24 25
aux_source_directory(${MILVUS_ENGINE_SRC}/config config_files)
aux_source_directory(${MILVUS_ENGINE_SRC}/cache cache_srcs)
S
starlord 已提交
26
aux_source_directory(${MILVUS_ENGINE_SRC}/wrapper/knowhere knowhere_src)
W
wxyu 已提交
27 28 29 30 31 32
aux_source_directory(${MILVUS_ENGINE_SRC}/scheduler/action scheduler_action_srcs)
aux_source_directory(${MILVUS_ENGINE_SRC}/scheduler/event scheduler_event_srcs)
aux_source_directory(${MILVUS_ENGINE_SRC}/scheduler/resource scheduler_resource_srcs)
aux_source_directory(${MILVUS_ENGINE_SRC}/scheduler/task scheduler_task_srcs)
aux_source_directory(${MILVUS_ENGINE_SRC}/scheduler scheduler_srcs)

G
groot 已提交
33
aux_source_directory(./ test_srcs)
G
groot 已提交
34

35
set(util_files
S
starlord 已提交
36
        ${MILVUS_ENGINE_SRC}/utils/Status.cpp
37
        ${MILVUS_ENGINE_SRC}/utils/ValidationUtil.cpp
S
starlord 已提交
38
        ${MILVUS_ENGINE_SRC}/utils/easylogging++.cc)
39

G
groot 已提交
40 41 42 43 44 45 46 47 48
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 已提交
49 50 51
include_directories(/usr/local/cuda/include)
link_directories("/usr/local/cuda/lib64")

Z
zhiru 已提交
52
include_directories(/usr/include/mysql)
G
groot 已提交
53 54

set(db_test_src
G
groot 已提交
55 56
    ${config_files}
    ${cache_srcs}
S
starlord 已提交
57 58 59 60
    ${db_main_files}
    ${db_engine_files}
    ${db_insert_files}
    ${db_meta_files}
G
groot 已提交
61
    ${db_scheduler_srcs}
G
groot 已提交
62
    ${wrapper_src}
W
wxyu 已提交
63 64 65 66 67
    ${scheduler_action_srcs}
    ${scheduler_event_srcs}
    ${scheduler_resource_srcs}
    ${scheduler_task_srcs}
    ${scheduler_srcs}
S
starlord 已提交
68
    ${knowhere_src}
69
    ${util_files}
G
groot 已提交
70
    ${require_files}
S
starlord 已提交
71
    ${test_srcs}
S
starlord 已提交
72
    )
G
groot 已提交
73 74 75 76

cuda_add_executable(db_test ${db_test_src})

set(db_libs
77
        sqlite
Z
update  
zhiru 已提交
78
        boost_system_static
Z
update  
zhiru 已提交
79
        boost_filesystem_static
X
Xu Peng 已提交
80
        lz4
Z
zhiru 已提交
81
        mysqlpp
G
groot 已提交
82 83
        )

S
starlord 已提交
84 85
set(knowhere_libs
        knowhere
S
starlord 已提交
86 87
        cudart
        cublas
S
starlord 已提交
88 89
        )

Z
zhiru 已提交
90
target_link_libraries(db_test ${db_libs} ${knowhere_libs} ${unittest_libs})
91

S
starlord 已提交
92
install(TARGETS db_test DESTINATION unittest)
Z
zhiru 已提交
93