2020-02-11 22:48:49 +03:00
# Copyright (C) 2018-2020 Intel Corporation
2018-10-16 13:45:03 +03:00
# SPDX-License-Identifier: Apache-2.0
#
2020-02-11 22:48:49 +03:00
include ( target_flags )
2019-04-12 18:25:53 +03:00
include ( options )
2018-10-16 13:45:03 +03:00
2019-10-04 19:26:43 +03:00
#these options are aimed to optimize build time on development system
2018-10-16 13:45:03 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_GNA "GNA support for inference engine" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF )
2018-10-16 13:45:03 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_CLDNN_TESTS "Enable clDNN unit tests" OFF "ENABLE_CLDNN" OFF )
2019-10-04 19:26:43 +03:00
2018-11-23 16:19:43 +03:00
# "MKL-DNN library might use MKL-ML or OpenBLAS for gemm tasks: MKL|OPENBLAS|JIT"
2020-04-13 21:17:23 +03:00
if ( ENABLE_MKL_DNN )
if ( AARCH64 )
set ( GEMM_DEFAULT "OPENBLAS" )
2020-02-11 22:48:49 +03:00
else ( )
2020-04-13 21:17:23 +03:00
set ( GEMM_DEFAULT "JIT" )
endif ( )
set ( GEMM "${GEMM_DEFAULT}" CACHE STRING "GEMM implementation" )
set_property ( CACHE GEMM PROPERTY STRINGS "MKL" "OPENBLAS" "JIT" )
list ( APPEND IE_OPTIONS GEMM )
if ( NOT GEMM STREQUAL "MKL" AND
N O T G E M M S T R E Q U A L " O P E N B L A S " A N D
N O T G E M M S T R E Q U A L " J I T " )
message ( FATAL_ERROR "GEMM should be set to MKL, OPENBLAS or JIT. Default option is ${GEMM_DEFAULT}" )
2020-02-11 22:48:49 +03:00
endif ( )
2018-10-16 13:45:03 +03:00
endif ( )
2018-11-23 16:19:43 +03:00
# "MKL-DNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
2020-11-03 00:55:49 +03:00
if ( ARM OR ( MSVC AND ( ARM OR AARCH64 ) ) )
2020-04-13 21:17:23 +03:00
set ( THREADING_DEFAULT "SEQ" )
else ( )
set ( THREADING_DEFAULT "TBB" )
endif ( )
set ( THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading" )
set_property ( CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ" )
list ( APPEND IE_OPTIONS THREADING )
if ( NOT THREADING STREQUAL "TBB" AND
N O T T H R E A D I N G S T R E Q U A L " T B B _ A U T O " A N D
N O T T H R E A D I N G S T R E Q U A L " O M P " A N D
N O T T H R E A D I N G S T R E Q U A L " S E Q " )
message ( FATAL_ERROR "THREADING should be set to TBB, TBB_AUTO, OMP or SEQ. Default option is ${THREADING_DEFAULT}" )
endif ( )
if ( ENABLE_GNA )
2020-08-20 10:59:21 +03:00
if ( UNIX AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4 )
set ( DEFAULT_GNA_LIB GNA1 )
else ( )
set ( DEFAULT_GNA_LIB GNA2 )
endif ( )
2020-04-13 21:17:23 +03:00
set ( GNA_LIBRARY_VERSION "${DEFAULT_GNA_LIB}" CACHE STRING "GNAVersion" )
2020-08-20 10:59:21 +03:00
set_property ( CACHE GNA_LIBRARY_VERSION PROPERTY STRINGS "GNA1" "GNA1_1401" "GNA2" )
2020-04-13 21:17:23 +03:00
list ( APPEND IE_OPTIONS GNA_LIBRARY_VERSION )
2020-08-20 10:59:21 +03:00
if ( NOT GNA_LIBRARY_VERSION STREQUAL "GNA1" AND
N O T G N A _ L I B R A R Y _ V E R S I O N S T R E Q U A L " G N A 1 _ 1 4 0 1 " A N D
2020-04-13 21:17:23 +03:00
N O T G N A _ L I B R A R Y _ V E R S I O N S T R E Q U A L " G N A 2 " )
2020-08-20 10:59:21 +03:00
message ( FATAL_ERROR "GNA_LIBRARY_VERSION should be set to GNA1, GNA1_1401 or GNA2. Default option is ${DEFAULT_GNA_LIB}" )
2020-02-11 22:48:49 +03:00
endif ( )
2018-11-23 16:19:43 +03:00
endif ( )
2020-04-13 21:17:23 +03:00
2020-09-18 17:13:27 +03:00
ie_dependent_option ( ENABLE_VPU "vpu targeted plugins for inference engine" ON "NOT WINDOWS_PHONE;NOT WINDOWS_STORE" OFF )
2019-05-27 21:18:32 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_MYRIAD "myriad targeted plugin for inference engine" ON "ENABLE_VPU" OFF )
2019-05-27 21:18:32 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF "ENABLE_MYRIAD" OFF )
2019-05-27 21:18:32 +03:00
2020-05-13 21:12:22 +03:00
ie_dependent_option ( ENABLE_GAPI_TESTS "tests for GAPI kernels" ON "ENABLE_TESTS" OFF )
2019-01-21 21:31:31 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_GAPI_TESTS" OFF )
2019-01-21 21:31:31 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for mvnc api" OFF "ENABLE_TESTS;ENABLE_MYRIAD" OFF )
2019-08-09 19:02:42 +03:00
2020-05-26 11:57:02 +03:00
ie_dependent_option ( ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF )
2020-04-15 19:01:57 +03:00
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 )
2019-01-21 21:31:31 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_BEH_TESTS "tests oriented to check inference engine API corecteness" ON "ENABLE_TESTS" OFF )
2018-10-16 13:45:03 +03:00
2020-05-13 21:12:22 +03:00
ie_dependent_option ( ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF )
2018-10-16 13:45:03 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_SAMPLES "console samples are part of inference engine package" ON "NOT MINGW" OFF )
2019-08-09 19:02:42 +03:00
2020-05-21 17:14:03 +03:00
ie_dependent_option ( ENABLE_SPEECH_DEMO "enable speech demo integration" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF )
2020-04-13 21:17:23 +03:00
ie_option ( ENABLE_FUZZING "instrument build for fuzzing" OFF )
2018-10-16 13:45:03 +03:00
ie_option ( VERBOSE_BUILD "shows extra information about build" OFF )
ie_option ( ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF )
ie_option ( ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON )
ie_option ( ENABLE_OPENCV "enables OpenCV" ON )
2019-01-21 21:31:31 +03:00
ie_option ( ENABLE_PYTHON "enables ie python bridge build" OFF )
2020-08-19 06:53:17 +03:00
ie_option ( ENABLE_V7_SERIALIZE "enables serialization to IR v7" OFF )
2020-10-23 08:54:48 +03:00
set ( IE_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build" )
2018-10-16 13:45:03 +03:00
2020-04-13 21:17:23 +03:00
ie_dependent_option ( ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the Inference Engine binaries" ON "THREADING MATCHES TBB;LINUX" OFF )
2020-10-12 22:24:24 +02:00
ie_option ( USE_SYSTEM_PUGIXML "use the system copy of pugixml" OFF )