From da6f021b523f72b51cc519334e73261d055d9e9c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 2 Apr 2020 20:24:04 +0200 Subject: CMake: Fix build with WARNINGS_ARE_ERRORS=ON and gcc 9.3.0 Add -Wno-error=format-overflow. This is similar to what is done in qt_common.prf, however we don't turn the warning off completely. For now at least. Change-Id: I93c20064759dea43309c3a17de4d733ede9ca2cb Reviewed-by: Alexandru Croitor --- cmake/QtInternalTargets.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake') diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index d1c383d697..29d89f1688 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -28,6 +28,8 @@ function(qt_internal_set_warnings_are_errors_flags target) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.0.0") # GCC 9 introduced these but we are not clean for it. list(APPEND flags -Wno-error=deprecated-copy -Wno-error=redundant-move -Wno-error=init-list-lifetime) + # GCC 9 introduced -Wformat-overflow in -Wall, but it is buggy: + list(APPEND flags -Wno-error=format-overflow) endif() # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 -- cgit v1.2.3