Moved cmake functions, variables to API 2.0 naming style (#20281)

* Merge Linux CC + static build + clang compiler

* Improvements

* Removed ie prefixes from cmake scripts

* Fixes for NPU
This commit is contained in:
Ilya Lavrenov 2023-10-09 22:30:32 +04:00 committed by GitHub
parent cba4721cf6
commit ead4b8a0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
104 changed files with 508 additions and 467 deletions

View File

@ -60,9 +60,9 @@ jobs:
run: cmake -B build run: cmake -B build
- name: Shellcheck cmake target - name: Shellcheck cmake target
run: cmake --build build --target ie_shellcheck -j8 run: cmake --build build --target ov_shellcheck -j8
# always provide suggestions even for skipped scripts in ie_shellcheck tagret # always provide suggestions even for skipped scripts in ov_shellcheck tagret
- name: ShellCheck action - name: ShellCheck action
if: always() if: always()
uses: reviewdog/action-shellcheck@v1 uses: reviewdog/action-shellcheck@v1

View File

@ -30,7 +30,7 @@ endif()
project(OpenVINO DESCRIPTION "OpenVINO toolkit") project(OpenVINO DESCRIPTION "OpenVINO toolkit")
find_package(IEDevScripts REQUIRED find_package(OpenVINODeveloperScripts REQUIRED
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package" PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
@ -162,4 +162,4 @@ endif()
# provides a callback function to describe each component in repo # provides a callback function to describe each component in repo
include(cmake/packaging/packaging.cmake) include(cmake/packaging/packaging.cmake)
ie_cpack(${IE_CPACK_COMPONENTS_ALL}) ov_cpack(${OV_CPACK_COMPONENTS_ALL})

View File

@ -4,10 +4,12 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
if(NOT DEFINED IEDevScripts_DIR) if(NOT DEFINED OpenVINODeveloperScripts_DIR )
message(FATAL_ERROR "IEDevScripts_DIR is not defined") message(FATAL_ERROR "OpenVINODeveloperScripts_DIR is not defined")
endif() endif()
set(IEDevScripts_DIR "${OpenVINODeveloperScripts_DIR}") # for BW compatibility
# disable FindPkgConfig.cmake for Android # disable FindPkgConfig.cmake for Android
if(ANDROID) if(ANDROID)
# Android toolchain does not provide pkg-config file. So, cmake mistakenly uses # Android toolchain does not provide pkg-config file. So, cmake mistakenly uses
@ -23,7 +25,7 @@ macro(ov_set_if_not_defined var value)
endmacro() endmacro()
set(OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) set(OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${IEDevScripts_DIR}") set(CMAKE_MODULE_PATH "${OpenVINODeveloperScripts_DIR}")
function(set_ci_build_number) function(set_ci_build_number)
set(repo_root "${CMAKE_SOURCE_DIR}") set(repo_root "${CMAKE_SOURCE_DIR}")
@ -67,7 +69,7 @@ endif()
# Prepare temporary folder # Prepare temporary folder
# #
function(set_temp_directory temp_variable source_tree_dir) function(ov_set_temp_directory temp_variable source_tree_dir)
if(DEFINED OV_TEMP) if(DEFINED OV_TEMP)
message(STATUS "OV_TEMP cmake variable is set : ${OV_TEMP}") message(STATUS "OV_TEMP cmake variable is set : ${OV_TEMP}")
file(TO_CMAKE_PATH ${OV_TEMP} temp) file(TO_CMAKE_PATH ${OV_TEMP} temp)
@ -84,6 +86,11 @@ function(set_temp_directory temp_variable source_tree_dir)
endif() endif()
endfunction() endfunction()
macro(set_temp_directory)
message(WARNING "'set_temp_directory' is deprecated. Please, use 'ov_set_temp_directory'")
ov_set_temp_directory(${ARGV})
endmacro()
# #
# For cross-compilation # For cross-compilation
# #
@ -139,37 +146,41 @@ if(NOT DEFINED OUTPUT_ROOT)
endif() endif()
# Enable postfixes for Debug/Release builds # Enable postfixes for Debug/Release builds
set(IE_DEBUG_POSTFIX_WIN "d") set(OV_DEBUG_POSTFIX_WIN "d")
set(IE_RELEASE_POSTFIX_WIN "") set(OV_RELEASE_POSTFIX_WIN "")
set(IE_DEBUG_POSTFIX_LIN "") set(OV_DEBUG_POSTFIX_LIN "")
set(IE_RELEASE_POSTFIX_LIN "") set(OV_RELEASE_POSTFIX_LIN "")
set(IE_DEBUG_POSTFIX_MAC "d") set(OV_DEBUG_POSTFIX_MAC "d")
set(IE_RELEASE_POSTFIX_MAC "") set(OV_RELEASE_POSTFIX_MAC "")
if(WIN32) if(WIN32)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_WIN}) set(OV_DEBUG_POSTFIX ${OV_DEBUG_POSTFIX_WIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_WIN}) set(OV_RELEASE_POSTFIX ${OV_RELEASE_POSTFIX_WIN})
elseif(APPLE) elseif(APPLE)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_MAC}) set(OV_DEBUG_POSTFIX ${OV_DEBUG_POSTFIX_MAC})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_MAC}) set(OV_RELEASE_POSTFIX ${OV_RELEASE_POSTFIX_MAC})
else() else()
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_LIN}) set(OV_DEBUG_POSTFIX ${OV_DEBUG_POSTFIX_LIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_LIN}) set(OV_RELEASE_POSTFIX ${OV_RELEASE_POSTFIX_LIN})
endif() endif()
set(CMAKE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX}) set(CMAKE_DEBUG_POSTFIX ${OV_DEBUG_POSTFIX})
set(CMAKE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX}) set(CMAKE_RELEASE_POSTFIX ${OV_RELEASE_POSTFIX})
# Support CMake multi-configuration for Visual Studio / Ninja or Xcode build # Support CMake multi-configuration for Visual Studio / Ninja or Xcode build
if(OV_GENERATOR_MULTI_CONFIG) if(OV_GENERATOR_MULTI_CONFIG)
set(IE_BUILD_POSTFIX $<$<CONFIG:Debug>:${IE_DEBUG_POSTFIX}>$<$<CONFIG:Release>:${IE_RELEASE_POSTFIX}>) set(OV_BUILD_POSTFIX $<$<CONFIG:Debug>:${OV_DEBUG_POSTFIX}>$<$<CONFIG:Release>:${OV_RELEASE_POSTFIX}>)
else() else()
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(IE_BUILD_POSTFIX ${IE_DEBUG_POSTFIX}) set(OV_BUILD_POSTFIX ${OV_DEBUG_POSTFIX})
else() else()
set(IE_BUILD_POSTFIX ${IE_RELEASE_POSTFIX}) set(OV_BUILD_POSTFIX ${OV_RELEASE_POSTFIX})
endif() endif()
endif() endif()
add_definitions(-DOV_BUILD_POSTFIX=\"${OV_BUILD_POSTFIX}\")
# for BW compatibility; removed before 2024.0
set(IE_BUILD_POSTFIX ${OV_BUILD_POSTFIX})
add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\") add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\")
ov_set_if_not_defined(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}) ov_set_if_not_defined(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
@ -178,11 +189,6 @@ ov_set_if_not_defined(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FO
ov_set_if_not_defined(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}) ov_set_if_not_defined(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
ov_set_if_not_defined(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}) ov_set_if_not_defined(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
if(CPACK_GENERATOR MATCHES "^(DEB|RPM)$")
# to make sure that lib/<multiarch-triplet> is created on Debian
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Cmake install prefix" FORCE)
endif()
include(packaging/packaging) include(packaging/packaging)
if(APPLE) if(APPLE)
@ -261,7 +267,7 @@ include(api_validator/api_validator)
include(vs_version/vs_version) include(vs_version/vs_version)
include(plugins/plugins) include(plugins/plugins)
include(frontends/frontends) include(frontends/frontends)
include(add_ie_target) include(add_target_helpers)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
if(ENABLE_FUZZING) if(ENABLE_FUZZING)

View File

@ -23,7 +23,7 @@ ov_add_target(
link_dependencies link_dependencies
DEPENDENCIES DEPENDENCIES
dependencies dependencies
ie::important_plugin openvino::important_plugin
OBJECT_FILES OBJECT_FILES
object libraries object libraries
DEFINES DEFINES
@ -90,8 +90,7 @@ function(ov_add_target)
source_group("include" FILES ${includes}) source_group("include" FILES ${includes})
source_group("src" FILES ${sources}) source_group("src" FILES ${sources})
set(all_sources) set(all_sources ${sources} ${includes} ${ARG_OBJECT_FILES})
list(APPEND all_sources ${sources} ${includes} ${ARG_OBJECT_FILES})
# defining a target # defining a target
if (ARG_TYPE STREQUAL EXECUTABLE) if (ARG_TYPE STREQUAL EXECUTABLE)
@ -102,7 +101,7 @@ function(ov_add_target)
message(SEND_ERROR "Invalid target type ${ARG_TYPE} specified for target name ${ARG_NAME}") message(SEND_ERROR "Invalid target type ${ARG_TYPE} specified for target name ${ARG_NAME}")
endif() endif()
ieTargetLinkWholeArchive(${ARG_NAME} ${ARG_LINK_LIBRARIES_WHOLE_ARCHIVE}) ov_target_link_whole_archive(${ARG_NAME} ${ARG_LINK_LIBRARIES_WHOLE_ARCHIVE})
if (ARG_DEFINES) if (ARG_DEFINES)
target_compile_definitions(${ARG_NAME} PRIVATE ${ARG_DEFINES}) target_compile_definitions(${ARG_NAME} PRIVATE ${ARG_DEFINES})
@ -140,11 +139,6 @@ function(ov_add_target)
endif() endif()
endfunction() endfunction()
function(addIeTarget)
message(WARNING "'addIeTarget' is deprecated, please, use 'ov_add_target' instead")
ov_add_target(${ARGV})
endfunction()
#[[ #[[
Wrapper function over addIeTarget, that also adds a test with the same name. Wrapper function over addIeTarget, that also adds a test with the same name.
You could use You could use
@ -195,6 +189,13 @@ function(ov_add_test_target)
EXCLUDE_FROM_ALL) EXCLUDE_FROM_ALL)
endfunction() endfunction()
# deprecated
function(addIeTarget)
message(WARNING "'addIeTarget' is deprecated, please, use 'ov_add_target' instead")
ov_add_target(${ARGV})
endfunction()
function(addIeTargetTest) function(addIeTargetTest)
message(WARNING "'addIeTargetTest' is deprecated, please, use 'ov_add_test_target' instead") message(WARNING "'addIeTargetTest' is deprecated, please, use 'ov_add_test_target' instead")
ov_add_test_target(${ARGV}) ov_add_test_target(${ARGV})

View File

@ -29,7 +29,7 @@ if(WIN32)
endif() endif()
endif() endif()
function(_ie_add_api_validator_post_build_step_recursive) function(_ov_add_api_validator_post_build_step_recursive)
cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN}) cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN})
get_target_property(LIBRARY_TYPE ${API_VALIDATOR_TARGET} TYPE) get_target_property(LIBRARY_TYPE ${API_VALIDATOR_TARGET} TYPE)
@ -55,9 +55,9 @@ function(_ie_add_api_validator_post_build_step_recursive)
continue() continue()
endif() endif()
if(TARGET "${orig_library}") if(TARGET "${orig_library}")
_ie_add_api_validator_post_build_step_recursive(TARGET ${orig_library}) _ov_add_api_validator_post_build_step_recursive(TARGET ${orig_library})
else() else()
_ie_add_api_validator_post_build_step_recursive(TARGET ${library}) _ov_add_api_validator_post_build_step_recursive(TARGET ${library})
endif() endif()
endif() endif()
endforeach() endforeach()
@ -113,10 +113,10 @@ function(_ov_add_api_validator_post_build_step)
endif() endif()
# collect targets # collect targets
_ie_add_api_validator_post_build_step_recursive(TARGET ${API_VALIDATOR_TARGET}) _ov_add_api_validator_post_build_step_recursive(TARGET ${API_VALIDATOR_TARGET})
if (API_VALIDATOR_EXTRA) if (API_VALIDATOR_EXTRA)
foreach(target IN LISTS API_VALIDATOR_EXTRA) foreach(target IN LISTS API_VALIDATOR_EXTRA)
_ie_add_api_validator_post_build_step_recursive(TARGET ${target}) _ov_add_api_validator_post_build_step_recursive(TARGET ${target})
endforeach() endforeach()
endif() endif()
@ -171,7 +171,7 @@ function(_ov_add_api_validator_post_build_step)
-D ONECORE_API_VALIDATOR_EXCLUSION=${ONECORE_API_VALIDATOR_EXCLUSION} -D ONECORE_API_VALIDATOR_EXCLUSION=${ONECORE_API_VALIDATOR_EXCLUSION}
-D ONECORE_API_VALIDATOR_OUTPUT=${output_file} -D ONECORE_API_VALIDATOR_OUTPUT=${output_file}
-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-P "${IEDevScripts_DIR}/api_validator/api_validator_run.cmake") -P "${OpenVINODeveloperScripts_DIR}/api_validator/api_validator_run.cmake")
list(APPEND byproducts_files ${output_file}) list(APPEND byproducts_files ${output_file})
unset(target_name) unset(target_name)
@ -191,13 +191,15 @@ function(_ov_add_api_validator_post_build_step)
endfunction() endfunction()
# #
# ie_add_api_validator_post_build_step(TARGET <name>) # ov_add_api_validator_post_build_step(TARGET <name>)
# #
macro(ov_add_api_validator_post_build_step) function(ov_add_api_validator_post_build_step)
_ov_add_api_validator_post_build_step(${ARGV}) _ov_add_api_validator_post_build_step(${ARGN})
endmacro() endfunction()
macro(ie_add_api_validator_post_build_step) # deprecated
message(WARNING "ie_add_api_validator_post_build_step is deprecated, use ov_add_api_validator_post_build_step instead")
_ov_add_api_validator_post_build_step(${ARGV}) function(ie_add_api_validator_post_build_step)
endmacro() message(WARNING "'ie_add_api_validator_post_build_step' is deprecated, use 'ov_add_api_validator_post_build_step' instead")
_ov_add_api_validator_post_build_step(${ARGN})
endfunction()

View File

@ -88,10 +88,10 @@ function(ov_add_clang_format_target TARGET_NAME)
-D "CLANG_FORMAT=${CLANG_FORMAT}" -D "CLANG_FORMAT=${CLANG_FORMAT}"
-D "INPUT_FILE=${source_file}" -D "INPUT_FILE=${source_file}"
-D "OUTPUT_FILE=${output_file}" -D "OUTPUT_FILE=${output_file}"
-P "${IEDevScripts_DIR}/clang_format/clang_format_check.cmake" -P "${OpenVINODeveloperScripts_DIR}/clang_format/clang_format_check.cmake"
DEPENDS DEPENDS
"${source_file}" "${source_file}"
"${IEDevScripts_DIR}/clang_format/clang_format_check.cmake" "${OpenVINODeveloperScripts_DIR}/clang_format/clang_format_check.cmake"
COMMENT COMMENT
"[clang-format] ${source_file}" "[clang-format] ${source_file}"
VERBATIM) VERBATIM)
@ -110,10 +110,10 @@ function(ov_add_clang_format_target TARGET_NAME)
-D "CLANG_FORMAT=${CLANG_FORMAT}" -D "CLANG_FORMAT=${CLANG_FORMAT}"
-D "INPUT_FILES=${all_input_sources}" -D "INPUT_FILES=${all_input_sources}"
-D "EXCLUDE_PATTERNS=${CLANG_FORMAT_EXCLUDE_PATTERNS}" -D "EXCLUDE_PATTERNS=${CLANG_FORMAT_EXCLUDE_PATTERNS}"
-P "${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake" -P "${OpenVINODeveloperScripts_DIR}/clang_format/clang_format_fix.cmake"
DEPENDS DEPENDS
"${all_input_sources}" "${all_input_sources}"
"${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake" "${OpenVINODeveloperScripts_DIR}/clang_format/clang_format_fix.cmake"
COMMENT COMMENT
"[clang-format] ${TARGET_NAME}_fix" "[clang-format] ${TARGET_NAME}_fix"
VERBATIM) VERBATIM)

View File

