Ignore unused-variable for libprotoc (#4948)
* ignore unused-variable for libprotoc * move apply Wno-unused-variable * apply Wno-unused-variable only if libprotoc is available
This commit is contained in:
parent
8a3ff9aeae
commit
a0b06303cf
|
|
@ -92,6 +92,8 @@ else()
|
|||
set(_proto_libs ${Protobuf_LIBRARIES})
|
||||
if(TARGET libprotoc)
|
||||
list(APPEND _proto_libs libprotoc)
|
||||
set_target_properties(libprotoc PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-unused-variable")
|
||||
endif()
|
||||
set_target_properties(${_proto_libs} PROPERTIES
|
||||
CXX_VISIBILITY_PRESET default
|
||||
|
|
@ -100,6 +102,7 @@ else()
|
|||
set_target_properties(libprotobuf libprotobuf-lite PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-unused-variable -Wno-inconsistent-missing-override")
|
||||
endif()
|
||||
|
||||
if(NGRAPH_USE_PROTOBUF_LITE)
|
||||
# if only libprotobuf-lite is used, both libprotobuf and libprotobuf-lite are built
|
||||
# libprotoc target needs symbols from libprotobuf, even in libprotobuf-lite configuration
|
||||
|
|
|
|||
Loading…
Reference in New Issue