From 42fc7a4f5200d7cd8c17e5778df77bd980e619c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A9=D0=B0=D0=BF=D0=BE=D0=B2?= Date: Mon, 2 Aug 2021 22:01:08 +0500 Subject: [PATCH] Disable the -Wstringop-overflow warning from GCC 7 --- test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0e8c59e21ad9..f5d9f64043bb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -26,6 +26,10 @@ function(add_fmt_executable name) if (MINGW) target_link_libraries(${name} -static-libgcc -static-libstdc++) endif () + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND + NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) + target_link_libraries(${name} -Wno-stringop-overflow) + endif () endfunction() # Adds a test.