Publishing 2019 R1 content
[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 if (WIN32)
48     set (IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_WIN})
49     set (IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_WIN})
50 else()
51     set (IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_LIN})
52     set (IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_LIN})
53 endif()
54 set(IE_DEBUG_POSTFIX "${IE_DEBUG_POSTFIX}" CACHE STRING "Debug postfix" FORCE)
55 list (APPEND IE_OPTIONS IE_DEBUG_POSTFIX)
56 set(IE_RELEASE_POSTFIX "${IE_RELEASE_POSTFIX}" CACHE STRING "Release postfix" FORCE)
57 list (APPEND IE_OPTIONS IE_RELEASE_POSTFIX)
58
59 ie_option (ENABLE_TESTS "unit and functional tests" OFF)
60
61 ie_option (ENABLE_GAPI_TESTS "unit tests for GAPI kernels" OFF)
62
63 ie_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF)
64
65 ie_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON)
66
67 ie_option (ENABLE_SAMPLES_CORE "console samples core library" ON)
68
69 ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
70
71 ie_option (COVERAGE "enable code coverage" OFF)
72
73 ie_option (ENABLE_STRESS_UNIT_TESTS "stress unit tests" OFF)
74
75 ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
76
77 ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
78
79 ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON)
80
81 ie_option (ENABLE_SEGMENTATION_TESTS "segmentation tests" ON)
82
83 ie_option (ENABLE_OBJECT_DETECTION_TESTS "object detection tests" ON)
84
85 ie_option (ENABLE_OPENCV "enables OpenCV" ON)
86
87 ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
88
89 ie_option (ENABLE_PLUGIN_RPATH "enables rpath information to be present in plugins binary, and in corresponding test_applications" ON)
90
91 ie_option (ENABLE_AFFINITY_GENERATOR "enables affinity generator build" OFF)
92
93 ie_option (ENABLE_DEBUG_SYMBOLS "generates symbols for debugging" OFF)
94
95 ie_option (ENABLE_PYTHON "enables ie python bridge build" OFF)
96
97 ie_option(ENABLE_CPPLINT "Enable cpplint checks during the build" OFF)
98 ie_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF)
99
100 #environment variables used
101
102 #name of environment variable stored path to temp directory"
103 set (DL_SDK_TEMP  "DL_SDK_TEMP")