_ov_target_no_deprecation_error function extends INTERFACE_COMPILE_OPTIONS of such targets as openvino::runtime with -Wno-error=deprecated-declarations. It makes any target that links against openvino::runtime (directly or through public interface of target that linked directly to openvino::runtime) to compile with this option. The fact that interface options are added to the end of the list makes it impossible to override them for target-user of openvino::runtime. -Wno-error=deprecated-declarations doesn't disable the warning in contrast to -Wno-deprecated-declarations, but merely enforces to treat it as warning, not error. It means if a target tries to keep build log clean (without warning messages) and uses things like -Werror for this and links against openvino::runtime in any way, then it still will have warning messages emitted. To allow user-targets that linked against openvino::runtime to enforce treatment of warnings as errors including deprecated-declarations INTERFACE_COMPILE_OPTIONS is extended with generator expression instead, so that user-target can set property TREAT_DEPRECATED_DECLARATIONS_AS_ERRORS and get -Wno-error=deprecated-declarations coming from OpenVINO removed from the list of compile options. If TREAT_DEPRECATED_DECLARATIONS_AS_ERRORS isn't set, the behavior is unchanged and -Wno-error=deprecated-declarations is presented in INTERFACE_COMPILE_OPTIONS. Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com> |
||
|---|---|---|
| .. | ||
| OpenVINOConfig-version.cmake.in | ||
| OpenVINOConfig.cmake.in | ||
| OpenVINODeveloperPackageConfig.cmake.in | ||
| OpenVINODeveloperPackageConfigRelocatable.cmake.in | ||
| openvino.pc.in | ||