diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2019-05-08 13:05:40 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2019-05-08 13:05:40 +0200 |
commit | 83e2da467bb0a2096720ecfc888044a1361439d0 (patch) | |
tree | 831406c96d6012ffa0b1591a4519e3c8e0f47b2d /storageapi | |
parent | adefed58438494c8dbd07542eaf6fdf900db74fa (diff) |
Avoid unknown warning options when using clang.
Diffstat (limited to 'storageapi')
-rw-r--r-- | storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt | 4 | ||||
-rw-r--r-- | storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt index dc4e3897e49..cff34afa00c 100644 --- a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt +++ b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt @@ -9,7 +9,9 @@ PROTOBUF_GENERATE_CPP(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. -set_source_files_properties(${storageapi_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override -Wno-inline") +if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set_source_files_properties(${storageapi_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override -Wno-inline") +endif() # 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") diff --git a/storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h b/storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h index 8e878cf0560..ed7fbc0bdf9 100644 --- a/storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h +++ b/storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h @@ -4,7 +4,9 @@ // Disable warnings emitted by protoc generated files #pragma GCC diagnostic push +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wsuggest-override" +#endif #include "feed.pb.h" #include "visiting.pb.h" |