summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-08-23 13:15:25 +0200
committerTor Egge <Tor.Egge@broadpark.no>2019-08-23 13:15:25 +0200
commitbd0552e982673ba180fac11c7b3d06bb0fa7cc68 (patch)
treefe093b294f7d30aa374067ed4bf4a6d44294fd72
parent47e665c14670b193fafab3ec47e5e6ed3e13bf5e (diff)
Suppress array bounds warning when compiling generated protobuf code.
-rw-r--r--logd/src/logd/CMakeLists.txt4
-rw-r--r--searchlib/src/vespa/searchlib/engine/CMakeLists.txt4
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt4
3 files changed, 6 insertions, 6 deletions
diff --git a/logd/src/logd/CMakeLists.txt b/logd/src/logd/CMakeLists.txt
index 49644f1b199..865d810fe0e 100644
--- a/logd/src/logd/CMakeLists.txt
+++ b/logd/src/logd/CMakeLists.txt
@@ -7,8 +7,8 @@ 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.
-if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set_source_files_properties(${logd_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
+ set_source_files_properties(${logd_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-array-bounds -Wno-suggest-override")
endif()
vespa_add_library(logd STATIC
diff --git a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
index e0c8e3113a4..0dc183289c0 100644
--- a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
@@ -4,9 +4,9 @@ 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.
-if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set_source_files_properties(${searchlib_engine_PROTOBUF_SRCS}
- PROPERTIES COMPILE_FLAGS "-Wno-suggest-override")
+ PROPERTIES COMPILE_FLAGS "-Wno-array-bounds -Wno-suggest-override")
endif()
vespa_add_library(searchlib_engine OBJECT
diff --git a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
index cff34afa00c..113a4372068 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
+++ b/storageapi/src/vespa/storageapi/mbusprot/CMakeLists.txt
@@ -9,8 +9,8 @@ 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.
-if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set_source_files_properties(${storageapi_PROTOBUF_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-suggest-override -Wno-inline")
+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()
# protoc explicitly annotates methods with inline, which triggers -Werror=inline when
# the header file grows over a certain size.