summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2022-08-25 17:42:24 -0400
committerDave Wallace <dwallacelf@gmail.com>2022-08-25 17:47:35 -0400
commit000a4ebed7d4097b88869a336a311f49873f8cf7 (patch)
treefed617e244b40794d330d7e208e543131bee8b37 /src
parentabd5669422c5805da5135496d5e5a394fa5aa602 (diff)
build: disable gcc warning stringop-overflow for gcc-10 or greater
- this warning causes build errors with gcc on ubuntu 22.04 Type: make Change-Id: Id8f6ab44b2315ce8a4564ea924d799ecb6f57fdf Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2fb0703e174..fb4463e332e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -55,6 +55,10 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if (CMAKE_C_COMPILER_VERSION VERSION_LESS MIN_SUPPORTED_GNU_C_COMPILER_VERSION)
set(COMPILER_TOO_OLD TRUE)
endif()
+ set(GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION 10.0.0)
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION)
+ add_compile_options(-Wno-stringop-overflow)
+ endif()
else()
message(WARNING "WARNING: Unsupported C compiler `${CMAKE_C_COMPILER_ID}` is used")
set (PRINT_MIN_C_COMPILER_VER TRUE)