diff --git a/CMakeLists.txt b/CMakeLists.txt index c6f603c7981..187fccd493c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,9 @@ if (Qt5_VERSION VERSION_LESS 6.0.0) if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910) add_compile_options(/permissive- /Zc:__cplusplus) endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL GNU) + add_compile_options(-Wno-missing-field-initializers) +endif() else() # Common intermediate directory for QML modules which are defined via qt_add_qml_module() set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml_modules") diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 85b334daf0d..ee84b46aa3e 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -50,7 +50,7 @@ Product { flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand"); } if (!qbs.toolchain.contains("clang")) { - flags.push("-Wno-noexcept-type"); + flags.push("-Wno-missing-field-initializers", "-Wno-noexcept-type"); if (Utilities.versionCompare(cpp.compilerVersion, "9") >= 0) flags.push("-Wno-deprecated-copy", "-Wno-init-list-lifetime"); }