general: fixes for gcc 13

This commit is contained in:
Liam 2023-04-02 19:02:04 -04:00
parent 0730dc6c44
commit a9623d5f55
6 changed files with 14 additions and 28 deletions

View file

@ -126,6 +126,17 @@ else()
add_compile_options("-stdlib=libc++")
endif()
# GCC bugs
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# These diagnostics would be great if they worked, but are just completely broken
# and produce bogus errors on external libraries like fmt.
add_compile_options(
-Wno-array-bounds
-Wno-stringop-overread
-Wno-stringop-overflow
)
endif()
# Set file offset size to 64 bits.
#
# On modern Unixes, this is typically already the case. The lone exception is