From 0debedfe07de91ed71ec65a78aff1f303eb2b3a9 Mon Sep 17 00:00:00 2001 From: Georgy Krivoruchko Date: Wed, 27 Nov 2024 12:44:17 +0400 Subject: [PATCH] Disabled additional warnings produced by Protobuf generated sources --- src/frontends/onnx/onnx_common/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/frontends/onnx/onnx_common/CMakeLists.txt b/src/frontends/onnx/onnx_common/CMakeLists.txt index 8609de3d495572..2e4fdac2b2c9f5 100644 --- a/src/frontends/onnx/onnx_common/CMakeLists.txt +++ b/src/frontends/onnx/onnx_common/CMakeLists.txt @@ -78,10 +78,15 @@ ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR (OV_COMPILER_IS_INTEL_LLVM AND UNIX)) target_compile_options(${TARGET_NAME} PRIVATE $<$:-Wno-missing-declarations>) endif() -# Protobuf generates files which cause this warning +# Protobuf generates files which cause a following warnings if(SUGGEST_OVERRIDE_SUPPORTED) target_compile_options(${TARGET_NAME} PRIVATE $<$:-Wno-suggest-override>) endif() - +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # 4244 conversion from 'XXX' to 'YYY', possible loss of data + ov_add_compiler_flags(/wd4244) + # '<': signed/unsigned mismatch + ov_add_compiler_flags(/wd4018) +endif() ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})