aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b6d48f5b5ea..4ef4259d8f6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -59,6 +59,14 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION)
add_compile_options(-Wno-stringop-overflow)
endif()
+ set(GCC_STRING_OVERREAD_WARNING_DISABLE_VERSION 12.0.0)
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERREAD_WARNING_DISABLE_VERSION)
+ add_compile_options(-Wno-stringop-overread)
+ endif()
+ set(GCC_ARRAY_BOUNDS_WARNING_DISABLE_VERSION 12.0.0)
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_ARRAY_BOUNDS_WARNING_DISABLE_VERSION)
+ add_compile_options(-Wno-array-bounds)
+ endif()
else()
message(WARNING "WARNING: Unsupported C compiler `${CMAKE_C_COMPILER_ID}` is used")
set (PRINT_MIN_C_COMPILER_VER TRUE)