From f44072ca437bc943ac45e4bee69720499a0f8843 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 1 Aug 2023 10:50:29 -0700 Subject: [PATCH] CMake: remove test for cxx11_random Everyone has it, without exception. QRandomGenerator uses the Mersenne twister without checking, so you can't have Qt without this. This test was here only to produce an error at CMake time instead of at build time, but that test costs 650 ms for everyone running CMake without cached results. Change-Id: Ifbf974a4d10745b099b1fffd177753b6d4fc89d4 Reviewed-by: Fabian Kosmale --- src/corelib/configure.cmake | 20 -------------------- src/corelib/global/qconfig-bootstrapped.h | 1 - 2 files changed, 21 deletions(-) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index cbb67bd5fc2..6e8de890994 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -158,21 +158,6 @@ std::future f = std::async([]() { return 42; }); } ") -# cxx11_random -qt_config_compile_test(cxx11_random - LABEL "C++11 " - CODE -"#include - -int main(void) -{ - /* BEGIN TEST: */ -std::mt19937 mt(0); - /* END TEST: */ - return 0; -} -") - # cxx17_filesystem qt_config_compile_test(cxx17_filesystem LABEL "C++17 " @@ -1056,11 +1041,6 @@ qt_configure_add_report_entry( MESSAGE "journald, syslog or slog2 integration is enabled. If your users intend to develop applications against this build, ensure that the IDEs they use either set QT_FORCE_STDERR_LOGGING to 1 or are able to read the logged output from journald, syslog or slog2." CONDITION QT_FEATURE_journald OR QT_FEATURE_syslog OR ( QNX AND QT_FEATURE_slog2 ) ) -qt_configure_add_report_entry( - TYPE ERROR - MESSAGE "C++11 is required and is missing or failed to compile." - CONDITION NOT TEST_cxx11_random -) qt_configure_add_report_entry( TYPE ERROR MESSAGE "Your C library does not provide sscanf_l or snprintf_l. You need to use libdouble-conversion for double/string conversion." diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h index ace4c51d33f..4b0903d19e6 100644 --- a/src/corelib/global/qconfig-bootstrapped.h +++ b/src/corelib/global/qconfig-bootstrapped.h @@ -43,7 +43,6 @@ #define QT_FEATURE_cborstreamreader -1 #define QT_FEATURE_cborstreamwriter 1 #define QT_CRYPTOGRAPHICHASH_ONLY_SHA1 -#define QT_FEATURE_cxx11_random (__has_include() ? 1 : -1) #define QT_FEATURE_cxx17_filesystem -1 #define QT_NO_DATASTREAM #define QT_FEATURE_datestring 1