From c969b7e7a601cf9507ab0684d7eed22bb2f706df Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 18 Aug 2020 11:03:20 +0200 Subject: Consolidate suppress warnings for protobuf sources. --- storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'storageapi') 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") -- cgit v1.2.3