2 # Copyright (C) 2018-2019 Intel Corporation.
4 # This software and the related documents are Intel copyrighted materials,
5 # and your use of them is governed by the express license under which they
6 # were provided to you (End User License Agreement for the Intel(R) Software
7 # Development Products (Version May 2017)). Unless the License provides
8 # otherwise, you may not use, modify, copy, publish, distribute, disclose or
9 # transmit this software or the related documents without Intel's prior
12 # This software and the related documents are provided as is, with no
13 # express or implied warranties, other than those that are expressly
14 # stated in the License.
17 if(NOT ENABLE_GAPI_TESTS)
18 message(WARNING "Skipping GAPI unit tests")
22 find_package(OpenCV COMPONENTS gapi)
24 message(WARNING "No suitable OpenCV version detected, " ${TARGET_NAME} " skipped")
28 add_subdirectory(fluid_test_computations)
30 file(GLOB SOURCES *.cpp common/*.cpp cpu/*.cpp)
31 file(GLOB HEADERS *.hpp common/*.hpp cpu/*.hpp)
33 set(TARGET opencv_test_gapi)
34 add_executable(${TARGET} ${SOURCES} ${HEADERS})
36 target_include_directories(${TARGET} PRIVATE
37 "${CMAKE_CURRENT_SOURCE_DIR}"
38 "${CMAKE_CURRENT_SOURCE_DIR}/common"
39 "${CMAKE_CURRENT_SOURCE_DIR}/cpu")
41 target_link_libraries(${TARGET} PRIVATE ${OpenCV_LIBS} inference_engine_s fluid_test_computations gtest gtest_main)
44 target_compile_definitions(${TARGET} PRIVATE -DPERF_TEST=1)
46 target_compile_definitions(${TARGET} PRIVATE -DPERF_TEST=0)