Removed legacy cmake utils from IE 1.0 (#21559)
This commit is contained in:
@@ -87,11 +87,6 @@ function(ov_set_temp_directory temp_variable source_tree_dir)
|
||||
endif()
|
||||
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
|
||||
#
|
||||
@@ -294,11 +289,6 @@ function(ov_mark_target_as_cc TARGET_NAME)
|
||||
add_dependencies(${TARGET_NAME} conditional_compilation_gen)
|
||||
endfunction()
|
||||
|
||||
function(ie_mark_target_as_cc TARGET_NAME)
|
||||
message(WARNING "This function is deprecated. Please use ov_mark_target_as_cc(TARGET_NAME) instead.")
|
||||
ov_mark_target_as_cc(${TARGET_NAME})
|
||||
endfunction()
|
||||
|
||||
include(python_requirements)
|
||||
|
||||
# Code style utils
|
||||
|
||||
@@ -181,15 +181,3 @@ function(ov_add_test_target)
|
||||
COMPONENT ${ARG_COMPONENT}
|
||||
EXCLUDE_FROM_ALL)
|
||||
endfunction()
|
||||
|
||||
# deprecated
|
||||
|
||||
function(addIeTarget)
|
||||
message(WARNING "'addIeTarget' is deprecated, please, use 'ov_add_target' instead")
|
||||
ov_add_target(${ARGV})
|
||||
endfunction()
|
||||
|
||||
function(addIeTargetTest)
|
||||
message(WARNING "'addIeTargetTest' is deprecated, please, use 'ov_add_test_target' instead")
|
||||
ov_add_test_target(${ARGV})
|
||||
endfunction()
|
||||
|
||||
@@ -196,10 +196,3 @@ endfunction()
|
||||
function(ov_add_api_validator_post_build_step)
|
||||
_ov_add_api_validator_post_build_step(${ARGN})
|
||||
endfunction()
|
||||
|
||||
# deprecated
|
||||
|
||||
function(ie_add_api_validator_post_build_step)
|
||||
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()
|
||||
|
||||
@@ -130,8 +130,3 @@ function(ov_add_clang_format_target TARGET_NAME)
|
||||
add_dependencies(clang_format_check_all ${TARGET_NAME})
|
||||
add_dependencies(clang_format_fix_all ${TARGET_NAME}_fix)
|
||||
endfunction()
|
||||
|
||||
function(add_clang_format_target)
|
||||
message(WARNING "add_clang_format_target is deprecated, use ov_add_clang_format_target instead")
|
||||
ov_add_clang_format_target(${ARGV})
|
||||
endfunction()
|
||||
|
||||
@@ -32,11 +32,6 @@ macro(ov_disable_deprecated_warnings)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ov_c_cxx_deprecated}")
|
||||
endmacro()
|
||||
|
||||
macro(disable_deprecated_warnings)
|
||||
message(WARNING "'disable_deprecated_warnings' is deprecated, use 'ov_disable_deprecated_warnings' instead")
|
||||
ov_disable_deprecated_warnings()
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# ov_deprecated_no_errors()
|
||||
#
|
||||
@@ -213,16 +208,6 @@ function(ov_disable_all_warnings)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# ie_enable_lto()
|
||||
#
|
||||
# Enables Link Time Optimization compilation
|
||||
#
|
||||
macro(ie_enable_lto)
|
||||
message(WARNING "'ie_enable_lto' is deprecated, set 'INTERPROCEDURAL_OPTIMIZATION_RELEASE' target property instead")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# ov_add_compiler_flags(<flag1 [flag2 flag3 ...>])
|
||||
#
|
||||
@@ -235,11 +220,6 @@ macro(ov_add_compiler_flags)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(ie_add_compiler_flags)
|
||||
message(WARNING "'ie_add_compiler_flags' is deprecated, use 'ov_add_compiler_flags' instead")
|
||||
ov_add_compiler_flags(${ARGN})
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# ov_force_include(<target> <PUBLIC | PRIVATE | INTERFACE> <header file>)
|
||||
#
|
||||
|
||||
@@ -19,10 +19,3 @@ function(ov_build_target_faster TARGET_NAME)
|
||||
target_precompile_headers(${TARGET_NAME} ${FASTER_BUILD_PCH})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# deprecated
|
||||
|
||||
function(ie_faster_build)
|
||||
message(WARNING "ie_faster_build is deprecated, use ov_build_target_faster instead")
|
||||
ov_build_target_faster(${ARGV})
|
||||
endfunction()
|
||||
|
||||
@@ -55,20 +55,3 @@ function (ov_print_enabled_features)
|
||||
endforeach()
|
||||
message(STATUS "")
|
||||
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()
|
||||
|
||||
@@ -241,10 +241,3 @@ macro(ov_cpack)
|
||||
|
||||
include(CPack)
|
||||
endmacro()
|
||||
|
||||
# deprecated
|
||||
|
||||
macro(ie_cpack)
|
||||
message(WARNING "'ie_cpack' is deprecated. Please, use 'ov_cpack'")
|
||||
ov_cpack(${ARGV})
|
||||
endmacro()
|
||||
|
||||
@@ -167,11 +167,6 @@ function(ov_add_plugin)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(ie_add_plugin)
|
||||
message(WARNING "'ie_add_plugin' is deprecated. Please, use 'ov_add_plugin'")
|
||||
ov_add_plugin(${ARGN})
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# ov_register_in_plugins_xml(MAIN_TARGET <main target name>)
|
||||
#
|
||||
@@ -263,14 +258,6 @@ macro(ov_register_plugins)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# ie_register_plugins()
|
||||
#
|
||||
macro(ie_register_plugins)
|
||||
message(WARNING "'ie_register_plugins' is deprecated. Please, use 'ov_register_plugins'")
|
||||
ov_register_plugins(${ARGN})
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# ov_target_link_plugins(<TARGET_NAME>)
|
||||
#
|
||||
|
||||
@@ -166,28 +166,6 @@ macro(ov_parse_ci_build_number repo_root)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (addVersionDefines FILE)
|
||||
message(WARNING "'addVersionDefines' is deprecated. Please, use 'ov_add_version_defines'")
|
||||
|
||||
set(__version_file ${FILE})
|
||||
if(NOT IS_ABSOLUTE ${__version_file})
|
||||
set(__version_file "${CMAKE_CURRENT_SOURCE_DIR}/${__version_file}")
|
||||
endif()
|
||||
if(NOT EXISTS ${__version_file})
|
||||
message(FATAL_ERROR "${FILE} does not exists in current source directory")
|
||||
endif()
|
||||
foreach (VAR ${ARGN})
|
||||
if (DEFINED ${VAR} AND NOT "${${VAR}}" STREQUAL "")
|
||||
set_property(
|
||||
SOURCE ${__version_file}
|
||||
APPEND
|
||||
PROPERTY COMPILE_DEFINITIONS
|
||||
${VAR}="${${VAR}}")
|
||||
endif()
|
||||
endforeach()
|
||||
unset(__version_file)
|
||||
endmacro()
|
||||
|
||||
macro (ov_add_version_defines FILE TARGET)
|
||||
set(__version_file ${FILE})
|
||||
if(NOT IS_ABSOLUTE ${__version_file})
|
||||
|
||||
@@ -51,10 +51,3 @@ function(ov_target_link_whole_archive targetName)
|
||||
target_link_libraries(${targetName} PRIVATE ${libs})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# deprecated
|
||||
|
||||
function(ieTargetLinkWholeArchive)
|
||||
message(WARNING "'ieTargetLinkWholeArchive' is deprecated, use 'ov_target_link_whole_archive' instead")
|
||||
ov_target_link_whole_archive(${ARGN})
|
||||
endfunction()
|
||||
|
||||
@@ -2,38 +2,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
function(ie_generate_dev_package_config)
|
||||
# dummy check that OpenCV is here
|
||||
find_package(OpenCV QUIET)
|
||||
if(OpenCV_VERSION VERSION_LESS 3.0)
|
||||
set(OpenCV_FOUND OFF)
|
||||
endif()
|
||||
|
||||
# export all targets with prefix and use them during extra modules build
|
||||
export(TARGETS ${_OPENVINO_DEVELOPER_PACKAGE_TARGETS} NAMESPACE IE::
|
||||
APPEND FILE "${CMAKE_BINARY_DIR}/inference_engine_developer_package_targets.cmake")
|
||||
add_custom_target(ie_dev_targets DEPENDS ${_OPENVINO_DEVELOPER_PACKAGE_TARGETS})
|
||||
|
||||
set(PATH_VARS "OpenVINO_SOURCE_DIR")
|
||||
if(ENABLE_SAMPLES OR ENABLE_TESTS)
|
||||
list(APPEND PATH_VARS "gflags_BINARY_DIR")
|
||||
# if we've found system gflags
|
||||
if(gflags_DIR)
|
||||
set(gflags_BINARY_DIR "${gflags_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in"
|
||||
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
|
||||
INSTALL_DESTINATION share # not used
|
||||
PATH_VARS ${PATH_VARS}
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
|
||||
configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in"
|
||||
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig-version.cmake"
|
||||
@ONLY)
|
||||
endfunction()
|
||||
|
||||
function(ov_generate_dev_package_config)
|
||||
# dummy check that OpenCV is here
|
||||
find_package(OpenCV QUIET)
|
||||
@@ -207,7 +175,6 @@ endfunction()
|
||||
|
||||
# this OpenVINODeveloperPackageConfig.cmake is not used during extra modules build
|
||||
# since it's generated after modules are configured
|
||||
ie_generate_dev_package_config()
|
||||
ov_generate_dev_package_config()
|
||||
|
||||
# extra modules must be registered after inference_engine library
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
# Copyright (C) 2018-2023 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
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]
|
||||
set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
|
||||
set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
|
||||
|
||||
# Variables to export in plugin's projects
|
||||
|
||||
set(ov_options "@OV_OPTIONS@")
|
||||
list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
|
||||
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
|
||||
CMAKE_INSTALL_PREFIX CPACK_GENERATOR)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND ov_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
endif()
|
||||
|
||||
get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if(_OV_GENERATOR_MULTI_CONFIG)
|
||||
list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
|
||||
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
|
||||
list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND ov_options CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
unset(_OV_GENERATOR_MULTI_CONFIG)
|
||||
|
||||
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
|
||||
|
||||
message(STATUS "The following CMake options are exported from Inference Engine Developer package")
|
||||
message(" ")
|
||||
foreach(option IN LISTS ov_options)
|
||||
if(NOT DEFINED "${option}")
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" ${option})
|
||||
endif()
|
||||
message(" ${option}: ${${option}}")
|
||||
endforeach()
|
||||
message(" ")
|
||||
|
||||
# for samples in 3rd party projects
|
||||
if(ENABLE_SAMPLES)
|
||||
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
|
||||
endif()
|
||||
|
||||
# Disable warning as error for private components
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
|
||||
#
|
||||
# Content
|
||||
#
|
||||
|
||||
find_dependency(OpenVINODeveloperScripts
|
||||
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_dependency(InferenceEngine
|
||||
PATHS "${CMAKE_CURRENT_LIST_DIR}"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
find_dependency(ngraph
|
||||
PATHS "${CMAKE_CURRENT_LIST_DIR}"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if(TARGET openvino::runtime AND NOT TARGET IE::runtime)
|
||||
add_library(IE::runtime INTERFACE IMPORTED)
|
||||
set_target_properties(IE::runtime PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES openvino::runtime)
|
||||
endif()
|
||||
|
||||
# WA for cmake: it exports ngraph as IE::ngraph in the IE export list
|
||||
# while we already have ngraph export in its own export list as ngraph::ngraph
|
||||
if(TARGET ngraph::ngraph AND NOT TARGET IE::ngraph)
|
||||
add_library(IE::ngraph INTERFACE IMPORTED)
|
||||
set_target_properties(IE::ngraph PROPERTIES INTERFACE_LINK_LIBRARIES ngraph::ngraph)
|
||||
endif()
|
||||
|
||||
_ov_find_tbb()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/inference_engine_developer_package_targets.cmake")
|
||||
|
||||
if(TARGET IE::ov_core_dev AND NOT TARGET openvino::core::dev)
|
||||
add_library(openvino::core::dev INTERFACE IMPORTED)
|
||||
set_target_properties(openvino::core::dev PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES IE::ov_core_dev)
|
||||
endif()
|
||||
|
||||
if(TARGET IE::runtime::dev AND NOT TARGET openvino::runtime::dev)
|
||||
add_library(openvino::runtime::dev INTERFACE IMPORTED)
|
||||
set_target_properties(openvino::runtime::dev PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES IE::runtime::dev)
|
||||
endif()
|
||||
|
||||
if(TARGET IE::reference AND NOT TARGET IE::ngraph_reference)
|
||||
add_library(IE::ngraph_reference INTERFACE IMPORTED)
|
||||
set_target_properties(IE::ngraph_reference PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES IE::reference)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SYSTEM_PUGIXML)
|
||||
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
|
||||
set(_ov_pugixml_cmake_interface "@PugiXML_FOUND@")
|
||||
if(_ov_pugixml_pkgconfig_interface)
|
||||
find_dependency(PkgConfig)
|
||||
elseif(_ov_pugixml_cmake_interface)
|
||||
find_dependency(PugiXML)
|
||||
endif()
|
||||
if(PugiXML_FOUND)
|
||||
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
add_library(IE::pugixml ALIAS pugixml)
|
||||
elseif(PkgConfig_FOUND)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
|
||||
set(pkg_config_quiet_arg QUIET)
|
||||
endif()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
||||
set(pkg_config_required_arg REQUIRED)
|
||||
endif()
|
||||
|
||||
pkg_search_module(pugixml
|
||||
${pkg_config_quiet_arg}
|
||||
${pkg_config_required_arg}
|
||||
IMPORTED_TARGET GLOBAL
|
||||
pugixml)
|
||||
|
||||
unset(pkg_config_quiet_arg)
|
||||
unset(pkg_config_required_arg)
|
||||
|
||||
if(pugixml_FOUND)
|
||||
add_library(IE::pugixml ALIAS PkgConfig::pugixml)
|
||||
|
||||
# PATCH: on Ubuntu 18.04 pugixml.pc contains incorrect include directories
|
||||
get_target_property(interface_include_dir PkgConfig::pugixml INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if(interface_include_dir AND NOT EXISTS "${interface_include_dir}")
|
||||
set_target_properties(PkgConfig::pugixml PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# debian 9 case: no cmake, no pkg-config files
|
||||
if(NOT TARGET IE::pugixml)
|
||||
find_library(PUGIXML_LIBRARY NAMES pugixml DOC "Path to pugixml library")
|
||||
if(PUGIXML_LIBRARY)
|
||||
add_library(IE::pugixml INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(IE::pugixml PROPERTIES INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}")
|
||||
else()
|
||||
message(FATAL_ERROR "Failed to find system pugixml in OpenVINO Developer Package")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(_ov_nlohmann_json_FOUND "@nlohmann_json_FOUND@")
|
||||
if(_ov_nlohmann_json_FOUND)
|
||||
find_dependency(nlohmann_json)
|
||||
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
|
||||
add_library(IE::nlohmann_json ALIAS nlohmann_json::nlohmann_json)
|
||||
endif()
|
||||
unset(_ov_nlohmann_json_FOUND)
|
||||
|
||||
# inherit OpenCV from main IE project if enabled
|
||||
if("@OpenCV_FOUND@")
|
||||
# Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR
|
||||
if(NOT OpenCV_DIR)
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
||||
endif()
|
||||
find_dependency(OpenCV)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Extra Compile Flags
|
||||
#
|
||||
|
||||
# don't fail on strict compilation options in 3rd party modules
|
||||
ov_dev_package_no_errors()
|
||||
|
||||
# Don't threat deprecated API warnings as errors in 3rd party apps
|
||||
ov_deprecated_no_errors()
|
||||
@@ -10,7 +10,7 @@ if(ENABLE_AUTO_BATCH)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
ie_add_compiler_flags(/wd4305)
|
||||
ov_add_compiler_flags(/wd4305)
|
||||
endif()
|
||||
|
||||
ov_add_test_target(
|
||||
|
||||
Reference in New Issue
Block a user