Skip to content

Commit

Permalink
Disable the -Wstringop-overflow warning from GCC 7
Browse files Browse the repository at this point in the history
  • Loading branch information
phprus committed Aug 2, 2021
1 parent bba0a9d commit 42fc7a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 42fc7a4

Please sign in to comment.