diff --git a/cmake/QtCompilerFlags.cmake b/cmake/QtCompilerFlags.cmake index a376ac00975..70beaedd012 100644 --- a/cmake/QtCompilerFlags.cmake +++ b/cmake/QtCompilerFlags.cmake @@ -1,6 +1,8 @@ -# Set warnings. All compilers except MSVC support -Wall -Wextra -# Allow opting out by setting a QT_COMPILE_WARNINGS_OFF property on targets. This would be the -# equivalent of qmake's CONFIG += warn_off. +# Enable compiler warnings by default. All compilers except MSVC support -Wall -Wextra +# +# You can disable the warnings for specific targets (for instance containing 3rd party code) +# by calling qt_disable_warnings(target). This will set the QT_COMPILE_OPTIONS_DISABLE_WARNINGS +# property checked below, and is equivalent to qmake's CONFIG += warn_off. set(_qt_compiler_warning_flags_on "") set(_qt_compiler_warning_flags_off "")