fix build on GCC < 8

This commit is contained in:
tildearrow 2022-06-20 04:55:28 -05:00
parent d66ff353ba
commit 337e2183cd

View file

@ -584,8 +584,12 @@ endif()
if (NOT MSVC) if (NOT MSVC)
set(WARNING_FLAGS -Wall -Wextra -Wno-unused-parameter) set(WARNING_FLAGS -Wall -Wextra -Wno-unused-parameter)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
# nothing
else()
list(APPEND WARNING_FLAGS -Wno-cast-function-type) list(APPEND WARNING_FLAGS -Wno-cast-function-type)
endif() endif()
endif()
if (WARNINGS_ARE_ERRORS) if (WARNINGS_ARE_ERRORS)
list(APPEND WARNING_FLAGS -Werror) list(APPEND WARNING_FLAGS -Werror)
endif() endif()