From 295b3ca5bde92cb6f371a04060fab9dd09f17e82 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 28 Apr 2025 17:08:16 +0200 Subject: [PATCH] Deprecate FEATURE_regularexpression There have been places where regex support has been implied and bootstrap always builds with regex enabled. Therefore, disabling `FEATURE_regularexpression` currently produces an error. Until a need for building without regex emerges, we are enforcing it as a requirement. Users must either use system or bundled pcre2. Fixes: QTBUG-136346 Change-Id: I9e92bb4e7f0dfb84884a2a23f45b20d18ddc8985 Reviewed-by: Alexandru Croitor --- src/corelib/configure.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index 8902194ed5d..9dc07f838c2 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -919,11 +919,12 @@ qt_feature("vxpipedrv" PRIVATE AUTODETECT OFF CONDITION VXWORKS ) -qt_feature("regularexpression" PUBLIC +qt_feature_deprecated("regularexpression" PUBLIC + REMOVE_BY "7.0" SECTION "Kernel" LABEL "QRegularExpression" PURPOSE "Provides an API to Perl-compatible regular expressions." - CONDITION QT_FEATURE_system_pcre2 OR QT_FEATURE_pcre2 + VALUE ON ) qt_feature_definition("regularexpression" "QT_NO_REGULAREXPRESSION" NEGATE VALUE "1") qt_feature("backtrace" PRIVATE @@ -1275,3 +1276,8 @@ qt_configure_add_report_entry( MESSAGE "Basic cpp/winrt support missing. Some features might not be available." CONDITION WIN32 AND NOT QT_FEATURE_cpp_winrt ) +qt_configure_add_report_entry( + TYPE ERROR + MESSAGE "Qt requires pcre2 or system-pcre2 feature" + CONDITION NOT QT_FEATURE_pcre2 AND NOT QT_FEATURE_system_pcre2 +)