summaryrefslogtreecommitdiffstats
path: root/cmake/QtFlagHandlingHelpers.cmake
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2022-03-04 10:21:06 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2022-03-18 07:00:30 +0100
commit71edd2e4d86b4f52302699981868e3f466a4f97b (patch)
treea9760c0c29be3ee1a23fa54a5176e6693c3a3c98 /cmake/QtFlagHandlingHelpers.cmake
parent7ed5b52e80df7007a2e3197cff198988b95d9525 (diff)
Bump QT_DEPRECATED_WARNINGS_SINCE
When building Qt we should have warnings of any internal use of deprecated API, so set it to Qt7. Also added comments to clarify what the macros do. Change-Id: Ib47278fed9ab1ec4411ed9f69a9a9c0f811db02d Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'cmake/QtFlagHandlingHelpers.cmake')
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index 00c69b0983..f8bca02910 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -129,6 +129,9 @@ function(qt_internal_apply_intel_cet target visibility)
endfunction()
function(qt_internal_library_deprecation_level result)
+ # QT_DISABLE_DEPPRECATED_BEFORE controls which version we use as a cut-off
+ # compiling in to the library. E.g. if it is set to QT_VERSION then no
+ # code which was deprecated before QT_VERSION will be compiled in.
if(WIN32)
# On Windows, due to the way DLLs work, we need to export all functions,
# including the inlines
@@ -137,7 +140,10 @@ function(qt_internal_library_deprecation_level result)
# On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
list(APPEND deprecations "QT_DISABLE_DEPRECATED_BEFORE=0x050000")
endif()
- list(APPEND deprecations "QT_DEPRECATED_WARNINGS_SINCE=0x060000")
+ # QT_DEPRECATED_WARNINGS_SINCE controls the upper-bound of deprecation
+ # warnings that are emitted. E.g. if it is set to 7.0 then all deprecations
+ # during the 6.* lifetime will be warned about in Qt builds.
+ list(APPEND deprecations "QT_DEPRECATED_WARNINGS_SINCE=0x070000")
set("${result}" "${deprecations}" PARENT_SCOPE)
endfunction()