Skip to content

Commit

Permalink
Fixed build with protobuf-lite (openvinotoolkit#6730)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored and rnugmanx committed Aug 26, 2021
1 parent dd33ea7 commit 0660179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 0660179

Please sign in to comment.