@ -9,31 +9,31 @@ include(CheckCXXCompilerFlag)
# ov_disable_deprecated_warnings() # ov_disable_deprecated_warnings()
# #
# Disables deprecated warnings generation in current scope (directory, function) # Disables deprecated warnings generation in current scope (directory, function)
# Defines ie_c_cxx_deprecated varaible which contains C / C++ compiler flags # Defines ov_c_cxx_deprecated varaible which contains C / C++ compiler flags
# #
macro(ov_disable_deprecated_warnings) macro(ov_disable_deprecated_warnings)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(ie_c_cxx_deprecated "/wd4996") set(ov_c_cxx_deprecated "/wd4996")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(WIN32) if(WIN32)
set(ie_c_cxx_deprecated "/Qdiag-disable:1478,1786") set(ov_c_cxx_deprecated "/Qdiag-disable:1478,1786")
else() else()
set(ie_c_cxx_deprecated "-diag-disable=1478,1786") set(ov_c_cxx_deprecated "-diag-disable=1478,1786")
endif() endif()
elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX) elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
set(ie_c_cxx_deprecated "-Wno-deprecated-declarations") set(ov_c_cxx_deprecated "-Wno-deprecated-declarations")
else() else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}") message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif() endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ie_c_cxx_deprecated}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ov_c_cxx_deprecated}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ie_c_cxx_deprecated}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ov_c_cxx_deprecated}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ie_c_cxx_deprecated}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ov_c_cxx_deprecated}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ie_c_cxx_deprecated}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ov_c_cxx_deprecated}")
endmacro() endmacro()
macro(disable_deprecated_warnings) macro(disable_deprecated_warnings)
message(WARNING "disable_deprecated_warnings is deprecated, use ov_disable_deprecated_warnings instead") message(WARNING "'disable_deprecated_warnings' is deprecated, use 'ov_disable_deprecated_warnings' instead")
ov_disable_deprecated_warnings() ov_disable_deprecated_warnings()
endmacro() endmacro()
@ -41,30 +41,30 @@ endmacro()
# ov_deprecated_no_errors() # ov_deprecated_no_errors()
# #
# Don't threat deprecated warnings as errors in current scope (directory, function) # Don't threat deprecated warnings as errors in current scope (directory, function)
# Defines ie_c_cxx_deprecated_no_errors varaible which contains C / C++ compiler flags # Defines ov_c_cxx_deprecated_no_errors varaible which contains C / C++ compiler flags
# #
macro(ov_deprecated_no_errors) macro(ov_deprecated_no_errors)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# show 4996 only for /w4 # show 4996 only for /w4
set(ie_c_cxx_deprecated_no_errors "/wd4996") set(ov_c_cxx_deprecated_no_errors "/wd4996")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(WIN32) if(WIN32)
set(ie_c_cxx_deprecated_no_errors "/Qdiag-warning:1478,1786") set(ov_c_cxx_deprecated_no_errors "/Qdiag-warning:1478,1786")
else() else()
set(ie_c_cxx_deprecated_no_errors "-diag-warning=1478,1786") set(ov_c_cxx_deprecated_no_errors "-diag-warning=1478,1786")
endif() endif()
elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX) elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
set(ie_c_cxx_deprecated_no_errors "-Wno-error=deprecated-declarations") set(ov_c_cxx_deprecated_no_errors "-Wno-error=deprecated-declarations")
# Suppress #warning messages # Suppress #warning messages
set(ie_c_cxx_deprecated_no_errors "${ie_c_cxx_deprecated_no_errors} -Wno-cpp") set(ov_c_cxx_deprecated_no_errors "${ov_c_cxx_deprecated_no_errors} -Wno-cpp")
else() else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}") message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif() endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ie_c_cxx_deprecated_no_errors}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ov_c_cxx_deprecated_no_errors}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ie_c_cxx_deprecated_no_errors}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ov_c_cxx_deprecated_no_errors}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ie_c_cxx_deprecated_no_errors}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ov_c_cxx_deprecated_no_errors}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ie_c_cxx_deprecated_no_errors}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ov_c_cxx_deprecated_no_errors}")
endmacro() endmacro()
# #
@ -74,24 +74,24 @@ endmacro()
# #
macro(ov_dev_package_no_errors) macro(ov_dev_package_no_errors)
if(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX) if(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
set(ie_c_cxx_dev_no_errors "-Wno-all") set(ov_c_cxx_dev_no_errors "-Wno-all")
if(SUGGEST_OVERRIDE_SUPPORTED) if(SUGGEST_OVERRIDE_SUPPORTED)
set(ie_cxx_dev_no_errors "-Wno-error=suggest-override") set(ov_cxx_dev_no_errors "-Wno-error=suggest-override")
endif() endif()
endif() endif()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ie_c_cxx_dev_no_errors} ${ie_cxx_dev_no_errors}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${ov_c_cxx_dev_no_errors} ${ov_cxx_dev_no_errors}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ie_c_cxx_dev_no_errors}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${ov_c_cxx_dev_no_errors}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ie_c_cxx_dev_no_errors} ${ie_cxx_dev_no_errors}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ov_c_cxx_dev_no_errors} ${ov_cxx_dev_no_errors}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ie_c_cxx_dev_no_errors}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ov_c_cxx_dev_no_errors}")
endmacro() endmacro()
# #
# ie_sse42_optimization_flags(<output flags>) # ov_sse42_optimization_flags(<output flags>)
# #
# Provides SSE4.2 compilation flags depending on an OS and a compiler # Provides SSE4.2 compilation flags depending on an OS and a compiler
# #
macro(ie_sse42_optimization_flags flags) macro(ov_sse42_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# No such option for MSVC 2019 # No such option for MSVC 2019
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
@ -111,11 +111,11 @@ macro(ie_sse42_optimization_flags flags)
endmacro() endmacro()
# #
# ie_avx2_optimization_flags(<output flags>) # ov_avx2_optimization_flags(<output flags>)
# #
# Provides AVX2 compilation flags depending on an OS and a compiler # Provides AVX2 compilation flags depending on an OS and a compiler
# #
macro(ie_avx2_optimization_flags flags) macro(ov_avx2_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(${flags} /arch:AVX2) set(${flags} /arch:AVX2)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
@ -132,12 +132,12 @@ macro(ie_avx2_optimization_flags flags)
endmacro() endmacro()
# #
# ie_avx512_optimization_flags(<output flags>) # ov_avx512_optimization_flags(<output flags>)
# #
# Provides common AVX512 compilation flags for AVX512F instruction set support # Provides common AVX512 compilation flags for AVX512F instruction set support
# depending on an OS and a compiler # depending on an OS and a compiler
# #
macro(ie_avx512_optimization_flags flags) macro(ov_avx512_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(${flags} /arch:AVX512) set(${flags} /arch:AVX512)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
@ -154,9 +154,9 @@ macro(ie_avx512_optimization_flags flags)
endmacro() endmacro()
# #
# ie_arm_neon_optimization_flags(<output flags>) # ov_arm_neon_optimization_flags(<output flags>)
# #
macro(ie_arm_neon_optimization_flags flags) macro(ov_arm_neon_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}") message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
@ -219,7 +219,7 @@ endfunction()
# Enables Link Time Optimization compilation # Enables Link Time Optimization compilation
# #
macro(ie_enable_lto) macro(ie_enable_lto)
message(WARNING "ie_add_compiler_flags is deprecated, set INTERPROCEDURAL_OPTIMIZATION_RELEASE target property instead") message(WARNING "'ie_enable_lto' is deprecated, set 'INTERPROCEDURAL_OPTIMIZATION_RELEASE' target property instead")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endmacro() endmacro()
@ -236,7 +236,7 @@ macro(ov_add_compiler_flags)
endmacro() endmacro()
macro(ie_add_compiler_flags) macro(ie_add_compiler_flags)
message(WARNING "ie_add_compiler_flags is deprecated, use ov_add_compiler_flags instead") message(WARNING "'ie_add_compiler_flags' is deprecated, use 'ov_add_compiler_flags' instead")
ov_add_compiler_flags(${ARGN}) ov_add_compiler_flags(${ARGN})
endmacro() endmacro()

View File

@ -16,7 +16,7 @@ endif()
set(OV_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage") set(OV_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage")
set(OV_COVERAGE_SCRIPT_DIR "${IEDevScripts_DIR}/coverage") set(OV_COVERAGE_SCRIPT_DIR "${OpenVINODeveloperScripts_DIR}/coverage")
include(CMakeParseArguments) include(CMakeParseArguments)
@ -171,9 +171,9 @@ function(ov_coverage_genhtml)
endfunction() endfunction()
# #
# ie_coverage_remove(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>) # ov_coverage_remove(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
# #
function(ie_coverage_remove) function(ov_coverage_remove)
cmake_parse_arguments(OV_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN}) cmake_parse_arguments(OV_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INPUT}.info") set(input_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INPUT}.info")
@ -199,9 +199,9 @@ function(ie_coverage_remove)
endfunction() endfunction()
# #
# ie_coverage_merge(OUTPUT <output file> INPUTS <input files ...>) # ov_coverage_merge(OUTPUT <output file> INPUTS <input files ...>)
# #
function(ie_coverage_merge) function(ov_coverage_merge)
cmake_parse_arguments(OV_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN}) cmake_parse_arguments(OV_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN})
set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_OUTPUT}.info") set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_OUTPUT}.info")
@ -227,6 +227,8 @@ function(ie_coverage_merge)
add_dependencies(ov_coverage_${OV_COVERAGE_OUTPUT}_info ${dependencies}) add_dependencies(ov_coverage_${OV_COVERAGE_OUTPUT}_info ${dependencies})
endfunction() endfunction()
# deprecated
if(NOT TARGET ie_coverage) if(NOT TARGET ie_coverage)
add_custom_target(ie_coverage) add_custom_target(ie_coverage)
set_target_properties(ie_coverage PROPERTIES FOLDER coverage) set_target_properties(ie_coverage PROPERTIES FOLDER coverage)

View File

@ -69,17 +69,17 @@ function(add_cpplint_target TARGET_NAME)
COMMAND COMMAND
"${CMAKE_COMMAND}" "${CMAKE_COMMAND}"
-D "Python3_EXECUTABLE=${Python3_EXECUTABLE}" -D "Python3_EXECUTABLE=${Python3_EXECUTABLE}"
-D "CPPLINT_SCRIPT=${IEDevScripts_DIR}/cpplint/cpplint.py" -D "CPPLINT_SCRIPT=${OpenVINODeveloperScripts_DIR}/cpplint/cpplint.py"
-D "INPUT_FILE=${source_file}" -D "INPUT_FILE=${source_file}"
-D "OUTPUT_FILE=${output_file}" -D "OUTPUT_FILE=${output_file}"
-D "WORKING_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" -D "WORKING_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}"
-D "SKIP_RETURN_CODE=${ENABLE_CPPLINT_REPORT}" -D "SKIP_RETURN_CODE=${ENABLE_CPPLINT_REPORT}"
-D "CUSTOM_FILTER=${custom_filter}" -D "CUSTOM_FILTER=${custom_filter}"
-P "${IEDevScripts_DIR}/cpplint/cpplint_run.cmake" -P "${OpenVINODeveloperScripts_DIR}/cpplint/cpplint_run.cmake"
DEPENDS DEPENDS
"${source_file}" "${source_file}"
"${IEDevScripts_DIR}/cpplint/cpplint.py" "${OpenVINODeveloperScripts_DIR}/cpplint/cpplint.py"
"${IEDevScripts_DIR}/cpplint/cpplint_run.cmake" "${OpenVINODeveloperScripts_DIR}/cpplint/cpplint_run.cmake"
COMMENT COMMENT
"[cpplint] ${source_file_relative_root}" "[cpplint] ${source_file_relative_root}"
VERBATIM) VERBATIM)

View File

@ -19,9 +19,9 @@ set(_DEFINE_AVX2 "HAVE_AVX2" ${_DEFINE_AVX})
set(_DEFINE_AVX512F "HAVE_AVX512F" ${_DEFINE_AVX2}) set(_DEFINE_AVX512F "HAVE_AVX512F" ${_DEFINE_AVX2})
## Arch specific compile options ## Arch specific compile options
ie_avx512_optimization_flags(_FLAGS_AVX512F) ov_avx512_optimization_flags(_FLAGS_AVX512F)
ie_avx2_optimization_flags (_FLAGS_AVX2) ov_avx2_optimization_flags (_FLAGS_AVX2)
ie_sse42_optimization_flags (_FLAGS_SSE42) ov_sse42_optimization_flags (_FLAGS_SSE42)
set(_FLAGS_AVX "") ## TBD is not defined for IE project yet set(_FLAGS_AVX "") ## TBD is not defined for IE project yet
set(_FLAGS_ANY "") ## set(_FLAGS_ANY "") ##

View File

@ -20,6 +20,8 @@ function(ov_build_target_faster TARGET_NAME)
endif() endif()
endfunction() endfunction()
# deprecated
function(ie_faster_build) function(ie_faster_build)
message(WARNING "ie_faster_build is deprecated, use ov_build_target_faster instead") message(WARNING "ie_faster_build is deprecated, use ov_build_target_faster instead")
ov_build_target_faster(${ARGV}) ov_build_target_faster(${ARGV})

View File

@ -6,19 +6,19 @@ include(options)
include(target_flags) include(target_flags)
set (CPACK_GENERATOR "TGZ" CACHE STRING "Cpack generator for OpenVINO") set (CPACK_GENERATOR "TGZ" CACHE STRING "Cpack generator for OpenVINO")
list (APPEND IE_OPTIONS CPACK_GENERATOR) list (APPEND OV_OPTIONS CPACK_GENERATOR)
# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but # FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but
# this must be addressed in a proper way # this must be addressed in a proper way
ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF ov_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF
"LINUX;EMSCRIPTEN OR NOT CMAKE_CROSSCOMPILING;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF) "LINUX;EMSCRIPTEN OR NOT CMAKE_CROSSCOMPILING;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF)
ie_option (OS_FOLDER "create OS dedicated folder in output" OFF) ov_option (OS_FOLDER "create OS dedicated folder in output" OFF)
if(OV_GENERATOR_MULTI_CONFIG) if(OV_GENERATOR_MULTI_CONFIG)
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" OFF) ov_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" OFF)
else() else()
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" ON) ov_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" ON)
endif() endif()
if(DEFINED ENV{CI_BUILD_NUMBER} AND NOT (WIN32 OR CMAKE_CROSSCOMPILING)) if(DEFINED ENV{CI_BUILD_NUMBER} AND NOT (WIN32 OR CMAKE_CROSSCOMPILING))
@ -27,37 +27,37 @@ else()
set(CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT OFF) set(CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT OFF)
endif() endif()
ie_option (CMAKE_COMPILE_WARNING_AS_ERROR "Enable warnings as errors" ${CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT}) ov_option (CMAKE_COMPILE_WARNING_AS_ERROR "Enable warnings as errors" ${CMAKE_COMPILE_WARNING_AS_ERROR_DEFAULT})
ie_dependent_option (ENABLE_QSPECTRE "Enable Qspectre mitigation" OFF "CMAKE_CXX_COMPILER_ID STREQUAL MSVC" OFF) ov_dependent_option (ENABLE_QSPECTRE "Enable Qspectre mitigation" OFF "CMAKE_CXX_COMPILER_ID STREQUAL MSVC" OFF)
ie_dependent_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF "CMAKE_CXX_COMPILER_ID STREQUAL MSVC" OFF) ov_dependent_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF "CMAKE_CXX_COMPILER_ID STREQUAL MSVC" OFF)
ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF) ov_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
ie_option (ENABLE_UB_SANITIZER "enable UndefinedBahavior sanitizer" OFF) ov_option (ENABLE_UB_SANITIZER "enable UndefinedBahavior sanitizer" OFF)
ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF) ov_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF)
ie_dependent_option (ENABLE_COVERAGE "enable code coverage" OFF "CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG" OFF) ov_dependent_option (ENABLE_COVERAGE "enable code coverage" OFF "CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG" OFF)
# Defines CPU capabilities # Defines CPU capabilities
ie_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF) ov_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF)
ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF) ov_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF)
ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF) ov_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR (X86 AND NOT EMSCRIPTEN)" OFF)
# Type of build, we add this as an explicit option to default it to ON # Type of build, we add this as an explicit option to default it to ON
get_property(BUILD_SHARED_LIBS_DEFAULT GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) get_property(BUILD_SHARED_LIBS_DEFAULT GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
ie_option (BUILD_SHARED_LIBS "Build as a shared library" ${BUILD_SHARED_LIBS_DEFAULT}) ov_option (BUILD_SHARED_LIBS "Build as a shared library" ${BUILD_SHARED_LIBS_DEFAULT})
# Android does not support SOVERSION # Android does not support SOVERSION
# see https://www.opengis.ch/2011/11/23/creating-non-versioned-shared-libraries-for-android/ # see https://www.opengis.ch/2011/11/23/creating-non-versioned-shared-libraries-for-android/
ie_dependent_option (ENABLE_LIBRARY_VERSIONING "Enable libraries versioning" ON "NOT WIN32;NOT ANDROID;BUILD_SHARED_LIBS" OFF) ov_dependent_option (ENABLE_LIBRARY_VERSIONING "Enable libraries versioning" ON "NOT WIN32;NOT ANDROID;BUILD_SHARED_LIBS" OFF)
ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF) ov_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF)
if(CMAKE_CROSSCOMPILING OR WIN32) if(CMAKE_CROSSCOMPILING OR WIN32)
set(STYLE_CHECKS_DEFAULT OFF) set(STYLE_CHECKS_DEFAULT OFF)
@ -65,22 +65,22 @@ else()
set(STYLE_CHECKS_DEFAULT ON) set(STYLE_CHECKS_DEFAULT ON)
endif() endif()
ie_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ${STYLE_CHECKS_DEFAULT}) ov_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ${STYLE_CHECKS_DEFAULT})
ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) ov_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF)
ie_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ${STYLE_CHECKS_DEFAULT}) ov_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ${STYLE_CHECKS_DEFAULT})
ie_option (ENABLE_NCC_STYLE "Enable ncc style check" ${STYLE_CHECKS_DEFAULT}) ov_option (ENABLE_NCC_STYLE "Enable ncc style check" ${STYLE_CHECKS_DEFAULT})
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF) ov_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1930) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1930)
# Visual Studio 2022: 1930-1939 = VS 17.0 (v143 toolset) # Visual Studio 2022: 1930-1939 = VS 17.0 (v143 toolset)
set(_msvc_version_2022 ON) set(_msvc_version_2022 ON)
endif() endif()
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_COMPILER_IS_CLANG OR _msvc_version_2022" OFF) ov_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_COMPILER_IS_CLANG OR _msvc_version_2022" OFF)
# #
# Check features # Check features

View File

@ -38,7 +38,7 @@ function(ov_generate_frontends_hpp)
ov_target_link_frontends(openvino) ov_target_link_frontends(openvino)
set(ov_frontends_hpp "${CMAKE_BINARY_DIR}/src/frontends/common/src/ov_frontends.hpp") set(ov_frontends_hpp "${CMAKE_BINARY_DIR}/src/frontends/common/src/ov_frontends.hpp")
set(frontends_hpp_in "${IEDevScripts_DIR}/frontends/ov_frontends.hpp.in") set(frontends_hpp_in "${OpenVINODeveloperScripts_DIR}/frontends/ov_frontends.hpp.in")
add_custom_command(OUTPUT "${ov_frontends_hpp}" add_custom_command(OUTPUT "${ov_frontends_hpp}"
COMMAND COMMAND
@ -46,10 +46,10 @@ function(ov_generate_frontends_hpp)
-D "OV_FRONTENDS_HPP_HEADER_IN=${frontends_hpp_in}" -D "OV_FRONTENDS_HPP_HEADER_IN=${frontends_hpp_in}"
-D "OV_FRONTENDS_HPP_HEADER=${ov_frontends_hpp}" -D "OV_FRONTENDS_HPP_HEADER=${ov_frontends_hpp}"
-D "FRONTEND_NAMES=${FRONTEND_NAMES}" -D "FRONTEND_NAMES=${FRONTEND_NAMES}"
-P "${IEDevScripts_DIR}/frontends/create_frontends_hpp.cmake" -P "${OpenVINODeveloperScripts_DIR}/frontends/create_frontends_hpp.cmake"
DEPENDS DEPENDS
"${frontends_hpp_in}" "${frontends_hpp_in}"
"${IEDevScripts_DIR}/frontends/create_frontends_hpp.cmake" "${OpenVINODeveloperScripts_DIR}/frontends/create_frontends_hpp.cmake"
COMMENT COMMENT
"Generate ov_frontends.hpp for static build" "Generate ov_frontends.hpp for static build"
VERBATIM) VERBATIM)

View File

@ -6,7 +6,7 @@ if(NOT COMMAND ov_check_pip_packages)
message(FATAL_ERROR "Internal error: ncc_naming_style.cmake must be included after ov_check_pip_packages") message(FATAL_ERROR "Internal error: ncc_naming_style.cmake must be included after ov_check_pip_packages")
endif() endif()
set(ncc_style_dir "${IEDevScripts_DIR}/ncc_naming_style") set(ncc_style_dir "${OpenVINODeveloperScripts_DIR}/ncc_naming_style")
set(ncc_style_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/ncc_naming_style") set(ncc_style_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/ncc_naming_style")
# find python3 # find python3

