Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed build with protobuf-lite #6730

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_IMPORT_ENABLE)
if(NGRAPH_USE_SYSTEM_PROTOBUF)
set(link_type INTERFACE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(${target} ${link_type} -Wno-undef)
endif()
endforeach()
Expand Down
2 changes: 2 additions & 0 deletions thirdparty/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
if(TARGET libprotoc)
list(APPEND _proto_libs libprotoc)
target_compile_options(libprotoc PRIVATE -Wno-all -Wno-unused-variable)
# libprotobuf is always built for protoc
target_compile_options(libprotobuf PUBLIC -Wno-undef)
endif()
set_target_properties(${_proto_libs} PROPERTIES
CXX_VISIBILITY_PRESET default
Expand Down