1 # Copyright (C) 2018-2020 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
8 #these options are aimed to optimize build time on development system
10 ie_dependent_option (ENABLE_GNA "GNA support for inference engine" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF)
12 ie_dependent_option (ENABLE_CLDNN_TESTS "Enable clDNN unit tests" OFF "ENABLE_CLDNN" OFF)
14 ie_dependent_option (ENABLE_PROFILING_ITT "ITT tracing of IE and plugins internals" ON "NOT CMAKE_CROSSCOMPILING" OFF)
16 # "MKL-DNN library might use MKL-ML or OpenBLAS for gemm tasks: MKL|OPENBLAS|JIT"
19 set(GEMM_DEFAULT "OPENBLAS")
21 set(GEMM_DEFAULT "JIT")
23 set(GEMM "${GEMM_DEFAULT}" CACHE STRING "GEMM implementation")
24 set_property(CACHE GEMM PROPERTY STRINGS "MKL" "OPENBLAS" "JIT")
25 list (APPEND IE_OPTIONS GEMM)
26 if (NOT GEMM STREQUAL "MKL" AND
27 NOT GEMM STREQUAL "OPENBLAS" AND
28 NOT GEMM STREQUAL "JIT")
29 message(FATAL_ERROR "GEMM should be set to MKL, OPENBLAS or JIT. Default option is ${GEMM_DEFAULT}")
33 # "MKL-DNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
35 set(THREADING_DEFAULT "SEQ")
37 set(THREADING_DEFAULT "TBB")
39 set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading")
40 set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
41 list (APPEND IE_OPTIONS THREADING)
42 if (NOT THREADING STREQUAL "TBB" AND
43 NOT THREADING STREQUAL "TBB_AUTO" AND
44 NOT THREADING STREQUAL "OMP" AND
45 NOT THREADING STREQUAL "SEQ")
46 message(FATAL_ERROR "THREADING should be set to TBB, TBB_AUTO, OMP or SEQ. Default option is ${THREADING_DEFAULT}")
50 if (UNIX AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)
51 set (DEFAULT_GNA_LIB GNA1)
53 set (DEFAULT_GNA_LIB GNA1_1401)
55 set(GNA_LIBRARY_VERSION "${DEFAULT_GNA_LIB}" CACHE STRING "GNAVersion")
56 set_property(CACHE GNA_LIBRARY_VERSION PROPERTY STRINGS "GNA1" "GNA1_1401" "GNA2")
57 list (APPEND IE_OPTIONS GNA_LIBRARY_VERSION)
58 if (NOT GNA_LIBRARY_VERSION STREQUAL "GNA1" AND
59 NOT GNA_LIBRARY_VERSION STREQUAL "GNA1_1401" AND
60 NOT GNA_LIBRARY_VERSION STREQUAL "GNA2")
61 message(FATAL_ERROR "GNA_LIBRARY_VERSION should be set to GNA1, GNA1_1401 or GNA2. Default option is ${DEFAULT_GNA_LIB}")
65 ie_option (ENABLE_VPU "vpu targeted plugins for inference engine" ON)
67 ie_dependent_option (ENABLE_MYRIAD "myriad targeted plugin for inference engine" ON "ENABLE_VPU" OFF)
69 ie_dependent_option (ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF "ENABLE_MYRIAD" OFF)
71 ie_dependent_option (ENABLE_GAPI_TESTS "tests for GAPI kernels" ON "ENABLE_TESTS" OFF)
73 ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_GAPI_TESTS" OFF)
75 ie_dependent_option (ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for mvnc api" OFF "ENABLE_TESTS;ENABLE_MYRIAD" OFF)
77 ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF)
79 ie_dependent_option (ENABLE_SAME_BRANCH_FOR_MODELS "uses same branch for models and for inference engine, if not enabled models are taken from master" OFF "ENABLE_TESTS" OFF)
81 ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check inference engine API corecteness" ON "ENABLE_TESTS" OFF)
83 ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF)
85 ie_dependent_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON "NOT MINGW" OFF)
87 ie_dependent_option (ENABLE_SPEECH_DEMO "enable speech demo integration" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF)
89 ie_option (ENABLE_FUZZING "instrument build for fuzzing" OFF)
91 ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
93 ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
95 ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON)
97 ie_option (ENABLE_OPENCV "enables OpenCV" ON)
99 ie_option (ENABLE_PYTHON "enables ie python bridge build" OFF)
101 ie_option (ENABLE_C "enables ie c bridge build" ON)
103 ie_dependent_option(ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF)
105 ie_dependent_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF)
107 ie_option(ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON)
109 set(IE_EXTRA_PLUGINS "" CACHE STRING "Extra paths for plugins to include into DLDT build tree")
111 ie_dependent_option(ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the Inference Engine binaries" ON "THREADING MATCHES TBB;LINUX" OFF)