Publishing 2019 R1.1 content and Myriad plugin sources (#162)
[platform/upstream/dldt.git] / inference-engine / cmake / features.cmake
1 # Copyright (C) 2018-2019 Intel Corporation
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 #
5
6 include (options)
7
8 #this options are aimed to optimize build time on development system
9
10 #backed targets
11
12 ie_option (ENABLE_GNA "GNA support for inference engine" ON)
13
14 ie_option (ENABLE_MKL_DNN "MKL-DNN plugin for inference engine" ON)
15
16 ie_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON)
17
18 ie_option (ENABLE_PROFILING_ITT "ITT tracing of IE and plugins internals" ON)
19
20 ie_option (ENABLE_PROFILING_RAW "Raw counters profiling (just values, no start/stop time or timeline)" OFF)
21
22 # "MKL-DNN library might use MKL-ML or OpenBLAS for gemm tasks: MKL|OPENBLAS|JIT"
23 if (NOT GEMM STREQUAL "MKL"
24         AND NOT GEMM STREQUAL "OPENBLAS"
25         AND NOT GEMM STREQUAL "JIT")
26     set (GEMM "JIT")
27     message(STATUS "GEMM should be set to MKL, OPENBLAS or JIT. Default option is " ${GEMM})
28 endif()
29 set(GEMM "${GEMM}" CACHE STRING "Gemm implementation" FORCE)
30 list (APPEND IE_OPTIONS GEMM)
31
32 # "MKL-DNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
33 if (NOT THREADING STREQUAL "TBB"
34         AND NOT THREADING STREQUAL "OMP"
35         AND NOT THREADING STREQUAL "SEQ")
36     set (THREADING "TBB")
37     message(STATUS "THREADING should be set to TBB, OMP or SEQ. Default option is " ${THREADING})
38 endif()
39 set(THREADING "${THREADING}" CACHE STRING "Threading" FORCE)
40 list (APPEND IE_OPTIONS THREADING)
41
42 # Enable postfixes for Debug/Release builds
43 set (IE_DEBUG_POSTFIX_WIN "d")
44 set (IE_RELEASE_POSTFIX_WIN "")
45 set (IE_DEBUG_POSTFIX_LIN "")
46 set (IE_RELEASE_POSTFIX_LIN "")
47 set (IE_DEBUG_POSTFIX_MAC "d")
48 set (IE_RELEASE_POSTFIX_MAC "")
49
50 if (WIN32)
51     set (IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_WIN})
52     set (IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_WIN})
53 elseif(APPLE)
54     set (IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_MAC})
55     set (IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_MAC})
56 else()
57     set (IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_LIN})
58     set (IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_LIN})
59 endif()
60 set(IE_DEBUG_POSTFIX "${IE_DEBUG_POSTFIX}" CACHE STRING "Debug postfix" FORCE)
61 list (APPEND IE_OPTIONS IE_DEBUG_POSTFIX)
62 set(IE_RELEASE_POSTFIX "${IE_RELEASE_POSTFIX}" CACHE STRING "Release postfix" FORCE)
63 list (APPEND IE_OPTIONS IE_RELEASE_POSTFIX)
64
65 ie_option (ENABLE_VPU "vpu targeted plugins for inference engine" ON)
66
67 ie_option (ENABLE_MYRIAD "myriad targeted plugin for inference engine" ON)
68
69 ie_option (ENABLE_MYX_PCIE "myriad plugin with support PCIE device" OFF)
70
71 ie_option (ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF)
72
73 ie_option (ENABLE_TESTS "unit and functional tests" OFF)
74
75 ie_option (ENABLE_GAPI_TESTS "unit tests for GAPI kernels" OFF)
76
77 ie_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF)
78
79 ie_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON)
80
81 ie_option (ENABLE_SAMPLES_CORE "console samples core library" ON)
82
83 ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
84
85 ie_option (COVERAGE "enable code coverage" OFF)
86
87 ie_option (ENABLE_STRESS_UNIT_TESTS "stress unit tests" OFF)
88
89 ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
90
91 ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
92
93 ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON)
94
95 ie_option (ENABLE_SEGMENTATION_TESTS "segmentation tests" ON)
96
97 ie_option (ENABLE_OBJECT_DETECTION_TESTS "object detection tests" ON)
98
99 ie_option (ENABLE_OPENCV "enables OpenCV" ON)
100
101 ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
102
103 ie_option (ENABLE_PLUGIN_RPATH "enables rpath information to be present in plugins binary, and in corresponding test_applications" ON)
104
105 ie_option (ENABLE_AFFINITY_GENERATOR "enables affinity generator build" OFF)
106
107 ie_option (ENABLE_DEBUG_SYMBOLS "generates symbols for debugging" OFF)
108
109 ie_option (ENABLE_PYTHON "enables ie python bridge build" OFF)
110
111 ie_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON)
112
113 ie_option(ENABLE_CPPLINT "Enable cpplint checks during the build" OFF)
114 ie_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF)
115
116 #environment variables used
117
118 #name of environment variable stored path to temp directory"
119 set (DL_SDK_TEMP  "DL_SDK_TEMP")