From 9fcd9c4c1201daabfaa7c3966a3732f358b094c8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 22 Jul 2024 12:41:12 -0700 Subject: [PATCH] Remove all warning suppressions --- test/CMakeLists.txt | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a14dfc24e305..adb6fa6d1314 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,22 +8,6 @@ target_include_directories(test-main PUBLIC $) target_link_libraries(test-main gtest fmt) -function(add_fmt_executable name) - add_executable(${name} ${ARGN}) - # (Wstringop-overflow) - [meta-bug] bogus/missing -Wstringop-overflow warnings - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 - # Bogus -Wstringop-overflow warning - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100395 - # [10 Regression] spurious -Wstringop-overflow writing to a trailing array plus offset - # 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() - # Adds a test. # Usage: add_fmt_test(name srcs...) function(add_fmt_test name) @@ -42,7 +26,7 @@ function(add_fmt_test name) else () set(libs test-main fmt) endif () - add_fmt_executable(${name} ${sources}) + add_executable(${name} ${sources}) target_link_libraries(${name} ${libs}) if (ADD_FMT_TEST_HEADER_ONLY AND NOT FMT_UNICODE) @@ -145,7 +129,7 @@ if (NOT DEFINED MSVC_STATIC_RUNTIME AND MSVC) endif() if (NOT MSVC_STATIC_RUNTIME) - add_fmt_executable(posix-mock-test + add_executable(posix-mock-test posix-mock-test.cc ../src/format.cc ${TEST_MAIN_SRC}) target_include_directories( posix-mock-test PRIVATE ${PROJECT_SOURCE_DIR}/include)