Fixed build with protobuf-lite (#6730)
This commit is contained in:
parent
11875c6694
commit
ecb5499702
2
thirdparty/CMakeLists.txt
vendored
2
thirdparty/CMakeLists.txt
vendored
@ -158,7 +158,7 @@ if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_IMPORT_ENABLE)
|
|||||||
if(NGRAPH_USE_SYSTEM_PROTOBUF)
|
if(NGRAPH_USE_SYSTEM_PROTOBUF)
|
||||||
set(link_type INTERFACE)
|
set(link_type INTERFACE)
|
||||||
endif()
|
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)
|
target_compile_options(${target} ${link_type} -Wno-undef)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
2
thirdparty/protobuf/CMakeLists.txt
vendored
2
thirdparty/protobuf/CMakeLists.txt
vendored
@ -63,6 +63,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
|
|||||||
if(TARGET libprotoc)
|
if(TARGET libprotoc)
|
||||||
list(APPEND _proto_libs libprotoc)
|
list(APPEND _proto_libs libprotoc)
|
||||||
target_compile_options(libprotoc PRIVATE -Wno-all -Wno-unused-variable)
|
target_compile_options(libprotoc PRIVATE -Wno-all -Wno-unused-variable)
|
||||||
|
# libprotobuf is always built for protoc
|
||||||
|
target_compile_options(libprotobuf PUBLIC -Wno-undef)
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(${_proto_libs} PROPERTIES
|
set_target_properties(${_proto_libs} PROPERTIES
|
||||||
CXX_VISIBILITY_PRESET default
|
CXX_VISIBILITY_PRESET default
|
||||||
|
Loading…
Reference in New Issue
Block a user