summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logd/src/logd/CMakeLists.txt4
-rw-r--r--logd/src/logd/log_protocol_proto.h2
-rw-r--r--searchlib/src/vespa/searchlib/engine/CMakeLists.txt6
-rw-r--r--searchlib/src/vespa/searchlib/engine/search_protocol_proto.h2
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt4
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protobuf_includes.h2
6 files changed, 16 insertions, 4 deletions
diff --git a/logd/src/logd/CMakeLists.txt b/logd/src/logd/CMakeLists.txt
index 629c7b1637a..1b2b078ac94 100644
--- a/logd/src/logd/CMakeLists.txt
+++ b/logd/src/logd/CMakeLists.txt
@@ -7,7 +7,9 @@ find_package(Protobuf REQUIRED)
protobuf_generate_cpp(logd_PROTOBUF_SRCS logd_PROTOBUF_HDRS ../../../logserver/src/protobuf/log_protocol.proto)
# protoc-generated files emit compiler warnings that we normally treat as errors.
-set_source_files_properties(${logd_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set_source_files_properties(${logd_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+endif()
vespa_add_library(logd STATIC
SOURCES
diff --git a/logd/src/logd/log_protocol_proto.h b/logd/src/logd/log_protocol_proto.h
index a8d5e4aa208..6f82b5d28b8 100644
--- a/logd/src/logd/log_protocol_proto.h
+++ b/logd/src/logd/log_protocol_proto.h
@@ -3,7 +3,9 @@
#pragma once
#pragma GCC diagnostic push
+#ifndef __clang__
#pragma GCC diagnostic ignored "-Wsuggest-override"
+#endif
#include "log_protocol.pb.h"
diff --git a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
index 1957a882d9a..e0c8e3113a4 100644
--- a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
@@ -4,8 +4,10 @@ find_package(Protobuf REQUIRED)
protobuf_generate_cpp(searchlib_engine_PROTOBUF_SRCS searchlib_engine_PROTOBUF_HDRS ../../../../src/protobuf/search_protocol.proto)
# protoc-generated files emit compiler warnings that we normally treat as errors.
-set_source_files_properties(${searchlib_engine_PROTOBUF_SRCS}
- PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set_source_files_properties(${searchlib_engine_PROTOBUF_SRCS}
+ PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+endif()
vespa_add_library(searchlib_engine OBJECT
SOURCES
diff --git a/searchlib/src/vespa/searchlib/engine/search_protocol_proto.h b/searchlib/src/vespa/searchlib/engine/search_protocol_proto.h
index b13c778fa6f..e2eeca74e44 100644
--- a/searchlib/src/vespa/searchlib/engine/search_protocol_proto.h
+++ b/searchlib/src/vespa/searchlib/engine/search_protocol_proto.h
@@ -3,7 +3,9 @@
#pragma once
#pragma GCC diagnostic push
+#ifndef __clang__
#pragma GCC diagnostic ignored "-Wsuggest-override"
+#endif
#include "search_protocol.pb.h"
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"