CMakeLists.txt 1.3 KB
Newer Older
J
jinhai 已提交
1
#-------------------------------------------------------------------------------
2
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
J
jinhai 已提交
3
#
4 5
# Licensed 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
J
jinhai 已提交
6
#
7 8 9 10 11
# 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.
J
jinhai 已提交
12 13
#-------------------------------------------------------------------------------

14 15 16 17 18 19 20 21 22 23
set(test_files
        test_metricbase.cpp
        test_metrics.cpp
        utils.cpp
        )

if (MILVUS_WITH_PROMETHEUS)
    set(test_files ${test_files}
            test_prometheus.cpp)
endif ()
Y
yu yunfeng 已提交
24

C
Cai Yudong 已提交
25
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-access-control")
S
starlord 已提交
26
add_executable(test_metrics
Z
update  
zhiru 已提交
27
        ${common_files}
C
Cai Yudong 已提交
28 29 30 31
        ${log_files}
        ${config_files}
        ${metrics_files}
        ${metrics_prometheus_files}
Z
zhiru 已提交
32
        ${test_files}
G
groot 已提交
33
        )
Y
yu yunfeng 已提交
34

S
starlord 已提交
35 36
target_link_libraries(test_metrics
        knowhere
37
        metrics
S
starlord 已提交
38
        ${unittest_libs})
39

S
starlord 已提交
40
install(TARGETS test_metrics DESTINATION unittest)