forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
80 lines (59 loc) · 2.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# OpenVINO Legacy C API test sample
set(TARGET_NAME "InferenceEngineCAPITests")
add_executable(${TARGET_NAME} ie_c_api_test.cpp test_model_repo.hpp)
target_link_libraries(${TARGET_NAME} PRIVATE openvino_c commonTestUtils gtest_main)
target_compile_definitions(${TARGET_NAME}
PRIVATE
$<$<BOOL:${ENABLE_GAPI_PREPROCESSING}>:ENABLE_GAPI_PREPROCESSING>
DATA_PATH=\"${DATA_PATH}\"
MODELS_PATH=\"${MODELS_PATH}\")
if(ENABLE_AUTO OR ENABLE_MULTI)
add_dependencies(${TARGET_NAME} openvino_auto_plugin)
endif()
if(ENABLE_AUTO_BATCH)
add_dependencies(${TARGET_NAME} openvino_auto_batch_plugin)
endif()
if(ENABLE_INTEL_CPU)
add_dependencies(${TARGET_NAME} openvino_intel_cpu_plugin)
endif()
if(ENABLE_INTEL_GPU)
add_dependencies(${TARGET_NAME} openvino_intel_gpu_plugin)
endif()
add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION tests
COMPONENT tests
EXCLUDE_FROM_ALL)
# OpenVINO 2.0 and Legacy C API test sample
set(TARGET_NAME "ov_capi_test")
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ov_*.cpp)
file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
add_executable(${TARGET_NAME} ${SOURCES} ${HEADERS})
target_link_libraries(${TARGET_NAME} PRIVATE openvino_c openvino::util
commonTestUtils gtest_main)
target_include_directories(${TARGET_NAME} PUBLIC
$<BUILD_INTERFACE:${OPENVINO_API_SOURCE_DIR}/include>)
target_compile_definitions(${TARGET_NAME}
PRIVATE
DATA_PATH=\"${DATA_PATH}\"
MODELS_PATH=\"${MODELS_PATH}\")
if(ENABLE_AUTO OR ENABLE_MULTI)
add_dependencies(${TARGET_NAME} openvino_auto_plugin)
endif()
if(ENABLE_AUTO_BATCH)
add_dependencies(${TARGET_NAME} openvino_auto_batch_plugin)
endif()
if(ENABLE_INTEL_CPU)
add_dependencies(${TARGET_NAME} openvino_intel_cpu_plugin)
endif()
if(ENABLE_INTEL_GPU)
add_dependencies(${TARGET_NAME} openvino_intel_gpu_plugin)
endif()
add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION tests
COMPONENT tests
EXCLUDE_FROM_ALL)