diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-16 13:02:27 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-08-19 23:52:05 +0200 |
commit | 2625a3a01ae56cfbfb097e40334d159ee262a6f6 (patch) | |
tree | 885fe1d240f6a9a9a6665a1e42570c6f6fbbe76a /cmake/QtFlagHandlingHelpers.cmake | |
parent | 18f0484a0ed9785efe5acb4671695772e5715075 (diff) |
Add -disable-deprecated-up-to parameter to configure script
And also teach CMake to treat it properly instead of hardcoding the
version number.
[ChangeLog][Build System] The configure script now accepts a new
parameter -disable-deprecated-up-to which is used to remove all
deprecated code from API and ABI while building the libraries.
The version number must be specified in a hex format.
For example, it can be used like this:
/path/to/qt/configure -disable-deprecated-up-to 0x060500
to remove all code deprecated in Qt 6.5.0 or earlier releases.
Task-number: QTBUG-101510
Change-Id: I557cf83e29b867fa1052bb097985e144b5eaf34d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtFlagHandlingHelpers.cmake')
-rw-r--r-- | cmake/QtFlagHandlingHelpers.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index fe9e0e072a..708496fb85 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -183,13 +183,17 @@ function(qt_internal_library_deprecation_level result) # QT_DISABLE_DEPRECATED_UP_TO 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 - list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x040800") + if (NOT DEFINED QT_DISABLE_DEPRECATED_UP_TO) + if(WIN32) + # On Windows, due to the way DLLs work, we need to export all functions, + # including the inlines + list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x040800") + else() + # On other platforms, Qt's own compilation does need to compile the Qt 5.0 API + list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x050000") + endif() else() - # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API - list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=0x050000") + list(APPEND deprecations "QT_DISABLE_DEPRECATED_UP_TO=${QT_DISABLE_DEPRECATED_UP_TO}") endif() # QT_WARN_DEPRECATED_UP_TO controls the upper-bound of deprecation # warnings that are emitted. E.g. if it is set to 0x060500 then all use of |