CMAKE: moved GNA var setting to proper place; removed find_package when build python...
[platform/upstream/dldt.git] / inference-engine / cmake / features_ie.cmake
1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 include (target_flags)
6 include (options)
7
8 #these options are aimed to optimize build time on development system
9
10 ie_option (ENABLE_GNA "GNA support for inference engine" ON)
11 ie_option (ENABLE_ROCKHOPER "use Rockhopper decoder for converting / output scores" ON)
12
13 ie_option (ENABLE_MKL_DNN "MKL-DNN plugin for inference engine" ON)
14
15 ie_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON)
16
17 ie_option (ENABLE_CLDNN_TESTS "Enable clDNN unit tests" OFF)
18
19 ie_option (ENABLE_CLDNN_BUILD "build clDnn from sources" OFF)
20
21 ie_option (ENABLE_PROFILING_ITT "ITT tracing of IE and plugins internals" ON)
22
23 ie_option (ENABLE_PROFILING_RAW "Raw counters profiling (just values, no start/stop time or timeline)" OFF)
24
25 # "MKL-DNN library might use MKL-ML or OpenBLAS for gemm tasks: MKL|OPENBLAS|JIT"
26 if (NOT GEMM STREQUAL "MKL"
27         AND NOT GEMM STREQUAL "OPENBLAS"
28         AND NOT GEMM STREQUAL "JIT")
29     set (GEMM "JIT")
30     message(STATUS "GEMM should be set to MKL, OPENBLAS or JIT. Default option is " ${GEMM})
31 endif()
32 set(GEMM "${GEMM}" CACHE STRING "Gemm implementation" FORCE)
33 list (APPEND IE_OPTIONS GEMM)
34
35 # "MKL-DNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
36 if (NOT THREADING STREQUAL "TBB"
37         AND NOT THREADING STREQUAL "TBB_AUTO"
38         AND NOT THREADING STREQUAL "OMP"
39         AND NOT THREADING STREQUAL "SEQ")
40     if (ARM OR AARCH64)
41         set (THREADING "SEQ")
42     else()
43         set (THREADING "TBB")
44     endif()
45     message(STATUS "THREADING should be set to TBB, TBB_AUTO, OMP or SEQ. Default option is " ${THREADING})
46 endif()
47 set(THREADING "${THREADING}" CACHE STRING "Threading" FORCE)
48 list (APPEND IE_OPTIONS THREADING)
49
50 ie_option (ENABLE_VPU "vpu targeted plugins for inference engine" ON)
51
52 ie_option (ENABLE_MYRIAD "myriad targeted plugin for inference engine" ON)
53
54 ie_option (ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF)
55
56 ie_option (ENABLE_TESTS "unit and functional tests" OFF)
57
58 ie_option (ENABLE_GAPI_TESTS "tests for GAPI kernels" OFF)
59
60 ie_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF)
61
62 ie_option (ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for mvnc api" OFF)
63
64 ie_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON)
65
66 ie_option (ENABLE_SAMPLES_CORE "console samples core library" ON)
67
68 ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
69
70 ie_option (ENABLE_FUZZING "instrument build for fuzzing" OFF)
71
72 ie_option (COVERAGE "enable code coverage" OFF)
73
74 ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
75
76 ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
77
78 ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON)
79
80 ie_option (ENABLE_SEGMENTATION_TESTS "segmentation tests" ON)
81
82 ie_option (ENABLE_OBJECT_DETECTION_TESTS "object detection tests" ON)
83
84 ie_option (ENABLE_OPENCV "enables OpenCV" ON)
85
86 ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
87
88 ie_option (ENABLE_PLUGIN_RPATH "enables rpath information to be present in plugins binary, and in corresponding test_applications" ON)
89
90 ie_option (ENABLE_DEBUG_SYMBOLS "generates symbols for debugging" OFF)
91
92 ie_option (ENABLE_PYTHON "enables ie python bridge build" OFF)
93
94 ie_option (DEVELOPMENT_PLUGIN_MODE "Disabled build of all plugins" OFF)
95
96 ie_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON)
97
98 ie_option (ENABLE_CPP_CCT "enables C++ version of Cross Check Tool" OFF)
99
100 ie_option (ENABLE_UNICODE_PATH_SUPPORT "Enable loading models from Unicode paths" ON)
101
102 ie_option (ENABLE_IR_READER "Compile with IR readers / parsers" ON)
103
104 if (UNIX AND NOT APPLE)
105     ie_option(ENABLE_CPPLINT "Enable cpplint checks during the build" ON)
106     ie_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF)
107 else()
108     set(ENABLE_CPPLINT OFF)
109 endif()
110
111 if (UNIX AND NOT APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.10)
112     ie_option(ENABLE_CPPCHECK "Enable cppcheck during the build" OFF)
113 else()
114     set(ENABLE_CPPCHECK OFF)
115 endif()