View File

@ -2,46 +2,47 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
# Usage: ie_option(<option_variable> "description" <initial value or boolean expression> [IF <condition>])
include (CMakeDependentOption) include (CMakeDependentOption)
if(POLICY CMP0127) if(POLICY CMP0127)
cmake_policy(SET CMP0127 NEW) cmake_policy(SET CMP0127 NEW)
endif() endif()
macro (ie_option variable description value) macro(ov_option variable description value)
option(${variable} "${description}" ${value}) option(${variable} "${description}" ${value})
list(APPEND OV_OPTIONS ${variable})
list(APPEND IE_OPTIONS ${variable}) list(APPEND IE_OPTIONS ${variable})
endmacro() endmacro()
# Usage: ov_option(<option_variable> "description" <initial value or boolean expression> [IF <condition>]) macro(ov_dependent_option variable description def_value condition fallback_value)
macro (ov_option variable description value)
ie_option(${variable} "${description}" ${value})
endmacro()
macro (ie_dependent_option variable description def_value condition fallback_value)
cmake_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value}) cmake_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value})
list(APPEND OV_OPTIONS ${variable})
list(APPEND IE_OPTIONS ${variable}) list(APPEND IE_OPTIONS ${variable})
endmacro() endmacro()
macro (ie_option_enum variable description value) macro(ov_option_enum variable description value)
set(OPTIONS) set(OPTIONS)
set(ONE_VALUE_ARGS) set(ONE_VALUE_ARGS)
set(MULTI_VALUE_ARGS ALLOWED_VALUES) set(MULTI_VALUE_ARGS ALLOWED_VALUES)
cmake_parse_arguments(IE_OPTION_ENUM "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN}) cmake_parse_arguments(OPTION_ENUM "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN})
if(NOT ${value} IN_LIST IE_OPTION_ENUM_ALLOWED_VALUES) if(NOT ${value} IN_LIST OPTION_ENUM_ALLOWED_VALUES)
message(FATAL_ERROR "variable must be one of ${IE_OPTION_ENUM_ALLOWED_VALUES}") message(FATAL_ERROR "Internal error: variable must be one of ${OPTION_ENUM_ALLOWED_VALUES}")
endif() endif()
list(APPEND OV_OPTIONS ${variable})
list(APPEND IE_OPTIONS ${variable}) list(APPEND IE_OPTIONS ${variable})
set(${variable} ${value} CACHE STRING "${description}") set(${variable} ${value} CACHE STRING "${description}")
set_property(CACHE ${variable} PROPERTY STRINGS ${IE_OPTION_ENUM_ALLOWED_VALUES}) set_property(CACHE ${variable} PROPERTY STRINGS ${OPTION_ENUM_ALLOWED_VALUES})
unset(OPTIONS)
unset(ONE_VALUE_ARGS)
unset(MULTI_VALUE_ARGS)
unset(OPTION_ENUM_ALLOWED_VALUES)
endmacro() endmacro()
function (print_enabled_features) function (ov_print_enabled_features)
if(NOT COMMAND set_ci_build_number) if(NOT COMMAND set_ci_build_number)
message(FATAL_ERROR "CI_BUILD_NUMBER is not set yet") message(FATAL_ERROR "CI_BUILD_NUMBER is not set yet")
endif() endif()
@ -49,8 +50,25 @@ function (print_enabled_features)
message(STATUS "OpenVINO Runtime enabled features: ") message(STATUS "OpenVINO Runtime enabled features: ")
message(STATUS "") message(STATUS "")
message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}") message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}")
foreach(_var ${IE_OPTIONS}) foreach(_var IN LISTS OV_OPTIONS)
message(STATUS " ${_var} = ${${_var}}") message(STATUS " ${_var} = ${${_var}}")
endforeach() endforeach()
message(STATUS "") message(STATUS "")
endfunction() endfunction()
# deprecated
macro (ie_option variable description value)
message(WARNING "'ie_option' is deprecated, please, use 'ov_option' instead")
ov_option(${variable} "${description}" ${value})
endmacro()
macro(ie_dependent_option variable description def_value condition fallback_value)
message(WARNING "'ie_dependent_option' is deprecated, please, use 'ov_dependent_option' instead")
ov_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value})
endmacro()
function(print_enabled_features)
message(WARNING "'print_enabled_features' is deprecated, please, use 'ov_print_enabled_features' instead")
ov_print_enabled_features()
endfunction()

View File

@ -44,11 +44,6 @@ macro(ov_archive_cpack_set_dirs)
set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}) set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER})
endif() endif()
set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}) set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR})
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro() endmacro()
ov_archive_cpack_set_dirs() ov_archive_cpack_set_dirs()

View File

@ -47,11 +47,6 @@ macro(ov_common_libraries_cpack_set_dirs)
# skipped during common libraries packaging # skipped during common libraries packaging
set(OV_CPACK_WHEELSDIR "tools") set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro() endmacro()
ov_common_libraries_cpack_set_dirs() ov_common_libraries_cpack_set_dirs()

View File

@ -45,11 +45,6 @@ macro(ov_debian_cpack_set_dirs)
# skipped during debian packaging # skipped during debian packaging
set(OV_CPACK_WHEELSDIR "tools") set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro() endmacro()
ov_debian_cpack_set_dirs() ov_debian_cpack_set_dirs()
@ -134,7 +129,9 @@ macro(ov_debian_specific_settings)
# homepage # homepage
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://docs.openvino.ai/") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://docs.openvino.ai/")
# use lintian to check packages in post-build step # use lintian to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${IEDevScripts_DIR}/packaging/debian/post_build.cmake") set(CPACK_POST_BUILD_SCRIPTS "${OpenVINODeveloperScripts_DIR}/packaging/debian/post_build.cmake")
# to make sure that lib/<multiarch-triplet> is created on Debian
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Cmake install prefix" FORCE)
# enable for debug cpack run # enable for debug cpack run
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_DEBUG) if(NOT DEFINED CPACK_DEBIAN_PACKAGE_DEBUG)
set(CPACK_DEBIAN_PACKAGE_DEBUG OFF) set(CPACK_DEBIAN_PACKAGE_DEBUG OFF)

View File

@ -83,11 +83,6 @@ macro(ov_archive_cpack_set_dirs)
set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}) set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER})
endif() endif()
set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}) set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR})
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro() endmacro()
ov_nsis_cpack_set_dirs() ov_nsis_cpack_set_dirs()

View File

@ -49,22 +49,22 @@ endfunction()
# Wraps original `cpack_add_component` and adds component to internal IE list # Wraps original `cpack_add_component` and adds component to internal IE list
# #
function(ov_cpack_add_component name) function(ov_cpack_add_component name)
if(NOT ${name} IN_LIST IE_CPACK_COMPONENTS_ALL) if(NOT ${name} IN_LIST OV_CPACK_COMPONENTS_ALL)
cpack_add_component(${name} ${ARGN}) cpack_add_component(${name} ${ARGN})
# need to store informarion about cpack_add_component arguments in CMakeCache.txt # need to store informarion about cpack_add_component arguments in CMakeCache.txt
# to restore it later # to restore it later
set(_${name}_cpack_component_args "${ARGN}" CACHE INTERNAL "Argument for cpack_add_component for ${name} cpack component" FORCE) set(_${name}_cpack_component_args "${ARGN}" CACHE INTERNAL "Argument for cpack_add_component for ${name} cpack component" FORCE)
list(APPEND IE_CPACK_COMPONENTS_ALL ${name}) list(APPEND OV_CPACK_COMPONENTS_ALL ${name})
set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE INTERNAL "" FORCE) set(OV_CPACK_COMPONENTS_ALL "${OV_CPACK_COMPONENTS_ALL}" CACHE INTERNAL "" FORCE)
endif() endif()
endfunction() endfunction()
foreach(comp IN LISTS IE_CPACK_COMPONENTS_ALL) foreach(comp IN LISTS OV_CPACK_COMPONENTS_ALL)
unset(_${comp}_cpack_component_args) unset(_${comp}_cpack_component_args)
endforeach() endforeach()
unset(IE_CPACK_COMPONENTS_ALL CACHE) unset(OV_CPACK_COMPONENTS_ALL CACHE)
# create `tests` component # create `tests` component
if(ENABLE_TESTS) if(ENABLE_TESTS)
@ -164,7 +164,7 @@ elseif(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|TZST|ZIP)$")
include(packaging/archive) include(packaging/archive)
endif() endif()
macro(ie_cpack) macro(ov_cpack)
set(CPACK_SOURCE_GENERATOR "") # not used set(CPACK_SOURCE_GENERATOR "") # not used
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenVINO™ Toolkit") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenVINO™ Toolkit")
set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED OFF) set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED OFF)
@ -223,3 +223,10 @@ macro(ie_cpack)
include(CPack) include(CPack)
endmacro() endmacro()
# deprecated
macro(ie_cpack)
message(WARNING "'ie_cpack' is deprecated. Please, use 'ov_cpack'")
ov_cpack(${ARGV})
endmacro()

View File

@ -36,11 +36,6 @@ macro(ov_rpm_cpack_set_dirs)
# skipped during rpm packaging # skipped during rpm packaging
set(OV_CPACK_WHEELSDIR "tools") set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro() endmacro()
ov_rpm_cpack_set_dirs() ov_rpm_cpack_set_dirs()
@ -128,7 +123,7 @@ macro(ov_rpm_specific_settings)
# TODO: fix "error: bad date in %changelog" # TODO: fix "error: bad date in %changelog"
# set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog") # set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog")
# use rpmlint to check packages in post-build step # use rpmlint to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${IEDevScripts_DIR}/packaging/rpm/post_build.cmake") set(CPACK_POST_BUILD_SCRIPTS "${OpenVINODeveloperScripts_DIR}/packaging/rpm/post_build.cmake")
# enable for debug cpack run # enable for debug cpack run
ov_set_if_not_defined(CPACK_RPM_PACKAGE_DEBUG OFF) ov_set_if_not_defined(CPACK_RPM_PACKAGE_DEBUG OFF)

View File

@ -8,7 +8,7 @@ set(PLUGIN_FILES "" CACHE INTERNAL "")
function(ov_plugin_get_file_name target_name library_name) function(ov_plugin_get_file_name target_name library_name)
set(LIB_PREFIX "${CMAKE_SHARED_MODULE_PREFIX}") set(LIB_PREFIX "${CMAKE_SHARED_MODULE_PREFIX}")
set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_MODULE_SUFFIX}") set(LIB_SUFFIX "${OV_BUILD_POSTFIX}${CMAKE_SHARED_MODULE_SUFFIX}")
get_target_property(LIB_NAME ${target_name} OUTPUT_NAME) get_target_property(LIB_NAME ${target_name} OUTPUT_NAME)
if (LIB_NAME STREQUAL "LIB_NAME-NOTFOUND") if (LIB_NAME STREQUAL "LIB_NAME-NOTFOUND")
@ -168,6 +168,7 @@ function(ov_add_plugin)
endfunction() endfunction()
function(ie_add_plugin) function(ie_add_plugin)
message(WARNING "'ie_add_plugin' is deprecated. Please, use 'ov_add_plugin'")
ov_add_plugin(${ARGN}) ov_add_plugin(${ARGN})
endfunction() endfunction()
@ -203,7 +204,7 @@ macro(ov_register_in_plugins_xml)
-D "OV_CONFIG_OUTPUT_FILE=${config_output_file}" -D "OV_CONFIG_OUTPUT_FILE=${config_output_file}"
-D "OV_PLUGIN_NAME=${device_name}" -D "OV_PLUGIN_NAME=${device_name}"
-D "OV_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins" -D "OV_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins"
-P "${IEDevScripts_DIR}/plugins/unregister_plugin_cmake.cmake" -P "${OpenVINODeveloperScripts_DIR}/plugins/unregister_plugin_cmake.cmake"
COMMENT COMMENT
"Remove ${device_name} from the plugins.xml file" "Remove ${device_name} from the plugins.xml file"
VERBATIM) VERBATIM)
@ -232,7 +233,7 @@ macro(ov_register_in_plugins_xml)
-D "OV_DEVICE_NAME=${device_name}" -D "OV_DEVICE_NAME=${device_name}"
-D "OV_PLUGIN_PROPERTIES=${${device_name}_CONFIG}" -D "OV_PLUGIN_PROPERTIES=${${device_name}_CONFIG}"
-D "OV_PLUGIN_LIBRARY_NAME=${library_name}" -D "OV_PLUGIN_LIBRARY_NAME=${library_name}"
-P "${IEDevScripts_DIR}/plugins/create_plugin_file.cmake" -P "${OpenVINODeveloperScripts_DIR}/plugins/create_plugin_file.cmake"
COMMENT "Register ${device_name} device as ${library_name}" COMMENT "Register ${device_name} device as ${library_name}"
VERBATIM) VERBATIM)
@ -247,7 +248,7 @@ macro(ov_register_in_plugins_xml)
-D "CMAKE_SHARED_MODULE_PREFIX=${CMAKE_SHARED_MODULE_PREFIX}" -D "CMAKE_SHARED_MODULE_PREFIX=${CMAKE_SHARED_MODULE_PREFIX}"
-D "OV_CONFIG_OUTPUT_FILE=${config_output_file}" -D "OV_CONFIG_OUTPUT_FILE=${config_output_file}"
-D "OV_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins" -D "OV_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins"
-P "${IEDevScripts_DIR}/plugins/register_plugin_cmake.cmake" -P "${OpenVINODeveloperScripts_DIR}/plugins/register_plugin_cmake.cmake"
COMMENT COMMENT
"Registering plugins to plugins.xml config file" "Registering plugins to plugins.xml config file"
VERBATIM) VERBATIM)
@ -266,6 +267,7 @@ endmacro()
# ie_register_plugins() # ie_register_plugins()
# #
macro(ie_register_plugins) macro(ie_register_plugins)
message(WARNING "'ie_register_plugins' is deprecated. Please, use 'ov_register_plugins'")
ov_register_plugins(${ARGN}) ov_register_plugins(${ARGN})
endmacro() endmacro()
@ -346,7 +348,7 @@ function(ov_generate_plugins_hpp)
else() else()
set(ov_plugins_hpp "${CMAKE_BINARY_DIR}/src/inference/ov_plugins.hpp") set(ov_plugins_hpp "${CMAKE_BINARY_DIR}/src/inference/ov_plugins.hpp")
endif() endif()
set(plugins_hpp_in "${IEDevScripts_DIR}/plugins/plugins.hpp.in") set(plugins_hpp_in "${OpenVINODeveloperScripts_DIR}/plugins/plugins.hpp.in")
add_custom_command(OUTPUT "${ov_plugins_hpp}" add_custom_command(OUTPUT "${ov_plugins_hpp}"
COMMAND COMMAND
@ -357,10 +359,10 @@ function(ov_generate_plugins_hpp)
-D "OV_PLUGINS_HPP_HEADER=${ov_plugins_hpp}" -D "OV_PLUGINS_HPP_HEADER=${ov_plugins_hpp}"
${device_configs} ${device_configs}
${as_extension} ${as_extension}
-P "${IEDevScripts_DIR}/plugins/create_plugins_hpp.cmake" -P "${OpenVINODeveloperScripts_DIR}/plugins/create_plugins_hpp.cmake"
DEPENDS DEPENDS
"${plugins_hpp_in}" "${plugins_hpp_in}"
"${IEDevScripts_DIR}/plugins/create_plugins_hpp.cmake" "${OpenVINODeveloperScripts_DIR}/plugins/create_plugins_hpp.cmake"
COMMENT COMMENT
"Generate ov_plugins.hpp" "Generate ov_plugins.hpp"
VERBATIM) VERBATIM)

View File

@ -7,7 +7,7 @@ if(NOT EXISTS "${OV_CONFIG_OUTPUT_FILE}")
endif() endif()
# remove plugin file # remove plugin file
file(REMOVE "${OV_CONFIGS_DIR}/${IE_PLUGIN_NAME}.xml") file(REMOVE "${OV_CONFIGS_DIR}/${OV_PLUGIN_NAME}.xml")
# remove plugin # remove plugin
set(newContent "") set(newContent "")
@ -15,7 +15,7 @@ file(STRINGS "${OV_CONFIG_OUTPUT_FILE}" content)
set(skip_plugin OFF) set(skip_plugin OFF)
foreach(line IN LISTS content) foreach(line IN LISTS content)
if("${line}" MATCHES "name=\"${IE_PLUGIN_NAME}\"") if("${line}" MATCHES "name=\"${OV_PLUGIN_NAME}\"")
set(skip_plugin ON) set(skip_plugin ON)
endif() endif()

View File

@ -103,7 +103,7 @@ function(ov_check_pip_packages)
from check_python_requirements import check_python_requirements ; from check_python_requirements import check_python_requirements ;
check_python_requirements('${ARG_REQUIREMENTS_FILE}') ; check_python_requirements('${ARG_REQUIREMENTS_FILE}') ;
" "
WORKING_DIRECTORY "${IEDevScripts_DIR}" WORKING_DIRECTORY "${OpenVINODeveloperScripts_DIR}"
RESULT_VARIABLE EXIT_CODE RESULT_VARIABLE EXIT_CODE
OUTPUT_VARIABLE OUTPUT_TEXT OUTPUT_VARIABLE OUTPUT_TEXT
ERROR_VARIABLE ERROR_TEXT) ERROR_VARIABLE ERROR_TEXT)

View File

