summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexander Volkov <avolkov@astralinux.ru>2019-08-29 23:32:04 +0300
committerAlexander Volkov <avolkov@astralinux.ru>2020-07-24 13:10:51 +0300
commit865582bd7fd9b7e22c46db01245fc700e5e2bbd7 (patch)
tree14b2941a9b5a8795ce63ef3e6d7b5aad2ab01eb6 /cmake
parent6533d1a47309956e8acda90eb4c41d245e817c93 (diff)
Add -Wsuggest-override for gcc >= 9.2
gcc doesn't report warnings for final methods since version 9.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010 Change-Id: I7152351aac0e3bad86d777e119f25137ef97ec6f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index 00a4ad6f75..db3257d2f2 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -176,6 +176,10 @@ if (MSVC)
)
endif()
+if (GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.2")
+ target_compile_options(PlatformCommonInternal INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
+endif()
+
function(qt_get_implicit_sse2_genex_condition out_var)
set(is_shared_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>")
set(is_static_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>")