diff options
-rw-r--r-- | cmake/QtInternalTargets.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 7e934f6ac8..5981166773 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -32,6 +32,17 @@ function(qt_internal_set_warnings_are_errors_flags target) list(APPEND flags -Wno-error=format-overflow) endif() + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0") + # We do mixed enum arithmetic all over the place: + list(APPEND flags -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-enum-float-conversion) + endif() + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.2.0") + # GCC 11.1 has a regression in the integrated preprocessor, so disable it as a workaround (QTBUG-93360) + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796 + list(APPEND flags -no-integrated-cpp) + endif() + # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 if (ANDROID) list(APPEND flags -Wno-error=literal-suffix) |