@ -17,20 +17,20 @@ if(shellcheck_PROGRAM)
endif() endif()
endif() endif()
function(ie_shellcheck_process) function(ov_shellcheck_process)
if(NOT shellcheck_PROGRAM) if(NOT shellcheck_PROGRAM)
message(WARNING "shellcheck tool is not found") message(WARNING "shellcheck tool is not found")
return() return()
endif() endif()
cmake_parse_arguments(IE_SHELLCHECK "" "DIRECTORY" "SKIP" ${ARGN}) cmake_parse_arguments(SHELLCHECK "" "DIRECTORY" "SKIP" ${ARGN})
set(IE_SHELLCHECK_SCRIPT "${IEDevScripts_DIR}/shellcheck/shellcheck_process.cmake") set(SHELLCHECK_SCRIPT "${OpenVINODeveloperScripts_DIR}/shellcheck/shellcheck_process.cmake")
file(GLOB_RECURSE scripts "${IE_SHELLCHECK_DIRECTORY}/*.sh") file(GLOB_RECURSE scripts "${SHELLCHECK_DIRECTORY}/*.sh")
foreach(script IN LISTS scripts) foreach(script IN LISTS scripts)
# check if we need to skip scripts # check if we need to skip scripts
unset(skip_script) unset(skip_script)
foreach(skip_directory IN LISTS IE_SHELLCHECK_SKIP) foreach(skip_directory IN LISTS SHELLCHECK_SKIP)
if(script MATCHES "${skip_directory}/*") if(script MATCHES "${skip_directory}/*")
set(skip_script ON) set(skip_script ON)
endif() endif()
@ -39,21 +39,21 @@ function(ie_shellcheck_process)
continue() continue()
endif() endif()
string(REPLACE "${IE_SHELLCHECK_DIRECTORY}" "${CMAKE_BINARY_DIR}/shellcheck" output_file ${script}) string(REPLACE "${SHELLCHECK_DIRECTORY}" "${CMAKE_BINARY_DIR}/shellcheck" output_file ${script})
set(output_file "${output_file}.txt") set(output_file "${output_file}.txt")
get_filename_component(script_name "${script}" NAME) get_filename_component(script_name "${script}" NAME)
add_custom_command(OUTPUT ${output_file} add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-D IE_SHELLCHECK_PROGRAM=${shellcheck_PROGRAM} -D SHELLCHECK_PROGRAM=${shellcheck_PROGRAM}
-D IE_SHELL_SCRIPT=${script} -D SHELL_SCRIPT=${script}
-D IE_SHELLCHECK_OUTPUT=${output_file} -D SHELLCHECK_OUTPUT=${output_file}
-P ${IE_SHELLCHECK_SCRIPT} -P ${SHELLCHECK_SCRIPT}
DEPENDS ${script} ${IE_SHELLCHECK_SCRIPT} DEPENDS ${script} ${SHELLCHECK_SCRIPT}
COMMENT "Check script ${script_name}" COMMENT "Check script ${script_name}"
VERBATIM) VERBATIM)
list(APPEND outputs ${output_file}) list(APPEND outputs ${output_file})
endforeach() endforeach()
add_custom_target(ie_shellcheck DEPENDS ${outputs}) add_custom_target(ov_shellcheck DEPENDS ${outputs})
endfunction() endfunction()

View File

@ -2,25 +2,19 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
if(NOT DEFINED IE_SHELLCHECK_PROGRAM) foreach(var SHELLCHECK_PROGRAM SHELL_SCRIPT SHELLCHECK_OUTPUT)
message(FATAL_ERROR "IE_SHELLCHECK_PROGRAM is not defined") if(NOT DEFINED ${var})
endif() message(FATAL_ERROR "${var} is not defined")
endif()
if(NOT DEFINED IE_SHELL_SCRIPT) endforeach()
message(FATAL_ERROR "IE_SHELL_SCRIPT is not defined")
endif()
if(NOT DEFINED IE_SHELLCHECK_OUTPUT)
message(FATAL_ERROR "IE_SHELLCHECK_OUTPUT is not defined")
endif()
set(rules "SC1091,SC2164,SC2162,SC1090") set(rules "SC1091,SC2164,SC2162,SC1090")
execute_process(COMMAND ${IE_SHELLCHECK_PROGRAM} --exclude=${rules} ${IE_SHELL_SCRIPT} execute_process(COMMAND ${SHELLCHECK_PROGRAM} --exclude=${rules} ${SHELL_SCRIPT}
OUTPUT_VARIABLE error_message OUTPUT_VARIABLE error_message
RESULT_VARIABLE exit_code RESULT_VARIABLE exit_code
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
file(WRITE "${IE_SHELLCHECK_OUTPUT}" "${error_message}") file(WRITE "${SHELLCHECK_OUTPUT}" "${error_message}")
if(NOT exit_code EQUAL 0) if(NOT exit_code EQUAL 0)
message(FATAL_ERROR "${error_message}") message(FATAL_ERROR "${error_message}")

View File

@ -14,13 +14,13 @@
# Path to IE own version of TBBConfig.cmake old TBB version without cmake config. # Path to IE own version of TBBConfig.cmake old TBB version without cmake config.
if(APPLE) if(APPLE)
set(IE_OWN_TBB_CONFIG tbb/mac) set(_OV_OWN_TBB_CONFIG tbb/mac)
elseif(UNIX) elseif(UNIX)
set(IE_OWN_TBB_CONFIG tbb/lnx) set(_OV_OWN_TBB_CONFIG tbb/lnx)
elseif(WIN) elseif(WIN)
set(IE_OWN_TBB_CONFIG tbb/win) set(_OV_OWN_TBB_CONFIG tbb/win)
else() else()
unset(IE_OWN_TBB_CONFIG) unset(_OV_OWN_TBB_CONFIG)
endif() endif()
unset(TBB_DIR) unset(TBB_DIR)
@ -29,8 +29,10 @@ unset(TBB_DIR CACHE)
find_package(TBB find_package(TBB
2017.0 2017.0
CONFIG CONFIG
PATHS "${IEDevScripts_DIR}/${IE_OWN_TBB_CONFIG}" PATHS "${OpenVINODeveloperScripts_DIR}/${_OV_OWN_TBB_CONFIG}"
NO_DEFAULT_PATH NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH) NO_CMAKE_FIND_ROOT_PATH)
find_package_handle_standard_args(TBB CONFIG_MODE) find_package_handle_standard_args(TBB CONFIG_MODE)
unset(_OV_OWN_TBB_CONFIG)

View File

@ -166,6 +166,8 @@ endif()
ov_parse_ci_build_number() ov_parse_ci_build_number()
macro (addVersionDefines FILE) macro (addVersionDefines FILE)
message(WARNING "'addVersionDefines' is deprecated. Please, use 'ov_add_version_defines'")
set(__version_file ${FILE}) set(__version_file ${FILE})
if(NOT IS_ABSOLUTE ${__version_file}) if(NOT IS_ABSOLUTE ${__version_file})
set(__version_file "${CMAKE_CURRENT_SOURCE_DIR}/${__version_file}") set(__version_file "${CMAKE_CURRENT_SOURCE_DIR}/${__version_file}")

View File

@ -73,7 +73,7 @@ function(ov_add_vs_version_file)
set(OV_VS_VER_INTERNALNAME_STR ${VS_VER_NAME}) set(OV_VS_VER_INTERNALNAME_STR ${VS_VER_NAME})
set(vs_version_output "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc") set(vs_version_output "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc")
configure_file("${IEDevScripts_DIR}/vs_version/vs_version.rc.in" "${vs_version_output}" @ONLY) configure_file("${OpenVINODeveloperScripts_DIR}/vs_version/vs_version.rc.in" "${vs_version_output}" @ONLY)
source_group("src" FILES ${vs_version_output}) source_group("src" FILES ${vs_version_output})
target_sources(${VS_VER_NAME} PRIVATE ${vs_version_output}) target_sources(${VS_VER_NAME} PRIVATE ${vs_version_output})

View File

@ -5,15 +5,14 @@
#[[ #[[
function links static library without removing any symbol from it. function links static library without removing any symbol from it.
ieTargetLinkWholeArchive(<target name> <lib1> [<lib2> ...]) ov_target_link_whole_archive(<target name> <lib1> [<lib2> ...])
Example: Example:
ieTargetLinkWholeArchive("FunctionalTests" "CommonLib" "AnotherLib") ov_target_link_whole_archive("FunctionalTests" "CommonLib" "AnotherLib")
#]] #]]
function(ieTargetLinkWholeArchive targetName) function(ov_target_link_whole_archive targetName)
set(libs) foreach(staticLib IN LISTS ARGN)
foreach(staticLib ${ARGN})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# CMake does not support generator expression in LINK_FLAGS, so we workaround it a little bit: # CMake does not support generator expression in LINK_FLAGS, so we workaround it a little bit:
# passing same static library as normal link (to get build deps working, and includes too), than using WHOLEARCHIVE option # passing same static library as normal link (to get build deps working, and includes too), than using WHOLEARCHIVE option
@ -52,3 +51,10 @@ function(ieTargetLinkWholeArchive targetName)
target_link_libraries(${targetName} PRIVATE ${libs}) target_link_libraries(${targetName} PRIVATE ${libs})
endif() endif()
endfunction() endfunction()
# deprecated
function(ieTargetLinkWholeArchive)
message(WARNING "'ieTargetLinkWholeArchive' is deprecated, use 'ov_target_link_whole_archive' instead")
ov_target_link_whole_archive(${ARGN})
endfunction()

View File

@ -14,12 +14,12 @@ else()
set(ENABLE_INTEL_CPU_DEFAULT ON) set(ENABLE_INTEL_CPU_DEFAULT ON)
endif() endif()
ie_dependent_option (ENABLE_INTEL_CPU "CPU plugin for OpenVINO Runtime" ${ENABLE_INTEL_CPU_DEFAULT} ov_dependent_option (ENABLE_INTEL_CPU "CPU plugin for OpenVINO Runtime" ${ENABLE_INTEL_CPU_DEFAULT}
"RISCV64 OR X86 OR X86_64 OR AARCH64 OR ARM" OFF) "RISCV64 OR X86 OR X86_64 OR AARCH64 OR ARM" OFF)
ie_dependent_option (ENABLE_ARM_COMPUTE_CMAKE "Enable ARM Compute build via cmake" OFF "ENABLE_INTEL_CPU" OFF) ov_dependent_option (ENABLE_ARM_COMPUTE_CMAKE "Enable ARM Compute build via cmake" OFF "ENABLE_INTEL_CPU" OFF)
ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF) ov_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
if(ENABLE_TESTS) if(ENABLE_TESTS)
include(CTest) include(CTest)
@ -32,7 +32,7 @@ else()
set(ENABLE_INTEL_GPU_DEFAULT OFF) set(ENABLE_INTEL_GPU_DEFAULT OFF)
endif() endif()
ie_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF) ov_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF)
if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR (NOT BUILD_SHARED_LIBS AND ENABLE_INTEL_CPU)) if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR (NOT BUILD_SHARED_LIBS AND ENABLE_INTEL_CPU))
# oneDNN doesn't support old compilers and android builds for now, so we'll build GPU plugin without oneDNN # oneDNN doesn't support old compilers and android builds for now, so we'll build GPU plugin without oneDNN
@ -42,31 +42,31 @@ else()
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT ON) set(ENABLE_ONEDNN_FOR_GPU_DEFAULT ON)
endif() endif()
ie_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF) ov_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT} "ENABLE_INTEL_GPU" OFF)
ie_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF) ov_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
ie_dependent_option (ENABLE_GPU_DEBUG_CAPS "enable GPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS;ENABLE_INTEL_GPU" OFF) ov_dependent_option (ENABLE_GPU_DEBUG_CAPS "enable GPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS;ENABLE_INTEL_GPU" OFF)
ie_dependent_option (ENABLE_CPU_DEBUG_CAPS "enable CPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS;ENABLE_INTEL_CPU" OFF) ov_dependent_option (ENABLE_CPU_DEBUG_CAPS "enable CPU debug capabilities at runtime" ON "ENABLE_DEBUG_CAPS;ENABLE_INTEL_CPU" OFF)
ie_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF) ov_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF)
ie_option_enum(ENABLE_PROFILING_FILTER "Enable or disable ITT counter groups.\ ov_option_enum(ENABLE_PROFILING_FILTER "Enable or disable ITT counter groups.\
Supported values:\ Supported values:\
ALL - enable all ITT counters (default value)\ ALL - enable all ITT counters (default value)\
FIRST_INFERENCE - enable only first inference time counters" ALL FIRST_INFERENCE - enable only first inference time counters" ALL
ALLOWED_VALUES ALL FIRST_INFERENCE) ALLOWED_VALUES ALL FIRST_INFERENCE)
ie_option (ENABLE_PROFILING_FIRST_INFERENCE "Build with ITT tracing of first inference time." ON) ov_option (ENABLE_PROFILING_FIRST_INFERENCE "Build with ITT tracing of first inference time." ON)
ie_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \ ov_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \
In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should contain the path to the collected IntelSEAPI statistics. \ In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should contain the path to the collected IntelSEAPI statistics. \
Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF
ALLOWED_VALUES ON OFF COLLECT) ALLOWED_VALUES ON OFF COLLECT)
ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF) ov_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
find_package(PkgConfig QUIET) find_package(PkgConfig QUIET)
ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX OR APPLE;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF) ov_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX OR APPLE;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF)
# #
# OpenVINO Runtime specific options # OpenVINO Runtime specific options
@ -82,7 +82,7 @@ endif()
set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading") set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading")
set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ") set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
list (APPEND IE_OPTIONS THREADING) list (APPEND OV_OPTIONS THREADING)
if (NOT THREADING STREQUAL "TBB" AND if (NOT THREADING STREQUAL "TBB" AND
NOT THREADING STREQUAL "TBB_AUTO" AND NOT THREADING STREQUAL "TBB_AUTO" AND
NOT THREADING STREQUAL "OMP" AND NOT THREADING STREQUAL "OMP" AND
@ -97,50 +97,50 @@ else()
set(ENABLE_TBBBIND_2_5_DEFAULT OFF) set(ENABLE_TBBBIND_2_5_DEFAULT OFF)
endif() endif()
ie_dependent_option (ENABLE_TBBBIND_2_5 "Enable TBBBind_2_5 static usage in OpenVINO runtime" ${ENABLE_TBBBIND_2_5_DEFAULT} "THREADING MATCHES TBB; NOT APPLE" OFF) ov_dependent_option (ENABLE_TBBBIND_2_5 "Enable TBBBind_2_5 static usage in OpenVINO runtime" ${ENABLE_TBBBIND_2_5_DEFAULT} "THREADING MATCHES TBB; NOT APPLE" OFF)
ie_dependent_option (ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the OpenVINO Runtime binaries" ON "THREADING MATCHES TBB;LINUX" OFF) ov_dependent_option (ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the OpenVINO Runtime binaries" ON "THREADING MATCHES TBB;LINUX" OFF)
ie_dependent_option (ENABLE_INTEL_GNA "GNA support for OpenVINO Runtime" ON ov_dependent_option (ENABLE_INTEL_GNA "GNA support for OpenVINO Runtime" ON
"NOT APPLE;NOT ANDROID;X86_64;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.4" OFF) "NOT APPLE;NOT ANDROID;X86_64;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.4" OFF)
ie_dependent_option (ENABLE_INTEL_GNA_DEBUG "GNA debug build" OFF "ENABLE_INTEL_GNA" OFF) ov_dependent_option (ENABLE_INTEL_GNA_DEBUG "GNA debug build" OFF "ENABLE_INTEL_GNA" OFF)
ie_dependent_option (ENABLE_V7_SERIALIZE "enables serialization to IR v7" OFF "ENABLE_INTEL_GNA" OFF) ov_dependent_option (ENABLE_V7_SERIALIZE "enables serialization to IR v7" OFF "ENABLE_INTEL_GNA" OFF)
ie_dependent_option (ENABLE_IR_V7_READER "Enables IR v7 reader" ${BUILD_SHARED_LIBS} "ENABLE_TESTS;ENABLE_INTEL_GNA" OFF) ov_dependent_option (ENABLE_IR_V7_READER "Enables IR v7 reader" ${BUILD_SHARED_LIBS} "ENABLE_TESTS;ENABLE_INTEL_GNA" OFF)
ie_dependent_option (ENABLE_GAPI_PREPROCESSING "Enables G-API preprocessing" ON "NOT MINGW64" OFF) ov_dependent_option (ENABLE_GAPI_PREPROCESSING "Enables G-API preprocessing" ON "NOT MINGW64" OFF)
ie_option (ENABLE_MULTI "Enables MULTI Device Plugin" ON) ov_option (ENABLE_MULTI "Enables MULTI Device Plugin" ON)
ie_option (ENABLE_AUTO "Enables AUTO Device Plugin" ON) ov_option (ENABLE_AUTO "Enables AUTO Device Plugin" ON)
ie_option (ENABLE_AUTO_BATCH "Enables Auto-Batching Plugin" ON) ov_option (ENABLE_AUTO_BATCH "Enables Auto-Batching Plugin" ON)
ie_option (ENABLE_HETERO "Enables Hetero Device Plugin" ON) ov_option (ENABLE_HETERO "Enables Hetero Device Plugin" ON)
ie_option (ENABLE_TEMPLATE "Enable template plugin" ON) ov_option (ENABLE_TEMPLATE "Enable template plugin" ON)
ie_dependent_option (ENABLE_PLUGINS_XML "Generate plugins.xml configuration file or not" OFF "BUILD_SHARED_LIBS" OFF) ov_dependent_option (ENABLE_PLUGINS_XML "Generate plugins.xml configuration file or not" OFF "BUILD_SHARED_LIBS" OFF)
ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_TESTS;ENABLE_GAPI_PREPROCESSING" OFF) ov_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performance" OFF "ENABLE_TESTS;ENABLE_GAPI_PREPROCESSING" OFF)
ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF) ov_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF)
ie_option (ENABLE_SAMPLES "console samples are part of OpenVINO Runtime package" ON) ov_option (ENABLE_SAMPLES "console samples are part of OpenVINO Runtime package" ON)
set(OPENVINO_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build") set(OPENVINO_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build")
find_host_package(Python3 QUIET COMPONENTS Interpreter) find_host_package(Python3 QUIET COMPONENTS Interpreter)
if(Python3_Interpreter_FOUND) if(Python3_Interpreter_FOUND)
ie_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ON) ov_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ON)
else() else()
ie_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" OFF) ov_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" OFF)
endif() endif()
ie_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON) ov_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON)
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON) ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ie_option(ENABLE_OV_PYTORCH_FRONTEND "Enable PyTorch FrontEnd" ON) ov_option(ENABLE_OV_PYTORCH_FRONTEND "Enable PyTorch FrontEnd" ON)
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON) ov_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ie_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON) ov_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON)
ie_option(ENABLE_OV_TF_LITE_FRONTEND "Enable TensorFlow Lite FrontEnd" ON) ov_option(ENABLE_OV_TF_LITE_FRONTEND "Enable TensorFlow Lite FrontEnd" ON)
ie_dependent_option(ENABLE_SNAPPY_COMPRESSION "Enables compression support for TF FE" ON ov_dependent_option(ENABLE_SNAPPY_COMPRESSION "Enables compression support for TF FE" ON
"ENABLE_OV_TF_FRONTEND" OFF) "ENABLE_OV_TF_FRONTEND" OFF)
ie_dependent_option (ENABLE_STRICT_DEPENDENCIES "Skip configuring \"convinient\" dependencies for efficient parallel builds" ON "ENABLE_TESTS;ENABLE_OV_ONNX_FRONTEND" OFF) ov_dependent_option (ENABLE_STRICT_DEPENDENCIES "Skip configuring \"convinient\" dependencies for efficient parallel builds" ON "ENABLE_TESTS;ENABLE_OV_ONNX_FRONTEND" OFF)
if(CMAKE_HOST_LINUX AND LINUX) if(CMAKE_HOST_LINUX AND LINUX)
# Debian packages are enabled on Ubuntu systems # Debian packages are enabled on Ubuntu systems
@ -175,28 +175,28 @@ else()
set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT}) set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
endif() endif()
ie_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT}
"THREADING MATCHES TBB" OFF) "THREADING MATCHES TBB" OFF)
# TODO: turn it off by default during the work on cross-os distribution, because pugixml is not # TODO: turn it off by default during the work on cross-os distribution, because pugixml is not
# available out of box on all systems (like RHEL, UBI) # available out of box on all systems (like RHEL, UBI)
ie_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" ${ENABLE_SYSTEM_PUGIXML_DEFAULT}) ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" ${ENABLE_SYSTEM_PUGIXML_DEFAULT})
# the option is on by default, because we use only flatc compiler and don't use any libraries # the option is on by default, because we use only flatc compiler and don't use any libraries
ie_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT} ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}
"ENABLE_OV_TF_LITE_FRONTEND" OFF) "ENABLE_OV_TF_LITE_FRONTEND" OFF)
ie_dependent_option (ENABLE_SYSTEM_OPENCL "Enables use of system OpenCL" ${ENABLE_SYSTEM_LIBS_DEFAULT} ov_dependent_option (ENABLE_SYSTEM_OPENCL "Enables use of system OpenCL" ${ENABLE_SYSTEM_LIBS_DEFAULT}
"ENABLE_INTEL_GPU" OFF) "ENABLE_INTEL_GPU" OFF)
# the option is turned off by default, because we compile our own static version of protobuf # the option is turned off by default, because we compile our own static version of protobuf
# with LTO and -fPIC options, while system one does not have such flags # with LTO and -fPIC options, while system one does not have such flags
ie_dependent_option (ENABLE_SYSTEM_PROTOBUF "Enables use of system Protobuf" OFF ov_dependent_option (ENABLE_SYSTEM_PROTOBUF "Enables use of system Protobuf" OFF
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND" OFF) "ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND" OFF)
# the option is turned off by default, because we don't want to have a dependency on libsnappy.so # the option is turned off by default, because we don't want to have a dependency on libsnappy.so
ie_dependent_option (ENABLE_SYSTEM_SNAPPY "Enables use of system version of Snappy" OFF ov_dependent_option (ENABLE_SYSTEM_SNAPPY "Enables use of system version of Snappy" OFF
"ENABLE_SNAPPY_COMPRESSION" OFF) "ENABLE_SNAPPY_COMPRESSION" OFF)
ie_dependent_option (ENABLE_PYTHON_PACKAGING "Enables packaging of Python API in APT / YUM" OFF ov_dependent_option (ENABLE_PYTHON_PACKAGING "Enables packaging of Python API in APT / YUM" OFF
"ENABLE_PYTHON;UNIX" OFF) "ENABLE_PYTHON;UNIX" OFF)
ie_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF) ov_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)
if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND) if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
set(FORCE_FRONTENDS_USE_PROTOBUF ON) set(FORCE_FRONTENDS_USE_PROTOBUF ON)
@ -216,4 +216,4 @@ if (ENABLE_PROFILING_RAW)
add_definitions(-DENABLE_PROFILING_RAW=1) add_definitions(-DENABLE_PROFILING_RAW=1)
endif() endif()
print_enabled_features() ov_print_enabled_features()

