diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-11-02 13:59:37 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-11-02 19:16:10 +0100 |
commit | df2aa081875775936f729ca2e730d3dcfc2d3de8 (patch) | |
tree | efab532999018b37cc1c831f3d3fcec8f1a2d156 /cmake/QtCompilerFlags.cmake | |
parent | 67dadc7e3428169778102a6dfab47e2e48c8d17e (diff) |
CMake: Improve comment about how to disable warnings
Change-Id: I4367f2b585b7fdfaba2a815be885157a1db990cd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtCompilerFlags.cmake')
-rw-r--r-- | cmake/QtCompilerFlags.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/QtCompilerFlags.cmake b/cmake/QtCompilerFlags.cmake index a376ac0097..70beaedd01 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 "") |