From df2aa081875775936f729ca2e730d3dcfc2d3de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Tue, 2 Nov 2021 13:59:37 +0100 Subject: [PATCH] CMake: Improve comment about how to disable warnings Change-Id: I4367f2b585b7fdfaba2a815be885157a1db990cd Reviewed-by: Alexey Edelev Reviewed-by: Alexandru Croitor --- cmake/QtCompilerFlags.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 "")