View File

@ -25,6 +25,8 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
message(WARNING "find_package(InferenceEngine) is deprecated and will be removed in 2024.0 release. Please, use find_package(OpenVINO)")
if(NOT DEFINED CMAKE_FIND_PACKAGE_NAME) if(NOT DEFINED CMAKE_FIND_PACKAGE_NAME)
set(CMAKE_FIND_PACKAGE_NAME InferenceEngine) set(CMAKE_FIND_PACKAGE_NAME InferenceEngine)
set(_ie_need_package_name_reset ON) set(_ie_need_package_name_reset ON)
@ -77,7 +79,7 @@ endforeach()
set(PACKAGE_PREFIX_DIR ${_ie_package_prefix_dir}) set(PACKAGE_PREFIX_DIR ${_ie_package_prefix_dir})
unset(_ie_package_prefix_dir) unset(_ie_package_prefix_dir)
set_and_check(InferenceEngine_INCLUDE_DIRS "@PACKAGE_IE_INCLUDE_DIR@") set_and_check(InferenceEngine_INCLUDE_DIRS "@PACKAGE_OV_INCLUDE_DIR@")
check_required_components(${CMAKE_FIND_PACKAGE_NAME}) check_required_components(${CMAKE_FIND_PACKAGE_NAME})

View File

@ -6,37 +6,39 @@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
message(WARNING "find_package(InferenceEngineDeveloperPackage) is deprecated and will be removed in 2024.0 release. Please, use find_package(OpenVINODeveloperPackage)")
# TODO: remove after changing [private plugins] # TODO: remove after changing [private plugins]
set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
# Variables to export in plugin's projects # Variables to export in plugin's projects
set(ie_options "@IE_OPTIONS@") set(ov_options "@OV_OPTIONS@")
list(APPEND ie_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX CPACK_GENERATOR) CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX CPACK_GENERATOR)
if(APPLE) if(APPLE)
list(APPEND ie_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET) list(APPEND ov_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
endif() endif()
get_property(_IE_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_IE_GENERATOR_MULTI_CONFIG) if(_OV_GENERATOR_MULTI_CONFIG)
list(APPEND ie_options CMAKE_CONFIGURATION_TYPES) list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$") if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
list(APPEND ie_options CMAKE_DEFAULT_BUILD_TYPE) list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
endif() endif()
else() else()
list(APPEND ie_options CMAKE_BUILD_TYPE) list(APPEND ov_options CMAKE_BUILD_TYPE)
endif() endif()
unset(_IE_GENERATOR_MULTI_CONFIG) unset(_OV_GENERATOR_MULTI_CONFIG)
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path) file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
message(STATUS "The following CMake options are exported from Inference Engine Developer package") message(STATUS "The following CMake options are exported from Inference Engine Developer package")
message(" ") message(" ")
foreach(option IN LISTS ie_options) foreach(option IN LISTS ov_options)
if(NOT DEFINED "${option}") if(NOT DEFINED "${option}")
load_cache("${cache_path}" READ_WITH_PREFIX "" ${option}) load_cache("${cache_path}" READ_WITH_PREFIX "" ${option})
endif() endif()
@ -56,7 +58,7 @@ set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
# Content # Content
# #
find_dependency(IEDevScripts find_dependency(OpenVINODeveloperScripts
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package" PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
@ -160,13 +162,13 @@ if(ENABLE_SYSTEM_PUGIXML)
endif() endif()
endif() endif()
set(_IE_nlohmann_json_FOUND "@nlohmann_json_FOUND@") set(_ov_nlohmann_json_FOUND "@nlohmann_json_FOUND@")
if(_IE_nlohmann_json_FOUND) if(_ov_nlohmann_json_FOUND)
find_dependency(nlohmann_json) find_dependency(nlohmann_json)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES IMPORTED_GLOBAL ON) set_target_properties(nlohmann_json::nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
add_library(IE::nlohmann_json ALIAS nlohmann_json::nlohmann_json) add_library(IE::nlohmann_json ALIAS nlohmann_json::nlohmann_json)
endif() endif()
unset(_IE_nlohmann_json_FOUND) unset(_ov_nlohmann_json_FOUND)
# inherit OpenCV from main IE project if enabled # inherit OpenCV from main IE project if enabled
if("@OpenCV_FOUND@") if("@OpenCV_FOUND@")

View File

@ -176,7 +176,7 @@ macro(_ov_find_tbb)
set(enable_system_tbb "@ENABLE_SYSTEM_TBB@") set(enable_system_tbb "@ENABLE_SYSTEM_TBB@")
if(NOT enable_system_tbb) if(NOT enable_system_tbb)
set_and_check(_tbb_dir "@PACKAGE_IE_TBB_DIR@") set_and_check(_tbb_dir "@PACKAGE_OV_TBB_DIR@")
# see https://stackoverflow.com/questions/28070810/cmake-generate-error-on-windows-as-it-uses-as-escape-seq # see https://stackoverflow.com/questions/28070810/cmake-generate-error-on-windows-as-it-uses-as-escape-seq
if(DEFINED ENV{TBBROOT}) if(DEFINED ENV{TBBROOT})
@ -218,7 +218,7 @@ macro(_ov_find_tbb)
set(install_tbbbind "@install_tbbbind@") set(install_tbbbind "@install_tbbbind@")
if(install_tbbbind) if(install_tbbbind)
set_and_check(_tbb_bind_dir "@PACKAGE_IE_TBBBIND_DIR@") set_and_check(_tbb_bind_dir "@PACKAGE_OV_TBBBIND_DIR@")
_ov_find_dependency(TBBBIND_2_5 _ov_find_dependency(TBBBIND_2_5
PATHS ${_tbb_bind_dir} PATHS ${_tbb_bind_dir}
NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_FIND_ROOT_PATH

View File

@ -10,7 +10,7 @@ set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@")
# Variables to export in plugin's projects # Variables to export in plugin's projects
set(ov_options "@IE_OPTIONS@") set(ov_options "@OV_OPTIONS@")
list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX CPACK_GENERATOR) CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX CPACK_GENERATOR)
@ -20,7 +20,7 @@ if(APPLE)
endif() endif()
get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_IE_GENERATOR_MULTI_CONFIG) if(_OV_GENERATOR_MULTI_CONFIG)
list(APPEND ov_options CMAKE_CONFIGURATION_TYPES) list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$") if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE) list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
@ -61,7 +61,7 @@ set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
# Content # Content
# #
find_dependency(IEDevScripts find_dependency(OpenVINODeveloperScripts
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package" PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH) NO_DEFAULT_PATH)

View File

@ -42,6 +42,8 @@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
message(WARNING "find_package(ngraph) is deprecated and will be removed in 2024.0 release. Please, use find_package(OpenVINO)")
find_dependency(OpenVINO find_dependency(OpenVINO
PATHS "${CMAKE_CURRENT_LIST_DIR}" PATHS "${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/../openvino${ngraph_VERSION}" "${CMAKE_CURRENT_LIST_DIR}/../openvino${ngraph_VERSION}"

View File

@ -28,6 +28,6 @@ target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/in
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER c_samples) set_target_properties(${TARGET_NAME} PROPERTIES FOLDER c_samples)
if(COMMAND ov_add_clang_format_target AND NOT IE_SAMPLE_EXCLUDE_CLANG_FORMAT) if(COMMAND ov_add_clang_format_target)
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
endif() endif()

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_classification_c ov_add_sample(NAME hello_classification_c
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.c" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.c"
DEPENDENCIES opencv_c_wrapper) DEPENDENCIES opencv_c_wrapper)

View File

@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_nv12_input_classification_c ov_add_sample(NAME hello_nv12_input_classification_c
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.c") SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.c")

View File

@ -49,18 +49,18 @@ endif()
if(OpenVINO_SOURCE_DIR) if(OpenVINO_SOURCE_DIR)
# in case if samples are built from IE repo # in case if samples are built from IE repo
set(IE_MAIN_SAMPLES_DIR "${OpenVINO_SOURCE_DIR}") set(OV_MAIN_SAMPLES_DIR "${OpenVINO_SOURCE_DIR}")
set(OpenVINO_DIR "${CMAKE_BINARY_DIR}") set(OpenVINO_DIR "${CMAKE_BINARY_DIR}")
else() else()
# in case if samples are built out of IE repo # in case if samples are built out of IE repo
set(IE_MAIN_SAMPLES_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(OV_MAIN_SAMPLES_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER}) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OV_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER}) set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OV_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
set (CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER}) set (CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OV_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
set (CMAKE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER}) set (CMAKE_PDB_OUTPUT_DIRECTORY ${OV_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER}) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OV_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS")
@ -155,7 +155,7 @@ if (DEFINED OpenVINO_SOURCE_DIR AND NOT ENABLE_SAMPLES)
return() return()
endif() endif()
function(add_samples_to_build) function(ov_add_samples_to_build)
# check each passed sample subdirectory # check each passed sample subdirectory
foreach (dir ${ARGN}) foreach (dir ${ARGN})
if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${dir}) if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${dir})
@ -175,37 +175,37 @@ function(add_samples_to_build)
endif() endif()
endif() endif()
endforeach() endforeach()
endfunction(add_samples_to_build) endfunction(ov_add_samples_to_build)
include(CMakeParseArguments) include(CMakeParseArguments)
# #
# ie_add_sample(NAME <target name> # ov_add_sample(NAME <target name>
# SOURCES <source files> # SOURCES <source files>
# [HEADERS <header files>] # [HEADERS <header files>]
# [INCLUDE_DIRECTORIES <include dir>] # [INCLUDE_DIRECTORIES <include dir>]
# [DEPENDENCIES <dependencies>] # [DEPENDENCIES <dependencies>]
# [EXCLUDE_CLANG_FORMAT] # [EXCLUDE_CLANG_FORMAT]
# #
macro(ie_add_sample) macro(ov_add_sample)
set(options EXCLUDE_CLANG_FORMAT) set(options EXCLUDE_CLANG_FORMAT)
set(oneValueArgs NAME) set(oneValueArgs NAME)
set(multiValueArgs SOURCES HEADERS DEPENDENCIES INCLUDE_DIRECTORIES) set(multiValueArgs SOURCES HEADERS DEPENDENCIES INCLUDE_DIRECTORIES)
cmake_parse_arguments(IE_SAMPLE "${options}" "${oneValueArgs}" cmake_parse_arguments(SAMPLE "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} ) "${multiValueArgs}" ${ARGN} )
# Create named folders for the sources within the .vcproj # Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj # Empty name lists them directly under the .vcproj
source_group("src" FILES ${IE_SAMPLE_SOURCES}) source_group("src" FILES ${SAMPLE_SOURCES})
if(IE_SAMPLE_HEADERS) if(SAMPLE_HEADERS)
source_group("include" FILES ${IE_SAMPLE_HEADERS}) source_group("include" FILES ${SAMPLE_HEADERS})
endif() endif()
# Create executable file from sources # Create executable file from sources
add_executable(${IE_SAMPLE_NAME} ${IE_SAMPLE_SOURCES} ${IE_SAMPLE_HEADERS}) add_executable(${SAMPLE_NAME} ${SAMPLE_SOURCES} ${SAMPLE_HEADERS})
set(folder_name cpp_samples) set(folder_name cpp_samples)
if(IE_SAMPLE_NAME MATCHES ".*_c$") if(SAMPLE_NAME MATCHES ".*_c$")
set(c_sample ON) set(c_sample ON)
set(folder_name c_samples) set(folder_name c_samples)
endif() endif()
@ -222,34 +222,46 @@ macro(ie_add_sample)
set(ov_link_libraries openvino::runtime) set(ov_link_libraries openvino::runtime)
endif() endif()
set_target_properties(${IE_SAMPLE_NAME} PROPERTIES FOLDER ${folder_name} set_target_properties(${SAMPLE_NAME} PROPERTIES FOLDER ${folder_name}
COMPILE_PDB_NAME ${IE_SAMPLE_NAME}) COMPILE_PDB_NAME ${SAMPLE_NAME})
if(IE_SAMPLE_INCLUDE_DIRECTORIES) if(SAMPLE_INCLUDE_DIRECTORIES)
target_include_directories(${IE_SAMPLE_NAME} PRIVATE ${IE_SAMPLE_INCLUDE_DIRECTORIES}) target_include_directories(${SAMPLE_NAME} PRIVATE ${SAMPLE_INCLUDE_DIRECTORIES})
endif() endif()
target_include_directories(${IE_SAMPLE_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../common") target_include_directories(${SAMPLE_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../common")
target_link_libraries(${IE_SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${IE_SAMPLE_DEPENDENCIES}) target_link_libraries(${SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${SAMPLE_DEPENDENCIES})
install(TARGETS ${IE_SAMPLE_NAME} install(TARGETS ${SAMPLE_NAME}
RUNTIME DESTINATION samples_bin/ RUNTIME DESTINATION samples_bin/
COMPONENT samples_bin COMPONENT samples_bin
EXCLUDE_FROM_ALL) EXCLUDE_FROM_ALL)
# create global target with all samples / demo apps # create global target with all samples / demo apps
if(NOT TARGET ie_samples) if(NOT TARGET ov_samples)
add_custom_target(ie_samples ALL) add_custom_target(ov_samples ALL)
endif() endif()
add_dependencies(ie_samples ${IE_SAMPLE_NAME}) add_dependencies(ov_samples ${SAMPLE_NAME})
if(COMMAND ov_add_clang_format_target AND NOT IE_SAMPLE_EXCLUDE_CLANG_FORMAT) if(COMMAND ov_add_clang_format_target AND NOT SAMPLE_EXCLUDE_CLANG_FORMAT)
ov_add_clang_format_target(${IE_SAMPLE_NAME}_clang FOR_SOURCES ${IE_SAMPLE_SOURCES} ${IE_SAMPLE_HEADERS}) ov_add_clang_format_target(${SAMPLE_NAME}_clang FOR_SOURCES ${SAMPLE_SOURCES} ${SAMPLE_HEADERS})
endif() endif()
if(COMMAND ov_ncc_naming_style AND NOT c_sample) if(COMMAND ov_ncc_naming_style AND NOT c_sample)
ov_ncc_naming_style(FOR_TARGET "${IE_SAMPLE_NAME}" ov_ncc_naming_style(FOR_TARGET "${SAMPLE_NAME}"
SOURCE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}") SOURCE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}")
endif() endif()
unset(options)
unset(oneValueArgs)
unset(multiValueArgs)
unset(c_sample)
unset(folder_name)
unset(ov_link_libraries)
unset(SAMPLE_NAME)
unset(SAMPLE_HEADERS)
unset(SAMPLE_DEPENDENCIES)
unset(SAMPLE_EXCLUDE_CLANG_FORMAT)
unset(SAMPLE_INCLUDE_DIRECTORIES)
endmacro() endmacro()
# collect all samples subdirectories # collect all samples subdirectories
@ -261,4 +273,4 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty")
endif() endif()
list(REMOVE_ITEM samples_dirs common) list(REMOVE_ITEM samples_dirs common)
add_samples_to_build(${samples_dirs}) ov_add_samples_to_build(${samples_dirs})

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME sync_benchmark ov_add_sample(NAME sync_benchmark
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES ie_samples_utils) DEPENDENCIES ie_samples_utils)

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME throughput_benchmark ov_add_sample(NAME throughput_benchmark
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES ie_samples_utils) DEPENDENCIES ie_samples_utils)

View File

@ -7,7 +7,7 @@ set(TARGET_NAME "benchmark_app")
file (GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file (GLOB SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file (GLOB HDR ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) file (GLOB HDR ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
ie_add_sample(NAME ${TARGET_NAME} ov_add_sample(NAME ${TARGET_NAME}
SOURCES ${SRC} SOURCES ${SRC}
HEADERS ${HDR} HEADERS ${HDR}
DEPENDENCIES ${GFLAGS_TARGET} format_reader ie_samples_utils) DEPENDENCIES ${GFLAGS_TARGET} format_reader ie_samples_utils)

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME classification_sample_async ov_add_sample(NAME classification_sample_async
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/classification_sample_async.h" HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/classification_sample_async.h"
DEPENDENCIES ${GFLAGS_TARGET} format_reader ie_samples_utils) DEPENDENCIES ${GFLAGS_TARGET} format_reader ie_samples_utils)

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_classification ov_add_sample(NAME hello_classification
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES format_reader ie_samples_utils) DEPENDENCIES format_reader ie_samples_utils)

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_nv12_input_classification ov_add_sample(NAME hello_nv12_input_classification
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES format_reader ie_samples_utils) DEPENDENCIES format_reader ie_samples_utils)

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_query_device ov_add_sample(NAME hello_query_device
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES ie_samples_utils) DEPENDENCIES ie_samples_utils)

View File

@ -2,6 +2,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
ie_add_sample(NAME hello_reshape_ssd ov_add_sample(NAME hello_reshape_ssd
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
DEPENDENCIES format_reader ie_samples_utils) DEPENDENCIES format_reader ie_samples_utils)

View File

@ -4,7 +4,7 @@
set(TARGET_NAME "model_creation_sample") set(TARGET_NAME "model_creation_sample")
ie_add_sample(NAME model_creation_sample ov_add_sample(NAME model_creation_sample
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/model_creation_sample.hpp" HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/model_creation_sample.hpp"
DEPENDENCIES format_reader ie_samples_utils) DEPENDENCIES format_reader ie_samples_utils)

View File

@ -46,7 +46,7 @@ endif()
# add sample # add sample
ie_add_sample(NAME speech_sample ov_add_sample(NAME speech_sample
SOURCES ${SRC} SOURCES ${SRC}
HEADERS ${HDR} HEADERS ${HDR}
DEPENDENCIES ${GFLAGS_TARGET} cnpy ie_samples_utils) DEPENDENCIES ${GFLAGS_TARGET} cnpy ie_samples_utils)

View File

@ -15,7 +15,7 @@ set(shellcheck_skip_list
"${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11" "${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11"
"${TEMP}") "${TEMP}")
ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}" ov_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}"
SKIP ${shellcheck_skip_list}) SKIP ${shellcheck_skip_list})
# #

