fix for GCC 9.2: -Wno-maybe-uninitialized

This commit is contained in:
Jonathan Marler 2020-11-23 10:04:00 -07:00 committed by Andrew Kelley
parent 70c8cabb34
commit a1fb10b766

View File

@ -603,6 +603,10 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
set(EXE_CFLAGS "${EXE_CFLAGS} -Werror=implicit-fallthrough") set(EXE_CFLAGS "${EXE_CFLAGS} -Werror=implicit-fallthrough")
endif() endif()
# GCC 9.2 and older are unable to detect valid variable initialization in some cases
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 9.2)
set(EXE_CFLAGS "${EXE_CFLAGS} -Wno-maybe-uninitialized")
endif()
endif() endif()
endif() endif()