1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
6 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
7 message(STATUS "Detected 64 bit architecture")
10 message(STATUS "Detected 32 bit architecture")
19 set(ENABLE_MKL_DNN OFF)
20 set(ENABLE_ICV_TESTS OFF)
26 set(ENABLE_ROCKHOPER OFF)
32 # disable all base plugins but Myriad
35 set(ENABLE_MKL_DNN OFF)
39 #minGW specific - under wine no support for downloading file and applying them using git
42 SET(ENABLE_CLDNN OFF) # dont have mingw dll for linking
43 set(ENABLE_SAMPLES OFF)
48 if(NOT(X86_64 OR X86))
52 if (NOT ENABLE_MKL_DNN)
57 set(ENABLE_MYRIAD OFF)
60 if(CMAKE_CROSSCOMPILING)
61 set(ENABLE_PROFILING_ITT OFF)
62 set(ENABLE_ROCKHOPER OFF)
65 #next section set defines to be accesible in c++/c code for certain feature
66 if (ENABLE_PROFILING_RAW)
67 add_definitions(-DENABLE_PROFILING_RAW=1)
71 add_definitions(-DENABLE_CLDNN=1)
75 add_definitions(-DENABLE_MYRIAD=1)
78 if (ENABLE_MYRIAD_NO_BOOT AND ENABLE_MYRIAD )
79 add_definitions(-DENABLE_MYRIAD_NO_BOOT=1)
83 add_definitions(-DENABLE_MKL_DNN=1)
87 add_definitions(-DENABLE_GNA)
89 set (DEFAULT_GNA_LIB GNA1_1401)
91 # "GNA library version: GNA1|GNA1_1401|GNA2" - default is 1401
92 if (NOT GNA_LIBRARY_VERSION STREQUAL "GNA1"
93 AND NOT GNA_LIBRARY_VERSION STREQUAL "GNA1_1401"
94 AND NOT GNA_LIBRARY_VERSION STREQUAL "GNA2")
95 set (GNA_LIBRARY_VERSION ${DEFAULT_GNA_LIB})
96 message(STATUS "GNA_LIBRARY_VERSION not set. Can be GNA1, GNA1_1401 or GNA2. Default is ${GNA_LIBRARY_VERSION}")
99 if (GNA_LIBRARY_VERSION STREQUAL "GNA2")
100 message(WARNING "GNA2 is not currently supported. Fallback to ${DEFAULT_GNA_LIB}")
101 set(GNA_LIBRARY_VERSION ${DEFAULT_GNA_LIB})
104 if (UNIX AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)
105 message(WARNING "${GNA_LIBRARY_VERSION} no supported on GCC version ${CMAKE_CXX_COMPILER_VERSION}. Fallback to GNA1")
106 set(GNA_LIBRARY_VERSION GNA1)
109 set(GNA_LIBRARY_VERSION "${GNA_LIBRARY_VERSION}" CACHE STRING "GNAVersion" FORCE)
110 list (APPEND IE_OPTIONS GNA_LIBRARY_VERSION)
114 set (ENABLE_SAMPLES_CORE ON)
117 if (DEVELOPMENT_PLUGIN_MODE)
118 message (STATUS "Enabled development plugin mode")
120 set (ENABLE_MKL_DNN OFF)
121 set (ENABLE_TESTS OFF)
123 message (STATUS "Initialising submodules")
124 execute_process (COMMAND git submodule update --init ${IE_MAIN_SOURCE_DIR}/thirdparty/pugixml
125 RESULT_VARIABLE git_res)
128 message (STATUS "Initialising submodules - done")
132 if (LINUX AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3)
133 set(ENABLE_UNICODE_PATH_SUPPORT OFF)
136 if (ENABLE_UNICODE_PATH_SUPPORT)
137 add_definitions(-DENABLE_UNICODE_PATH_SUPPORT=1)
140 print_enabled_features()