summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-08-18 11:03:20 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-08-18 11:08:01 +0200
commitc969b7e7a601cf9507ab0684d7eed22bb2f706df (patch)
tree4413241c1b4cf35e51795ea927b649dca58f1ec6 /storageapi
parentef6227ebc92c625081f703a806e0b0c2c02a5a1c (diff)
Consolidate suppress warnings for protobuf sources.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
index 1b1e224f034..b749844775d 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
+++ b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
@@ -9,11 +9,8 @@ PROTOBUF_GENERATE_CPP(storageapi_PROTOBUF_SRCS storageapi_PROTOBUF_HDRS
vespa_add_source_target(protobufgen_storageapi_mbusprot DEPENDS ${storageapi_PROTOBUF_SRCS} ${storageapi_PROTOBUF_HDRS})
-# protoc-generated files emit compiler warnings that we normally treat as errors.
-# Instead of rolling our own compiler plugin we'll pragmatically disable the noise.
-if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
- set_source_files_properties(${storageapi_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-array-bounds -Wno-suggest-override -Wno-inline")
-endif()
+vespa_suppress_warnings_for_protobuf_sources(SOURCES ${storageapi_PROTOBUF_SRCS})
+
# protoc explicitly annotates methods with inline, which triggers -Werror=inline when
# the header file grows over a certain size.
set_source_files_properties(protocolserialization7.cpp PROPERTIES COMPILE_FLAGS "-Wno-inline")