make/gcc: disable [-Werror=maybe-uninitialized] for GCC >= 11.2.0

master
Robert Falkenberg 2 years ago
parent b15eefb05f
commit 85b4d27f9f

@ -540,8 +540,8 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif() endif()
# GCC >= 12.1.0: Disable analysis on "maybe-uninitialized" variables because of the high false-positive rate # GCC >= 11.2.0: Disable analysis on "maybe-uninitialized" variables because of the high false-positive rate
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) if(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-maybe-uninitialized") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-maybe-uninitialized")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
endif() endif()

Loading…
Cancel
Save