Publishing 2019 R2 content (#223)
[platform/upstream/dldt.git] / inference-engine / thirdparty / CMakeLists.txt
1 # Copyright (C) 2018-2019 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-unknown-warning-option -Wno-inconsistent-missing-override -Wno-pass-failed")
7   set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-pass-failed")
8 endif()
9
10 add_subdirectory(pugixml)
11 export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
12 export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
13
14 add_subdirectory(stb_lib)
15 add_subdirectory(ade)
16
17 if (ENABLE_CLDNN)
18     set(CLDNN__OUTPUT_BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
19     set(CLDNN__OUTPUT_LIB_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
20     if (ENABLE_TESTS AND ENABLE_CLDNN_TESTS)
21         set(CLDNN__INCLUDE_TESTS ON CACHE BOOL "" FORCE)
22         set(CLDNN__INCLUDE_CORE_INTERNAL_TESTS ON CACHE BOOL "" FORCE)
23     else()
24         set(CLDNN__INCLUDE_TESTS OFF CACHE BOOL "" FORCE)
25         set(CLDNN__INCLUDE_CORE_INTERNAL_TESTS OFF CACHE BOOL "" FORCE)
26     endif()
27     set(CLDNN__INCLUDE_EXAMPLES OFF CACHE BOOL "" FORCE)
28     set(CLDNN__INCLUDE_TUTORIAL OFF CACHE BOOL "" FORCE)
29     if (WIN32)
30         set(CLDNN__ARCHITECTURE_TARGET "Windows64" 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 if (UNIX OR APPLE AND ${CMAKE_BUILD_TYPE} STREQUAL "Release")
39     remove_definitions(-fvisibility=hidden)
40     add_definitions(-fvisibility=default)
41 endif()
42
43 include(ngraph.cmake)
44
45 if (UNIX OR APPLE AND ${CMAKE_BUILD_TYPE} STREQUAL "Release")
46     remove_definitions(-fvisibility=default)
47     add_definitions(-fvisibility=hidden)
48 endif()
49
50 if(ENABLE_MKL_DNN)
51     include(mkldnn.cmake)
52 endif()
53
54 add_subdirectory("${IE_MAIN_SOURCE_DIR}/thirdparty/fluid/modules/gapi")