View File

@ -38,7 +38,7 @@ std::string generate_test_xml_file() {
plugin_xml_file << ov::util::FileTraits<char>::file_separator; plugin_xml_file << ov::util::FileTraits<char>::file_separator;
plugin_xml_file << ov::util::FileTraits<char>::library_prefix(); plugin_xml_file << ov::util::FileTraits<char>::library_prefix();
plugin_xml_file << "mock_engine"; plugin_xml_file << "mock_engine";
plugin_xml_file << IE_BUILD_POSTFIX; plugin_xml_file << OV_BUILD_POSTFIX;
plugin_xml_file << ov::util::FileTraits<char>::dot_symbol; plugin_xml_file << ov::util::FileTraits<char>::dot_symbol;
plugin_xml_file << ov::util::FileTraits<char>::library_ext(); plugin_xml_file << ov::util::FileTraits<char>::library_ext();
plugin_xml_file << "\" name=\"CUSTOM\">\n"; plugin_xml_file << "\" name=\"CUSTOM\">\n";

View File

@ -152,7 +152,7 @@ endfunction()
ov_check_init_files_alignment() ov_check_init_files_alignment()
ie_option(ENABLE_PYTHON "Enables OpenVINO Python API build" ${ENABLE_PYTHON_DEFAULT}) ov_option(ENABLE_PYTHON "Enables OpenVINO Python API build" ${ENABLE_PYTHON_DEFAULT})
# #
# Check for wheel package # Check for wheel package
@ -196,7 +196,7 @@ endif()
# this option should not be a part of OpenVINODeveloperPackage # this option should not be a part of OpenVINODeveloperPackage
# since wheels can be built only together with main OV build # since wheels can be built only together with main OV build
ie_dependent_option(ENABLE_WHEEL "Build wheel packages for PyPI" ${ENABLE_WHEEL_DEFAULT} "ENABLE_PYTHON" OFF) ov_dependent_option(ENABLE_WHEEL "Build wheel packages for PyPI" ${ENABLE_WHEEL_DEFAULT} "ENABLE_PYTHON" OFF)
if(NOT ENABLE_PYTHON) if(NOT ENABLE_PYTHON)
if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR) if(CMAKE_SOURCE_DIR STREQUAL OpenVINOPython_SOURCE_DIR)
@ -400,5 +400,5 @@ if(OpenVINODeveloperPackage_FOUND)
# provides a callback function to describe each component in repo # provides a callback function to describe each component in repo
include("${OpenVINO_SOURCE_DIR}/cmake/packaging/packaging.cmake") include("${OpenVINO_SOURCE_DIR}/cmake/packaging/packaging.cmake")
ie_cpack(${IE_CPACK_COMPONENTS_ALL}) ov_cpack(${OV_CPACK_COMPONENTS_ALL})
endif() endif()

View File

@ -64,7 +64,7 @@ endif()
function(python_ov_disable_deprecated_warnings) function(python_ov_disable_deprecated_warnings)
ov_disable_deprecated_warnings() ov_disable_deprecated_warnings()
set(pyx_file "${CMAKE_CURRENT_BINARY_DIR}/ie_api.cxx" "${CMAKE_CURRENT_BINARY_DIR}/constants.cxx") set(pyx_file "${CMAKE_CURRENT_BINARY_DIR}/ie_api.cxx" "${CMAKE_CURRENT_BINARY_DIR}/constants.cxx")
set_source_files_properties(${pyx_file} PROPERTIES COMPILE_OPTIONS ${ie_c_cxx_deprecated}) set_source_files_properties(${pyx_file} PROPERTIES COMPILE_OPTIONS ${ov_c_cxx_deprecated})
endfunction() endfunction()
python_ov_disable_deprecated_warnings() python_ov_disable_deprecated_warnings()

View File

@ -67,13 +67,13 @@ unset(_ov_dynamic_tbbbind_2_5_found)
# define variables for OpenVINOConfig.cmake # define variables for OpenVINOConfig.cmake
if(THREADING MATCHES "^(TBB|TBB_AUTO)$") if(THREADING MATCHES "^(TBB|TBB_AUTO)$")
set(IE_TBB_DIR "${TBB_DIR}") set(OV_TBB_DIR "${TBB_DIR}")
list(APPEND PATH_VARS "IE_TBB_DIR") list(APPEND PATH_VARS "OV_TBB_DIR")
endif() endif()
if(install_tbbbind) if(install_tbbbind)
set(IE_TBBBIND_DIR "${TBBBIND_2_5_DIR}") set(OV_TBBBIND_DIR "${TBBBIND_2_5_DIR}")
list(APPEND PATH_VARS "IE_TBBBIND_DIR") list(APPEND PATH_VARS "OV_TBBBIND_DIR")
endif() endif()
# install only downloaded | custom TBB, system one is not installed # install only downloaded | custom TBB, system one is not installed
@ -150,14 +150,14 @@ if(THREADING MATCHES "^(TBB|TBB_AUTO)$" AND
endif() endif()
if(TBB_DIR MATCHES "^${TBBROOT}.*") if(TBB_DIR MATCHES "^${TBBROOT}.*")
file(RELATIVE_PATH IE_TBB_DIR_INSTALL "${TBBROOT}" "${TBB_DIR}") file(RELATIVE_PATH OV_TBB_DIR_INSTALL "${TBBROOT}" "${TBB_DIR}")
set(IE_TBB_DIR_INSTALL "${IE_TBBROOT_INSTALL}/${IE_TBB_DIR_INSTALL}") set(OV_TBB_DIR_INSTALL "${IE_TBBROOT_INSTALL}/${OV_TBB_DIR_INSTALL}")
else() else()
# TBB_DIR is not a subdirectory of TBBROOT # TBB_DIR is not a subdirectory of TBBROOT
# example: old TBB 2017 with no cmake support at all # example: old TBB 2017 with no cmake support at all
# - TBBROOT point to actual root of TBB # - TBBROOT point to actual root of TBB
# - TBB_DIR points to cmake/developer_package/tbb/<lnx|mac|win> # - TBB_DIR points to cmake/developer_package/tbb/<lnx|mac|win>
set(IE_TBB_DIR_INSTALL "${TBB_DIR}") set(OV_TBB_DIR_INSTALL "${TBB_DIR}")
endif() endif()
# try to select proper library directory # try to select proper library directory
@ -185,21 +185,21 @@ if(THREADING MATCHES "^(TBB|TBB_AUTO)$" AND
set(pkg_config_tbb_lib_dir "${IE_TBBROOT_INSTALL}/${tbb_libs_dir}") set(pkg_config_tbb_lib_dir "${IE_TBBROOT_INSTALL}/${tbb_libs_dir}")
elseif(tbb_downloaded) elseif(tbb_downloaded)
set(IE_TBB_DIR_INSTALL "runtime/3rdparty/tbb") set(OV_TBB_DIR_INSTALL "runtime/3rdparty/tbb")
if(WIN32) if(WIN32)
install(DIRECTORY "${TBBROOT}/bin" install(DIRECTORY "${TBBROOT}/bin"
DESTINATION "${IE_TBB_DIR_INSTALL}" DESTINATION "${OV_TBB_DIR_INSTALL}"
COMPONENT tbb) COMPONENT tbb)
else() else()
install(DIRECTORY "${TBBROOT}/lib" install(DIRECTORY "${TBBROOT}/lib"
DESTINATION "${IE_TBB_DIR_INSTALL}" DESTINATION "${OV_TBB_DIR_INSTALL}"
COMPONENT tbb COMPONENT tbb
PATTERN "cmake" EXCLUDE) PATTERN "cmake" EXCLUDE)
endif() endif()
install(FILES "${TBBROOT}/LICENSE" install(FILES "${TBBROOT}/LICENSE"
DESTINATION "${IE_TBB_DIR_INSTALL}" DESTINATION "${OV_TBB_DIR_INSTALL}"
COMPONENT tbb) COMPONENT tbb)
# install development files # install development files
@ -212,29 +212,29 @@ if(THREADING MATCHES "^(TBB|TBB_AUTO)$" AND
if(EXISTS "${TBBROOT}/lib/cmake") if(EXISTS "${TBBROOT}/lib/cmake")
# oneTBB case # oneTBB case
install(DIRECTORY "${TBBROOT}/lib/cmake" install(DIRECTORY "${TBBROOT}/lib/cmake"
DESTINATION "${IE_TBB_DIR_INSTALL}/lib" DESTINATION "${OV_TBB_DIR_INSTALL}/lib"
COMPONENT tbb_dev) COMPONENT tbb_dev)
else() else()
# tbb2020 case # tbb2020 case
install(FILES "${TBBROOT}/cmake/TBBConfig.cmake" install(FILES "${TBBROOT}/cmake/TBBConfig.cmake"
"${TBBROOT}/cmake/TBBConfigVersion.cmake" "${TBBROOT}/cmake/TBBConfigVersion.cmake"
DESTINATION "${IE_TBB_DIR_INSTALL}/cmake" DESTINATION "${OV_TBB_DIR_INSTALL}/cmake"
COMPONENT tbb_dev) COMPONENT tbb_dev)
endif() endif()
install(DIRECTORY "${TBBROOT}/include" install(DIRECTORY "${TBBROOT}/include"
DESTINATION "${IE_TBB_DIR_INSTALL}" DESTINATION "${OV_TBB_DIR_INSTALL}"
COMPONENT tbb_dev) COMPONENT tbb_dev)
if(WIN32) if(WIN32)
# .lib files are needed only for Windows # .lib files are needed only for Windows
install(DIRECTORY "${TBBROOT}/lib" install(DIRECTORY "${TBBROOT}/lib"
DESTINATION "${IE_TBB_DIR_INSTALL}" DESTINATION "${OV_TBB_DIR_INSTALL}"
COMPONENT tbb_dev COMPONENT tbb_dev
PATTERN "cmake" EXCLUDE) PATTERN "cmake" EXCLUDE)
endif() endif()
set(pkg_config_tbb_lib_dir "${IE_TBB_DIR_INSTALL}/lib") set(pkg_config_tbb_lib_dir "${OV_TBB_DIR_INSTALL}/lib")
else() else()
message(WARNING "TBB of unknown origin. TBB files are not installed") message(WARNING "TBB of unknown origin. TBB files are not installed")
endif() endif()
@ -245,16 +245,16 @@ endif()
# install tbbbind for static OpenVINO case # install tbbbind for static OpenVINO case
if(install_tbbbind) if(install_tbbbind)
set(IE_TBBBIND_DIR_INSTALL "runtime/3rdparty/tbb_bind_2_5") set(OV_TBBBIND_DIR_INSTALL "runtime/3rdparty/tbb_bind_2_5")
install(DIRECTORY "${TBBBIND_2_5_ROOT}/lib" install(DIRECTORY "${TBBBIND_2_5_ROOT}/lib"
DESTINATION "${IE_TBBBIND_DIR_INSTALL}" DESTINATION "${OV_TBBBIND_DIR_INSTALL}"
COMPONENT tbb) COMPONENT tbb)
install(FILES "${TBBBIND_2_5_ROOT}/LICENSE" install(FILES "${TBBBIND_2_5_ROOT}/LICENSE"
DESTINATION "${IE_TBBBIND_DIR_INSTALL}" DESTINATION "${OV_TBBBIND_DIR_INSTALL}"
COMPONENT tbb) COMPONENT tbb)
install(FILES "${TBBBIND_2_5_ROOT}/cmake/TBBBIND_2_5Config.cmake" install(FILES "${TBBBIND_2_5_ROOT}/cmake/TBBBIND_2_5Config.cmake"
DESTINATION "${IE_TBBBIND_DIR_INSTALL}/cmake" DESTINATION "${OV_TBBBIND_DIR_INSTALL}/cmake"
COMPONENT tbb_dev) COMPONENT tbb_dev)
endif() endif()

View File

@ -157,7 +157,7 @@ install(EXPORT OpenVINOTargets
# build tree # build tree
list(APPEND PATH_VARS "IE_INCLUDE_DIR") list(APPEND PATH_VARS "OV_INCLUDE_DIR") # TODO: remove obsolete variable for API 1.0 before 2024.0
if(ENABLE_INTEL_GNA) if(ENABLE_INTEL_GNA)
list(APPEND PATH_VARS "GNA_PATH") list(APPEND PATH_VARS "GNA_PATH")
endif() endif()
@ -170,8 +170,8 @@ if(ENABLE_ONEDNN_FOR_GPU)
endif() endif()
set(PUBLIC_HEADERS_DIR "${OpenVINO_SOURCE_DIR}/src/inference/include") set(PUBLIC_HEADERS_DIR "${OpenVINO_SOURCE_DIR}/src/inference/include")
set(IE_INCLUDE_DIR "${PUBLIC_HEADERS_DIR}/ie") set(OV_INCLUDE_DIR "${PUBLIC_HEADERS_DIR}/ie")
set(IE_TBB_DIR "${TBB_DIR}") set(OV_TBB_DIR "${TBB_DIR}")
configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig.cmake.in" configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig.cmake.in"
"${CMAKE_BINARY_DIR}/InferenceEngineConfig.cmake" "${CMAKE_BINARY_DIR}/InferenceEngineConfig.cmake"
@ -190,9 +190,9 @@ list(APPEND INSTALL_PATH_VARS "OPENVINO_LIB_DIR")
# will be done by inside OpenVINOConfig.cmak / ACLConfig.cmake # will be done by inside OpenVINOConfig.cmak / ACLConfig.cmake
string(REPLACE "$<CONFIG>" "" OPENVINO_LIB_DIR "${OV_CPACK_LIBRARYDIR}") string(REPLACE "$<CONFIG>" "" OPENVINO_LIB_DIR "${OV_CPACK_LIBRARYDIR}")
set(IE_INCLUDE_DIR "${OV_CPACK_INCLUDEDIR}/ie") set(OV_INCLUDE_DIR "${OV_CPACK_INCLUDEDIR}/ie")
set(IE_TBB_DIR "${IE_TBB_DIR_INSTALL}") set(OV_TBB_DIR "${OV_TBB_DIR_INSTALL}")
set(IE_TBBBIND_DIR "${IE_TBBBIND_DIR_INSTALL}") set(OV_TBBBIND_DIR "${OV_TBBBIND_DIR_INSTALL}")
set(GNA_PATH "${OV_CPACK_RUNTIMEDIR}") set(GNA_PATH "${OV_CPACK_RUNTIMEDIR}")
if(WIN32) if(WIN32)
set(GNA_PATH "${OV_CPACK_LIBRARYDIR}/../Release") set(GNA_PATH "${OV_CPACK_LIBRARYDIR}/../Release")

View File

@ -170,7 +170,7 @@ macro(ov_find_package_tbb)
# fallback variant for TBB 2018 and older where TBB have not had cmake interface # fallback variant for TBB 2018 and older where TBB have not had cmake interface
if(DEFINED TBBROOT OR DEFINED ENV{TBBROOT}) if(DEFINED TBBROOT OR DEFINED ENV{TBBROOT})
# note: if TBB older than 2017.0 is passed, cmake will skip it and THREADING=SEQ will be used # note: if TBB older than 2017.0 is passed, cmake will skip it and THREADING=SEQ will be used
set(_tbb_paths PATHS "${IEDevScripts_DIR}/tbb") set(_tbb_paths PATHS "${OpenVINODeveloperScripts_DIR}/tbb")
endif() endif()
# try to find one more time # try to find one more time
@ -279,7 +279,7 @@ function(ov_set_threading_interface_for TARGET_NAME)
message(WARNING "Unknown target type") message(WARNING "Unknown target type")
endif() endif()
function(ie_target_link_libraries TARGET_NAME LINK_TYPE) function(_ov_target_link_libraries TARGET_NAME LINK_TYPE)
target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${ARGN}) target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${ARGN})
# include directories as SYSTEM # include directories as SYSTEM
@ -314,7 +314,7 @@ function(ov_set_threading_interface_for TARGET_NAME)
if (TBB_FOUND) if (TBB_FOUND)
set(IE_THREAD_DEFINE "IE_THREAD_TBB") set(IE_THREAD_DEFINE "IE_THREAD_TBB")
set(OV_THREAD_DEFINE "OV_THREAD_TBB") set(OV_THREAD_DEFINE "OV_THREAD_TBB")
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} TBB::tbb) _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} TBB::tbb)
target_compile_definitions(${TARGET_NAME} ${COMPILE_DEF_TYPE} TBB_PREVIEW_WAITING_FOR_WORKERS=1) target_compile_definitions(${TARGET_NAME} ${COMPILE_DEF_TYPE} TBB_PREVIEW_WAITING_FOR_WORKERS=1)
else () else ()
set(THREADING "SEQ" PARENT_SCOPE) set(THREADING "SEQ" PARENT_SCOPE)
@ -365,7 +365,7 @@ function(ov_set_threading_interface_for TARGET_NAME)
if (WIN32) if (WIN32)
target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} /openmp) target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} /openmp)
target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} /Qopenmp) target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} /Qopenmp)
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} "-nodefaultlib:vcomp") _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} "-nodefaultlib:vcomp")
else() else()
target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} -fopenmp) target_compile_options(${TARGET_NAME} ${LINK_TYPE} ${OpenMP_CXX_FLAGS} -fopenmp)
endif () endif ()
@ -373,18 +373,18 @@ function(ov_set_threading_interface_for TARGET_NAME)
# Debug binaries are optional. # Debug binaries are optional.
if (OMP_LIBRARIES_DEBUG AND NOT LINUX) if (OMP_LIBRARIES_DEBUG AND NOT LINUX)
if (WIN32) if (WIN32)
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} "$<$<CONFIG:DEBUG>:${OMP_LIBRARIES_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${OMP_LIBRARIES_RELEASE}>") _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} "$<$<CONFIG:DEBUG>:${OMP_LIBRARIES_DEBUG}>;$<$<NOT:$<CONFIG:DEBUG>>:${OMP_LIBRARIES_RELEASE}>")
else() else()
# TODO: handle multi-config generators case # TODO: handle multi-config generators case
if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (CMAKE_BUILD_TYPE STREQUAL "Debug")
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_DEBUG}) _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_DEBUG})
else() else()
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_RELEASE}) _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_RELEASE})
endif () endif ()
endif () endif ()
else () else ()
# Link Release library to all configurations. # Link Release library to all configurations.
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_RELEASE}) _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} ${OMP_LIBRARIES_RELEASE})
endif () endif ()
endif () endif ()
endif () endif ()
@ -394,11 +394,13 @@ function(ov_set_threading_interface_for TARGET_NAME)
if (NOT THREADING STREQUAL "SEQ") if (NOT THREADING STREQUAL "SEQ")
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
ie_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} Threads::Threads) _ov_target_link_libraries(${TARGET_NAME} ${LINK_TYPE} Threads::Threads)
endif() endif()
endfunction(ov_set_threading_interface_for) endfunction(ov_set_threading_interface_for)
# deprecated
function(set_ie_threading_interface_for TARGET_NAME) function(set_ie_threading_interface_for TARGET_NAME)
message(WARNING "This function is deprecated. Please use ov_set_threading_interface_for(TARGET_NAME) instead.") message(WARNING "'set_ie_threading_interface_for' is deprecated. Please use 'ov_set_threading_interface_for' instead.")
ov_set_threading_interface_for(${TARGET_NAME}) ov_set_threading_interface_for(${TARGET_NAME})
endfunction(set_ie_threading_interface_for) endfunction(set_ie_threading_interface_for)

