Skip to content

Commit

Permalink
Reduced scope of -W-no-missing-declarations
Browse files Browse the repository at this point in the history
And prevent a suggest-override warnings
  • Loading branch information
gkrivor committed Nov 27, 2024
1 parent 6b169ad commit 84eee03
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/frontends/onnx/onnx_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ endif()

ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})

ov_add_compiler_flags(-Wno-missing-declarations)
# Files produced by protobuf may contain missing declarations
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR (OV_COMPILER_IS_INTEL_LLVM AND UNIX))
target_compile_options(${TARGET_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-missing-declarations>)
endif()
# Protobuf generates files which cause this warning
if(SUGGEST_OVERRIDE_SUPPORTED)
target_compile_options(${TARGET_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-suggest-override>)
endif()


ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})

0 comments on commit 84eee03

Please sign in to comment.