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,7 +584,11 @@ 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")
list(APPEND WARNING_FLAGS -Wno-cast-function-type) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
# nothing
else()
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)