Use ittnotify from thirdparty
[platform/upstream/dldt.git] / inference-engine / thirdparty / CMakeLists.txt
1 # Copyright (C) 2018-2020 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
6   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed")
7   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed")
8 endif()
9
10 function(build_with_lto)
11     if(ENABLE_LTO)
12         ie_enable_lto()
13     endif()
14
15     if (ENABLE_CLDNN)
16         set(CLDNN__OUTPUT_BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
17         set(CLDNN__OUTPUT_LIB_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
18         if (ENABLE_TESTS AND ENABLE_CLDNN_TESTS)
19             set(CLDNN__INCLUDE_TESTS ON CACHE BOOL "" FORCE)
20             set(CLDNN__INCLUDE_CORE_INTERNAL_TESTS ON CACHE BOOL "" FORCE)
21         else()
22             set(CLDNN__INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
23             set(CLDNN__INCLUDE_CORE_INTERNAL_TESTS OFF CACHE BOOL "" FORCE)
24         endif()
25         set(CLDNN__INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
26         set(CLDNN__INCLUDE_TUTORIAL OFF CACHE BOOL "" FORCE)
27         if (WIN32)
28             set(CLDNN__ARCHITECTURE_TARGET "Windows64" CACHE STRING "" FORCE)
29         elseif (ANDROID)
30             set(CLDNN__ARCHITECTURE_TARGET "Android64" CACHE STRING "" FORCE)
31         else()
32             set(CLDNN__ARCHITECTURE_TARGET "Linux64" CACHE STRING "" FORCE)
33         endif()
34
35         add_subdirectory(clDNN)
36     endif()
37
38     function(ie_build_pugixml)
39         set(BUILD_TESTS_current ${BUILD_TESTS})
40         set(BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE)
41         add_subdirectory(pugixml)
42         set(BUILD_TESTS ${BUILD_TESTS_current} CACHE BOOL "Build tests" FORCE)
43     endfunction()
44
45     ie_build_pugixml()
46     add_subdirectory(stb_lib)
47     add_subdirectory(ade)
48     add_subdirectory(fluid/modules/gapi)
49     add_subdirectory(ittnotify)
50
51     target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")
52
53     set_target_properties(pugixml ade fluid stb_image
54                           PROPERTIES FOLDER thirdparty)
55
56     # developer package
57
58     ie_developer_export_targets(ade fluid pugixml ittnotify)
59     if(TARGET pugixml_mt)
60         ie_developer_export_targets(pugixml_mt)
61         set_target_properties(pugixml_mt PROPERTIES FOLDER thirdparty)
62     endif()
63
64     if(ENABLE_MKL_DNN)
65         set(SDL_cmake_included ON)
66         include(mkldnn.cmake)
67     endif()
68 endfunction()
69
70 build_with_lto()