From 3a3b0709e2abe00e662534c421c8a24392374930 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Thu, 25 Aug 2022 00:37:34 +0500 Subject: [PATCH] Disable bogus -Wstringop-overflow on GCC 11 (#3054) Signed-off-by: Vladislav Shchapov 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 d5813706..97163785 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()