From 4afd4e0dc88c5b006a586919f8a1045ecc8b85cb Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Wed, 24 Aug 2022 00:05:15 +0500 Subject: [PATCH] Disable bogus -Wstringop-overflow on GCC 11 Signed-off-by: Vladislav Shchapov --- test/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d5813706832d..971637859889 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,6 +16,8 @@ function(add_fmt_executable name) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95353 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) + target_compile_options(${name} PRIVATE -Wno-stringop-overflow) + # The linker flag is needed for LTO. target_link_libraries(${name} -Wno-stringop-overflow) endif () endfunction()