View File

@ -37,7 +37,7 @@ if(ENABLE_SSE42)
list(APPEND LIBRARY_HEADERS ${SSE_HEADERS}) list(APPEND LIBRARY_HEADERS ${SSE_HEADERS})
list(APPEND LIBRARY_SRC ${SSE_SRC}) list(APPEND LIBRARY_SRC ${SSE_SRC})
ie_sse42_optimization_flags(sse4_2_flags) ov_sse42_optimization_flags(sse4_2_flags)
set_source_files_properties(${SSE_SRC} PROPERTIES COMPILE_OPTIONS "${sse4_2_flags}") set_source_files_properties(${SSE_SRC} PROPERTIES COMPILE_OPTIONS "${sse4_2_flags}")
add_definitions(-DHAVE_SSE=1) add_definitions(-DHAVE_SSE=1)
endif() endif()
@ -49,7 +49,7 @@ if(ENABLE_AVX2)
list(APPEND LIBRARY_HEADERS ${AVX2_HEADERS}) list(APPEND LIBRARY_HEADERS ${AVX2_HEADERS})
list(APPEND LIBRARY_SRC ${AVX2_SRC}) list(APPEND LIBRARY_SRC ${AVX2_SRC})
ie_avx2_optimization_flags(avx2_flags) ov_avx2_optimization_flags(avx2_flags)
set_source_files_properties(${AVX2_SRC} PROPERTIES COMPILE_OPTIONS "${avx2_flags}") set_source_files_properties(${AVX2_SRC} PROPERTIES COMPILE_OPTIONS "${avx2_flags}")
add_definitions(-DHAVE_AVX2=1) add_definitions(-DHAVE_AVX2=1)
endif() endif()
@ -75,7 +75,7 @@ if(ENABLE_AVX512F AND NOT GNU_5_DEBUG_CASE)
endif() endif()
if(ARM OR AARCH64) if(ARM OR AARCH64)
ie_arm_neon_optimization_flags(neon_flags) ov_arm_neon_optimization_flags(neon_flags)
file(GLOB NEON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.hpp) file(GLOB NEON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.hpp)
file(GLOB NEON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.cpp) file(GLOB NEON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/arm_neon/*.cpp)

View File

@ -84,7 +84,7 @@ public:
// 2. in the same folder as libopenvino.so // 2. in the same folder as libopenvino.so
ov::util::FilePath ovLibraryPath = getInferenceEngineLibraryPath(); ov::util::FilePath ovLibraryPath = getInferenceEngineLibraryPath();
ov::util::FilePath libraryName = ov::util::to_file_path(std::string("openvino_gapi_preproc") + std::string(IE_BUILD_POSTFIX)); ov::util::FilePath libraryName = ov::util::to_file_path(std::string("openvino_gapi_preproc") + std::string(OV_BUILD_POSTFIX));
libraryName = FileUtils::makePluginLibraryName({}, libraryName); libraryName = FileUtils::makePluginLibraryName({}, libraryName);
std::ostringstream str; std::ostringstream str;

View File

@ -57,10 +57,10 @@ target_include_directories(${TARGET_NAME} PRIVATE ${OV_CORE_SRC_DIR}/src
target_compile_definitions(${TARGET_NAME} target_compile_definitions(${TARGET_NAME}
PRIVATE PRIVATE
SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}" SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" SHARED_LIB_SUFFIX="${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
FRONTEND_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}${FRONTEND_NAME_PREFIX}" FRONTEND_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}${FRONTEND_NAME_PREFIX}"
# Assume <lib>.so is an existed symlink to <lib><version>.so (or <lib>.so<version> # Assume <lib>.so is an existed symlink to <lib><version>.so (or <lib>.so<version>
FRONTEND_LIB_SUFFIX="${FRONTEND_NAME_SUFFIX}${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" FRONTEND_LIB_SUFFIX="${FRONTEND_NAME_SUFFIX}${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
) )
if(RISCV64) if(RISCV64)

View File

@ -15,7 +15,7 @@
inline std::string get_extension_path() { inline std::string get_extension_path() {
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX); std::string("openvino_template_extension") + OV_BUILD_POSTFIX);
} }
TEST(extension, load_extension) { TEST(extension, load_extension) {

View File

@ -39,7 +39,7 @@ target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::util openvino::core::
set_target_properties(${TARGET_NAME}_obj PROPERTIES set_target_properties(${TARGET_NAME}_obj PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF) INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)
set(FRONTEND_LIB_SUFFIX "${FRONTEND_NAME_SUFFIX}${IE_BUILD_POSTFIX}") set(FRONTEND_LIB_SUFFIX "${FRONTEND_NAME_SUFFIX}${OV_BUILD_POSTFIX}")
if(APPLE) if(APPLE)
set(FRONTEND_LIB_SUFFIX "${FRONTEND_LIB_SUFFIX}${OpenVINO_VERSION_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") set(FRONTEND_LIB_SUFFIX "${FRONTEND_LIB_SUFFIX}${OpenVINO_VERSION_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
else() else()

View File

@ -133,7 +133,7 @@ target_include_directories(ov_onnx_frontend_tests PRIVATE "${CMAKE_CURRENT_SOURC
target_compile_definitions(ov_onnx_frontend_tests target_compile_definitions(ov_onnx_frontend_tests
PRIVATE PRIVATE
SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}" SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") SHARED_LIB_SUFFIX="${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(ONNX_OPSET_VERSION 17 CACHE INTERNAL "Supported version of ONNX operator set") set(ONNX_OPSET_VERSION 17 CACHE INTERNAL "Supported version of ONNX operator set")
target_compile_definitions(ov_onnx_frontend_tests PRIVATE ONNX_OPSET_VERSION=${ONNX_OPSET_VERSION}) target_compile_definitions(ov_onnx_frontend_tests PRIVATE ONNX_OPSET_VERSION=${ONNX_OPSET_VERSION})

View File

@ -28,6 +28,6 @@ add_dependencies(${TARGET_NAME} test_builtin_extensions)
target_compile_definitions(${TARGET_NAME} target_compile_definitions(${TARGET_NAME}
PRIVATE PRIVATE
SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}" SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") SHARED_LIB_SUFFIX="${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})

View File

@ -30,7 +30,7 @@ void FrontEndConversionExtensionTest::initParamTest() {
inline std::string get_lib_path(const std::string& lib_name) { inline std::string get_lib_path(const std::string& lib_name) {
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
lib_name + IE_BUILD_POSTFIX); lib_name + OV_BUILD_POSTFIX);
} }
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////

View File

@ -31,7 +31,7 @@ void FrontendLibraryExtensionTest::initParamTest() {
inline std::string get_lib_path(const std::string& lib_name) { inline std::string get_lib_path(const std::string& lib_name) {
return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name<char>(ov::test::utils::getExecutableDirectory(),
lib_name + IE_BUILD_POSTFIX); lib_name + OV_BUILD_POSTFIX);
} }
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////

View File

@ -20,8 +20,8 @@ file (GLOB LIBRARY_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/cpp_interfaces/interface/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/cpp_interfaces/interface/*.cpp
) )
set(IE_STATIC_DEPENDENT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/file_utils.cpp) set(OV_STATIC_DEPENDENT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/file_utils.cpp)
list(REMOVE_ITEM LIBRARY_SRC ${IE_STATIC_DEPENDENT_FILES}) list(REMOVE_ITEM LIBRARY_SRC ${OV_STATIC_DEPENDENT_FILES})
if(BUILD_SHARED_LIBS OR ENABLE_IR_V7_READER) if(BUILD_SHARED_LIBS OR ENABLE_IR_V7_READER)
# TODO: remove together with GNA plugin # TODO: remove together with GNA plugin
@ -66,7 +66,7 @@ if(ENABLE_SSE42)
list(APPEND LIBRARY_HEADERS ${SSE_HEADERS}) list(APPEND LIBRARY_HEADERS ${SSE_HEADERS})
list(APPEND LIBRARY_SRC ${SSE_SRC}) list(APPEND LIBRARY_SRC ${SSE_SRC})
ie_sse42_optimization_flags(sse4_2_flags) ov_sse42_optimization_flags(sse4_2_flags)
set_source_files_properties(${SSE_SRC} PROPERTIES COMPILE_OPTIONS "${sse4_2_flags}") set_source_files_properties(${SSE_SRC} PROPERTIES COMPILE_OPTIONS "${sse4_2_flags}")
add_definitions(-DHAVE_SSE=1) add_definitions(-DHAVE_SSE=1)
@ -118,7 +118,7 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}_plugin_api
# Create object library # Create object library
add_library(${TARGET_NAME}_obj OBJECT add_library(${TARGET_NAME}_obj OBJECT
${IE_STATIC_DEPENDENT_FILES} ${OV_STATIC_DEPENDENT_FILES}
${LIBRARY_SRC} ${LIBRARY_SRC}
${LIBRARY_HEADERS} ${LIBRARY_HEADERS}
${PUBLIC_HEADERS}) ${PUBLIC_HEADERS})
@ -174,7 +174,7 @@ target_link_libraries(${TARGET_NAME} INTERFACE openvino::runtime)
target_include_directories(${TARGET_NAME} INTERFACE $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}> target_include_directories(${TARGET_NAME} INTERFACE $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}>
$<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}/ie>) $<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}/ie>)
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_SOURCES ${IE_STATIC_DEPENDENT_FILES} ${LIBRARY_SRC} ${LIBRARY_HEADERS} ${PUBLIC_HEADERS}) ov_add_clang_format_target(${TARGET_NAME}_clang FOR_SOURCES ${OV_STATIC_DEPENDENT_FILES} ${LIBRARY_SRC} ${LIBRARY_HEADERS} ${PUBLIC_HEADERS})
ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}_obj ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}_obj
SOURCE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/openvino" SOURCE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/openvino"

View File

@ -113,7 +113,7 @@ void registerReaders() {
// try to load IR reader v7 if library exists // try to load IR reader v7 if library exists
try { try {
reader_irv7 = reader_irv7 =
std::make_shared<Reader>(std::string("inference_engine_ir_v7_reader") + std::string(IE_BUILD_POSTFIX)); std::make_shared<Reader>(std::string("inference_engine_ir_v7_reader") + std::string(OV_BUILD_POSTFIX));
} catch (const std::runtime_error&) { } catch (const std::runtime_error&) {
// runtime error is thrown in case of library cannot be loaded // runtime error is thrown in case of library cannot be loaded
} }

View File

@ -161,7 +161,7 @@ public:
static std::string get_mock_engine_path() { static std::string get_mock_engine_path() {
std::string mockEngineName("mock_engine"); std::string mockEngineName("mock_engine");
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mockEngineName + IE_BUILD_POSTFIX); mockEngineName + OV_BUILD_POSTFIX);
} }
void initParamTest() { void initParamTest() {
@ -232,7 +232,7 @@ public:
ov::Core core; ov::Core core;
injectPlugin(mockPlugin.get()); injectPlugin(mockPlugin.get());
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
deviceName); deviceName);
func(core); func(core);
core.unload_plugin(deviceName); core.unload_plugin(deviceName);

View File

@ -63,7 +63,7 @@ public:
try { try {
auto extension = std::make_shared<InferenceEngine::Extension>( auto extension = std::make_shared<InferenceEngine::Extension>(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX)); std::string("template_extension") + OV_BUILD_POSTFIX));
ie.AddExtension(extension); ie.AddExtension(extension);
} catch (const InferenceEngine::Exception& ex) { } catch (const InferenceEngine::Exception& ex) {
ASSERT_STR_CONTAINS(ex.what(), "name: custom_opset. Opset"); ASSERT_STR_CONTAINS(ex.what(), "name: custom_opset. Opset");
@ -95,7 +95,7 @@ TEST_F(IECoreThreadingTests, RegisterPlugin) {
[&]() { [&]() {
const std::string deviceName = std::to_string(index++); const std::string deviceName = std::to_string(index++);
ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
deviceName); deviceName);
ie.GetVersions(deviceName); ie.GetVersions(deviceName);
ie.UnregisterPlugin(deviceName); ie.UnregisterPlugin(deviceName);
@ -118,7 +118,7 @@ TEST_F(IECoreThreadingTests, RegisterPlugins) {
file << ov::util::FileTraits<char>::file_separator; file << ov::util::FileTraits<char>::file_separator;
file << ov::util::FileTraits<char>::library_prefix(); file << ov::util::FileTraits<char>::library_prefix();
file << "mock_engine"; file << "mock_engine";
file << IE_BUILD_POSTFIX; file << OV_BUILD_POSTFIX;
file << ov::util::FileTraits<char>::dot_symbol; file << ov::util::FileTraits<char>::dot_symbol;
file << ov::util::FileTraits<char>::library_ext(); file << ov::util::FileTraits<char>::library_ext();
file << "\" name=\""; file << "\" name=\"";

View File

@ -33,7 +33,7 @@ public:
injectProxyEngine(plugin.get()); injectProxyEngine(plugin.get());
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
m_plugin_name); m_plugin_name);
m_mock_plugin = plugin; m_mock_plugin = plugin;
} }

View File

@ -64,7 +64,7 @@ public:
OPENVINO_SUPPRESS_DEPRECATED_START OPENVINO_SUPPRESS_DEPRECATED_START
auto extension = std::make_shared<InferenceEngine::Extension>( auto extension = std::make_shared<InferenceEngine::Extension>(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX)); std::string("template_extension") + OV_BUILD_POSTFIX));
core.add_extension(extension); core.add_extension(extension);
OPENVINO_SUPPRESS_DEPRECATED_END OPENVINO_SUPPRESS_DEPRECATED_END
} catch (const ov::Exception& ex) { } catch (const ov::Exception& ex) {
@ -95,7 +95,7 @@ TEST_F(CoreThreadingTests, RegisterPlugin) {
[&]() { [&]() {
const std::string deviceName = std::to_string(index++); const std::string deviceName = std::to_string(index++);
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
deviceName); deviceName);
core.get_versions(deviceName); core.get_versions(deviceName);
core.unload_plugin(deviceName); core.unload_plugin(deviceName);
@ -118,7 +118,7 @@ TEST_F(CoreThreadingTests, RegisterPlugins) {
file << ov::util::FileTraits<char>::file_separator; file << ov::util::FileTraits<char>::file_separator;
file << ov::util::FileTraits<char>::library_prefix(); file << ov::util::FileTraits<char>::library_prefix();
file << "mock_engine"; file << "mock_engine";
file << IE_BUILD_POSTFIX; file << OV_BUILD_POSTFIX;
file << ov::util::FileTraits<char>::dot_symbol; file << ov::util::FileTraits<char>::dot_symbol;
file << ov::util::FileTraits<char>::library_ext(); file << ov::util::FileTraits<char>::library_ext();
file << "\" name=\""; file << "\" name=\"";

View File

@ -15,23 +15,23 @@ namespace {
std::string getOVExtensionPath() { std::string getOVExtensionPath() {
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX); std::string("openvino_template_extension") + OV_BUILD_POSTFIX);
} }
std::string getOldExtensionPath() { std::string getOldExtensionPath() {
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX); std::string("template_extension") + OV_BUILD_POSTFIX);
} }
std::string getIncorrectExtensionPath() { std::string getIncorrectExtensionPath() {
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("incorrect") + IE_BUILD_POSTFIX); std::string("incorrect") + OV_BUILD_POSTFIX);
} }
std::string getRelativeOVExtensionPath() { std::string getRelativeOVExtensionPath() {
std::string absolutePath = std::string absolutePath =
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_extension") + IE_BUILD_POSTFIX); std::string("openvino_template_extension") + OV_BUILD_POSTFIX);
return ov::test::utils::getRelativePath(ov::test::utils::getCurrentWorkingDir(), absolutePath); return ov::test::utils::getRelativePath(ov::test::utils::getCurrentWorkingDir(), absolutePath);
} }

View File

@ -45,7 +45,7 @@ TEST(RegisterPluginTests, getVersionforRegisteredPluginThrows) {
// Registered plugin with invalid so here // Registered plugin with invalid so here
ASSERT_NO_THROW(core.register_plugin( ASSERT_NO_THROW(core.register_plugin(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_registered_engine") + IE_BUILD_POSTFIX), std::string("mock_registered_engine") + OV_BUILD_POSTFIX),
mock_plugin_name)); mock_plugin_name));
ASSERT_THROW(core.get_versions("MOCK_REGISTERED_HARDWARE"), ov::Exception); ASSERT_THROW(core.get_versions("MOCK_REGISTERED_HARDWARE"), ov::Exception);
} }
@ -72,7 +72,7 @@ TEST(RegisterPluginTests, getVersionforNoRegisteredPluginNoThrows) {
ASSERT_NO_THROW( ASSERT_NO_THROW(
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
mock_plugin_name)); mock_plugin_name));
ASSERT_NO_THROW(core.get_versions("MOCK_HARDWARE")); ASSERT_NO_THROW(core.get_versions("MOCK_HARDWARE"));
} }
@ -87,7 +87,7 @@ TEST(RegisterPluginTests, registerNewPluginNoThrows) {
std::string mock_plugin_name{"MOCK_HARDWARE"}; std::string mock_plugin_name{"MOCK_HARDWARE"};
ASSERT_NO_THROW( ASSERT_NO_THROW(
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
mock_plugin_name)); mock_plugin_name));
ASSERT_NO_THROW(core.get_property(mock_plugin_name, ov::supported_properties)); ASSERT_NO_THROW(core.get_property(mock_plugin_name, ov::supported_properties));
@ -104,10 +104,10 @@ TEST(RegisterPluginTests, registerExistingPluginThrows) {
std::string mock_plugin_name{"MOCK_HARDWARE"}; std::string mock_plugin_name{"MOCK_HARDWARE"};
ASSERT_NO_THROW( ASSERT_NO_THROW(
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
mock_plugin_name)); mock_plugin_name));
ASSERT_THROW(core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ASSERT_THROW(core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
mock_plugin_name), mock_plugin_name),
ov::Exception); ov::Exception);
} }
@ -118,7 +118,7 @@ inline std::string getPluginFile() {
std::ostringstream stream; std::ostringstream stream;
stream << "<ie><plugins><plugin name=\"mock\" location=\""; stream << "<ie><plugins><plugin name=\"mock\" location=\"";
stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX); std::string("mock_engine") + OV_BUILD_POSTFIX);
stream << "\"></plugin></plugins></ie>"; stream << "\"></plugin></plugins></ie>";
ov::test::utils::createFile(filename, stream.str()); ov::test::utils::createFile(filename, stream.str());
return filename; return filename;

View File

@ -16,7 +16,7 @@ class SharedObjectOVTests : public ::testing::Test {
protected: protected:
std::string get_mock_engine_name() { std::string get_mock_engine_name() {
return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(), return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX); std::string("mock_engine") + OV_BUILD_POSTFIX);
} }
void loadDll(const string& libraryName) { void loadDll(const string& libraryName) {

View File

@ -23,7 +23,7 @@ OPENVINO_SUPPRESS_DEPRECATED_START
static std::string getExtensionPath() { static std::string getExtensionPath() {
return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(), return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX); std::string("template_extension") + OV_BUILD_POSTFIX);
} }
TEST(ExtensionTests, testGetOpSets) { TEST(ExtensionTests, testGetOpSets) {

View File

@ -30,7 +30,7 @@ namespace {
std::string get_mock_engine_path() { std::string get_mock_engine_path() {
std::string mockEngineName("mock_engine"); std::string mockEngineName("mock_engine");
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mockEngineName + IE_BUILD_POSTFIX); mockEngineName + OV_BUILD_POSTFIX);
} }
template <class T> template <class T>
@ -623,7 +623,7 @@ void ov::auto_plugin::tests::AutoFuncTests::reg_plugin(ov::Core& core,
injectProxyEngine(plugin.get()); injectProxyEngine(plugin.get());
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
device_name, device_name,
properties); properties);
m_mock_plugins.emplace_back(plugin); m_mock_plugins.emplace_back(plugin);

View File

@ -32,7 +32,7 @@ namespace {
std::string get_mock_engine_path() { std::string get_mock_engine_path() {
std::string mock_engine_name("mock_engine"); std::string mock_engine_name("mock_engine");
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mock_engine_name + IE_BUILD_POSTFIX); mock_engine_name + OV_BUILD_POSTFIX);
} }
template <class T> template <class T>

View File

@ -44,7 +44,7 @@ if(X86 OR X86_64 OR AARCH64)
else() else()
set(ENABLE_MLAS_FOR_CPU_DEFAULT OFF) set(ENABLE_MLAS_FOR_CPU_DEFAULT OFF)
endif() endif()
ie_option(ENABLE_MLAS_FOR_CPU "Enable MLAS for OpenVINO CPU Plugin" ${ENABLE_MLAS_FOR_CPU_DEFAULT}) ov_option(ENABLE_MLAS_FOR_CPU "Enable MLAS for OpenVINO CPU Plugin" ${ENABLE_MLAS_FOR_CPU_DEFAULT})
add_subdirectory(thirdparty) add_subdirectory(thirdparty)

View File

@ -201,7 +201,7 @@ TEST(Extension, XmlModelWithCustomAbs) {
static std::string get_extension_path() { static std::string get_extension_path() {
return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(), return FileUtils::makePluginLibraryName<char>(ov::test::utils::getExecutableDirectory(),
std::string("template_extension") + IE_BUILD_POSTFIX); std::string("template_extension") + OV_BUILD_POSTFIX);
} }

View File

@ -23,7 +23,7 @@ file(GLOB_RECURSE HEADERS
# build avx2.cpp with AVX2 support, only for Windows # build avx2.cpp with AVX2 support, only for Windows
if(ENABLE_AVX2 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(ENABLE_AVX2 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_avx2_optimization_flags(avx2_flags) ov_avx2_optimization_flags(avx2_flags)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/pre_post_process/hw_accelerated_converter_avx2.cpp PROPERTIES COMPILE_OPTIONS "${avx2_flags}") set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/pre_post_process/hw_accelerated_converter_avx2.cpp PROPERTIES COMPILE_OPTIONS "${avx2_flags}")
add_compile_definitions(HAVE_AVX2=1) add_compile_definitions(HAVE_AVX2=1)
endif() endif()

View File

@ -44,7 +44,7 @@ protected:
void SetUp() override; void SetUp() override;
static std::string make_so_name(const std::string & input) { static std::string make_so_name(const std::string & input) {
return ov::test::utils::pre + input + IE_BUILD_POSTFIX + ov::test::utils::ext; return ov::test::utils::pre + input + OV_BUILD_POSTFIX + ov::test::utils::ext;
} }
void TearDown() override; void TearDown() override;

View File

@ -61,7 +61,7 @@ endif()
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE}) ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
if(ENABLE_SSE42) if(ENABLE_SSE42)
ie_sse42_optimization_flags(sse4_2_flags) ov_sse42_optimization_flags(sse4_2_flags)
set_source_files_properties(impls/cpu/detection_output.cpp PROPERTIES set_source_files_properties(impls/cpu/detection_output.cpp PROPERTIES
COMPILE_FLAGS "${sse4_2_flags}" COMPILE_FLAGS "${sse4_2_flags}"
COMPILE_DEFINITIONS "HAVE_SSE") COMPILE_DEFINITIONS "HAVE_SSE")

View File

@ -82,7 +82,7 @@ elseif((NOT ANDROID) AND (UNIX))
endif() endif()
if(ENABLE_SSE42) if(ENABLE_SSE42)
ie_sse42_optimization_flags(sse4_2_flags) ov_sse42_optimization_flags(sse4_2_flags)
set_source_files_properties(${SOURCES_ALL} PROPERTIES COMPILE_FLAGS "${sse4_2_flags}") set_source_files_properties(${SOURCES_ALL} PROPERTIES COMPILE_FLAGS "${sse4_2_flags}")
endif() endif()

View File

@ -28,7 +28,7 @@ namespace {
std::string get_mock_engine_path() { std::string get_mock_engine_path() {
std::string mockEngineName("mock_engine"); std::string mockEngineName("mock_engine");
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mockEngineName + IE_BUILD_POSTFIX); mockEngineName + OV_BUILD_POSTFIX);
} }
template <class T> template <class T>
@ -492,7 +492,7 @@ void ov::proxy::tests::ProxyTests::reg_plugin(ov::Core& core,
injectProxyEngine(plugin.get()); injectProxyEngine(plugin.get());
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX), std::string("mock_engine") + OV_BUILD_POSTFIX),
device_name, device_name,
properties); properties);
m_mock_plugins.emplace_back(plugin); m_mock_plugins.emplace_back(plugin);

View File

@ -31,6 +31,6 @@ endif()
# install # install
if(OpenVINODeveloperPackage_FOUND) if(OpenVINODeveloperPackage_FOUND)
ie_cpack(template) ov_cpack(template)
endif() endif()
# [cmake:main] # [cmake:main]

View File

@ -36,7 +36,7 @@ ov_build_target_faster(interpreter_backend UNITY)
target_compile_definitions(interpreter_backend target_compile_definitions(interpreter_backend
PRIVATE PRIVATE
SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}" SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" SHARED_LIB_SUFFIX="${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
) )
target_link_libraries(interpreter_backend PRIVATE openvino::builders openvino::reference openvino::util openvino::runtime::dev openvino::shape_inference) target_link_libraries(interpreter_backend PRIVATE openvino::builders openvino::reference openvino::util openvino::runtime::dev openvino::shape_inference)

View File

@ -2,11 +2,11 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
set(IE_TESTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) set(OV_TESTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
enable_testing() enable_testing()
ie_option(ENABLE_CONFORMANCE_PGQL "Enables support of PostgreSQL-based reporting from test tools" OFF) ov_option(ENABLE_CONFORMANCE_PGQL "Enables support of PostgreSQL-based reporting from test tools" OFF)
mark_as_advanced(FORCE ENABLE_CONFORMANCE_PGQL) mark_as_advanced(FORCE ENABLE_CONFORMANCE_PGQL)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")

View File

@ -87,7 +87,7 @@ inline InferenceEngine::Core createIECoreWithTemplate() {
PluginCache::get().reset(); PluginCache::get().reset();
InferenceEngine::Core ie; InferenceEngine::Core ie;
#ifndef OPENVINO_STATIC_LIBRARY #ifndef OPENVINO_STATIC_LIBRARY
std::string pluginName = "openvino_template_plugin" IE_BUILD_POSTFIX; std::string pluginName = "openvino_template_plugin" OV_BUILD_POSTFIX;
ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName), ie.RegisterPlugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName),
ov::test::utils::DEVICE_TEMPLATE); ov::test::utils::DEVICE_TEMPLATE);
#endif // !OPENVINO_STATIC_LIBRARY #endif // !OPENVINO_STATIC_LIBRARY

View File

@ -161,7 +161,7 @@ inline ov::Core createCoreWithTemplate() {
ov::Core core; ov::Core core;
#ifndef OPENVINO_STATIC_LIBRARY #ifndef OPENVINO_STATIC_LIBRARY
std::string pluginName = "openvino_template_plugin"; std::string pluginName = "openvino_template_plugin";
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName), core.register_plugin(ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName),
ov::test::utils::DEVICE_TEMPLATE); ov::test::utils::DEVICE_TEMPLATE);
#endif // !OPENVINO_STATIC_LIBRARY #endif // !OPENVINO_STATIC_LIBRARY

View File

@ -65,8 +65,8 @@ public:
std::tie(pluginName, target_device) = GetParam(); std::tie(pluginName, target_device) = GetParam();
SKIP_IF_CURRENT_TEST_IS_DISABLED(); SKIP_IF_CURRENT_TEST_IS_DISABLED();
APIBaseTest::SetUp(); APIBaseTest::SetUp();
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
if (pluginName == (std::string("openvino_template_plugin") + IE_BUILD_POSTFIX)) { if (pluginName == (std::string("openvino_template_plugin") + OV_BUILD_POSTFIX)) {
pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName); pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName);
} }
} }
@ -197,7 +197,7 @@ inline std::string getPluginFile() {
std::ostringstream stream; std::ostringstream stream;
stream << "<ie><plugins><plugin name=\"mock\" location=\""; stream << "<ie><plugins><plugin name=\"mock\" location=\"";
stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX); std::string("mock_engine") + OV_BUILD_POSTFIX);
stream << "\"></plugin></plugins></ie>"; stream << "\"></plugin></plugins></ie>";
ov::test::utils::createFile(filename, stream.str()); ov::test::utils::createFile(filename, stream.str());
return filename; return filename;

View File

@ -123,8 +123,8 @@ public:
std::tie(pluginName, target_device) = GetParam(); std::tie(pluginName, target_device) = GetParam();
SKIP_IF_CURRENT_TEST_IS_DISABLED(); SKIP_IF_CURRENT_TEST_IS_DISABLED();
APIBaseTest::SetUp(); APIBaseTest::SetUp();
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
if (pluginName == (std::string("openvino_template_plugin") + IE_BUILD_POSTFIX)) { if (pluginName == (std::string("openvino_template_plugin") + OV_BUILD_POSTFIX)) {
pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName); pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName);
} }
} }

View File

@ -55,8 +55,8 @@ public:
std::tie(pluginName, target_device) = GetParam(); std::tie(pluginName, target_device) = GetParam();
SKIP_IF_CURRENT_TEST_IS_DISABLED(); SKIP_IF_CURRENT_TEST_IS_DISABLED();
ov::test::behavior::APIBaseTest::SetUp(); ov::test::behavior::APIBaseTest::SetUp();
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
if (pluginName == (std::string("openvino_template_plugin") + IE_BUILD_POSTFIX)) { if (pluginName == (std::string("openvino_template_plugin") + OV_BUILD_POSTFIX)) {
pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName); pluginName = ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName);
} }
} }
@ -149,7 +149,7 @@ inline std::string getPluginFile() {
std::ostringstream stream; std::ostringstream stream;
stream << "<ie><plugins><plugin name=\"mock\" location=\""; stream << "<ie><plugins><plugin name=\"mock\" location=\"";
stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), stream << ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("mock_engine") + IE_BUILD_POSTFIX); std::string("mock_engine") + OV_BUILD_POSTFIX);
stream << "\"></plugin></plugins></ie>"; stream << "\"></plugin></plugins></ie>";
ov::test::utils::createFile(filename, stream.str()); ov::test::utils::createFile(filename, stream.str());
return filename; return filename;

View File

@ -119,11 +119,11 @@ void HeteroSyntheticTest::SetUp() {
try { try {
if (pluginParameter._location == "openvino_template_plugin") { if (pluginParameter._location == "openvino_template_plugin") {
PluginCache::get().ie()->RegisterPlugin(ov::util::make_plugin_library_name( PluginCache::get().ie()->RegisterPlugin(ov::util::make_plugin_library_name(
ov::test::utils::getExecutableDirectory(), pluginParameter._location + IE_BUILD_POSTFIX), ov::test::utils::getExecutableDirectory(), pluginParameter._location + OV_BUILD_POSTFIX),
pluginParameter._name); pluginParameter._name);
} else { } else {
PluginCache::get().ie()->RegisterPlugin(pluginParameter._location PluginCache::get().ie()->RegisterPlugin(pluginParameter._location
+ IE_BUILD_POSTFIX, pluginParameter._name); + OV_BUILD_POSTFIX, pluginParameter._name);
} }
} catch (InferenceEngine::Exception& ex) { } catch (InferenceEngine::Exception& ex) {
if (std::string{ex.what()}.find("Device with \"" + pluginParameter._name if (std::string{ex.what()}.find("Device with \"" + pluginParameter._name

View File

@ -79,7 +79,7 @@ function(add_common_utils ADD_TARGET_NAME)
$<TARGET_PROPERTY:openvino::runtime,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:openvino::runtime,INTERFACE_INCLUDE_DIRECTORIES>
PRIVATE PRIVATE
$<TARGET_PROPERTY:openvino::runtime::dev,INTERFACE_INCLUDE_DIRECTORIES>) $<TARGET_PROPERTY:openvino::runtime::dev,INTERFACE_INCLUDE_DIRECTORIES>)
target_include_directories(${ADD_TARGET_NAME} SYSTEM PUBLIC ${IE_TESTS_ROOT}/test_utils) target_include_directories(${ADD_TARGET_NAME} SYSTEM PUBLIC ${OV_TESTS_ROOT}/test_utils)
target_compile_definitions(${ADD_TARGET_NAME} PUBLIC ${ARGN}) target_compile_definitions(${ADD_TARGET_NAME} PUBLIC ${ARGN})

View File

@ -288,7 +288,7 @@ namespace {
inline std::string get_mock_engine_path() { inline std::string get_mock_engine_path() {
std::string mockEngineName("mock_engine"); std::string mockEngineName("mock_engine");
return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), return ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
mockEngineName + IE_BUILD_POSTFIX); mockEngineName + OV_BUILD_POSTFIX);
} }
template <class T> template <class T>

View File

@ -192,7 +192,7 @@ TestCase::TestCase(const std::shared_ptr<ov::Model>& function, const std::string
// Register template plugin // Register template plugin
m_core.register_plugin( m_core.register_plugin(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(),
std::string("openvino_template_plugin") + IE_BUILD_POSTFIX), std::string("openvino_template_plugin") + OV_BUILD_POSTFIX),
"TEMPLATE"); "TEMPLATE");
} catch (...) { } catch (...) {
} }

View File

@ -58,7 +58,7 @@ std::shared_ptr<ov::Core> PluginCache::core(const std::string& deviceToCheck) {
// register template plugin if it is needed // register template plugin if it is needed
try { try {
std::string pluginName = "openvino_template_plugin"; std::string pluginName = "openvino_template_plugin";
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
ov_core->register_plugin( ov_core->register_plugin(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName),
"TEMPLATE"); "TEMPLATE");

View File

@ -57,7 +57,7 @@ std::shared_ptr<InferenceEngine::Core> PluginCache::ie(const std::string& device
// register template plugin if it is needed // register template plugin if it is needed
try { try {
std::string pluginName = "openvino_template_plugin"; std::string pluginName = "openvino_template_plugin";
pluginName += IE_BUILD_POSTFIX; pluginName += OV_BUILD_POSTFIX;
ie_core->RegisterPlugin( ie_core->RegisterPlugin(
ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName), ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), pluginName),
"TEMPLATE"); "TEMPLATE");

View File

@ -11,7 +11,7 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release" "Debug" "RelWithD
set(OpenVINO_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../") set(OpenVINO_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../")
find_package(IEDevScripts REQUIRED find_package(OpenVINODeveloperScripts REQUIRED
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package" PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH) NO_DEFAULT_PATH)

Some files were not shown because too many files have changed in this diff Show More