CMake: Fix deprecation level regex
It should allow a through f for hex digits as well. Pick-to: 6.8 Fixes: QTBUG-130119 Change-Id: I79a13d4e5dfee5c4c229eb64c26a5530928d0495 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
30d90b4cca
commit
ff5bc9266a
@ -1557,6 +1557,8 @@ function(qt_internal_library_deprecation_level)
|
||||
# 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.
|
||||
set(digit "[0-9a-fA-F]")
|
||||
string(REPEAT "${digit}" 6 six_digits)
|
||||
if(NOT DEFINED QT_DISABLE_DEPRECATED_UP_TO)
|
||||
if(WIN32)
|
||||
# On Windows, due to the way DLLs work, we need to export all functions,
|
||||
@ -1566,7 +1568,7 @@ function(qt_internal_library_deprecation_level)
|
||||
# On other platforms, Qt's own compilation does need to compile the Qt 5.0 API
|
||||
set(QT_DISABLE_DEPRECATED_UP_TO "0x050000")
|
||||
endif()
|
||||
elseif(NOT QT_DISABLE_DEPRECATED_UP_TO MATCHES "^0x[0-9][0-9][0-9][0-9][0-9][0-9]$")
|
||||
elseif(NOT QT_DISABLE_DEPRECATED_UP_TO MATCHES "^0x${six_digits}$")
|
||||
message(FATAL_ERROR "Invalid format of the QT_DISABLE_DEPRECATED_UP_TO macro:"
|
||||
" ${QT_DISABLE_DEPRECATED_UP_TO}. The expected format is the hexadecimal number,"
|
||||
" e.g. 0x060102")
|
||||
|
Loading…
x
Reference in New Issue
Block a user