summaryrefslogtreecommitdiffstats
path: root/storageapi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-05-08 13:05:40 +0200
committerTor Egge <Tor.Egge@broadpark.no>2019-05-08 13:05:40 +0200
commit83e2da467bb0a2096720ecfc888044a1361439d0 (patch)
tree831406c96d6012ffa0b1591a4519e3c8e0f47b2d /storageapi
parentadefed58438494c8dbd07542eaf6fdf900db74fa (diff)
Avoid unknown warning options when using clang.
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt4
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h2
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"