summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
blob: e2024bf03a9113b5a273edffa81081288e1d905d (plain)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
# Copyright (C) 2022 The Qt Company Ltd.# SPDX-License-Identifier: BSD-3-Clause#### Inputs# input doubleconversionset(INPUT_doubleconversion "undefined"CACHE STRING"")set_property(CACHE INPUT_doubleconversion PROPERTY STRINGS undefined no qt system)# input libb2set(INPUT_libb2"undefined"CACHE STRING"")set_property(CACHE INPUT_libb2PROPERTY STRINGS undefined no qt system)#### Librariesif((UNIX AND NOT QNX)OR QT_FIND_ALL_PACKAGES_ALWAYS)# QNX's libbacktrace has an API wholly different from all the other Unix# offeringsqt_find_package(WrapBacktrace PROVIDED_TARGETS WrapBacktrace::WrapBacktrace MODULE_NAME core QMAKE_LIB backtrace)endif()qt_find_package(WrapSystemDoubleConversion PROVIDED_TARGETS WrapSystemDoubleConversion::WrapSystemDoubleConversion MODULE_NAME core QMAKE_LIB doubleconversion)qt_find_package(GLIB2 PROVIDED_TARGETS GLIB2::GLIB2 MODULE_NAME core QMAKE_LIB glib)qt_find_package_extend_sbom(TARGETS GLIB2::GLIB2LICENSE_EXPRESSION"LGPL-2.1-or-later")qt_find_package(ICU 50.1 COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data MODULE_NAME core QMAKE_LIB icu)if(QT_FEATURE_dlopen)qt_add_qmake_lib_dependency(icu libdl)endif()qt_find_package(JeMalloc PROVIDED_TARGETS PkgConfig::JeMalloc MODULE_NAME core QMAKE_LIB jemalloc)qt_find_package(Libsystemd PROVIDED_TARGETS PkgConfig::Libsystemd MODULE_NAME core QMAKE_LIB journald)qt_find_package(WrapAtomic PROVIDED_TARGETS WrapAtomic::WrapAtomic MODULE_NAME core QMAKE_LIB libatomic)qt_find_package(Libb2 PROVIDED_TARGETS Libb2::Libb2 MODULE_NAME core QMAKE_LIB libb2)qt_find_package_extend_sbom(TARGETS Libb2::Libb2 LICENSE_EXPRESSION"CC0-1.0")qt_find_package(WrapRt PROVIDED_TARGETS WrapRt::WrapRt MODULE_NAME core QMAKE_LIB librt)qt_find_package(WrapSystemPCRE2 10.20 PROVIDED_TARGETS WrapSystemPCRE2::WrapSystemPCRE2 MODULE_NAME core QMAKE_LIB pcre2)set_package_properties(WrapPCRE2 PROPERTIES TYPE REQUIRED)if((QNX)OR QT_FIND_ALL_PACKAGES_ALWAYS)qt_find_package(PPS PROVIDED_TARGETS PPS::PPS MODULE_NAME core QMAKE_LIB pps)endif()qt_find_package(Slog2 PROVIDED_TARGETS Slog2::Slog2 MODULE_NAME core QMAKE_LIB slog2)#### Tests# atomicfptrqt_config_compile_test(atomicfptr LABEL"working std::atomic for function pointers"CODE"#include <atomic>typedef void (*fptr)(int);typedef std::atomic<fptr> atomicfptr;void testfunction(int) { }void test(volatile atomicfptr &a){ fptr v = a.load(std::memory_order_acquire); while (!a.compare_exchange_strong(v, &testfunction, std::memory_order_acq_rel, std::memory_order_acquire)) { v = a.exchange(&testfunction); } a.store(&testfunction, std::memory_order_release);}int main(void){ /* BEGIN TEST: */atomicfptr fptr(testfunction);test(fptr); /* END TEST: */ return 0;}")# clock-monotonicqt_config_compile_test(clock_monotonic LABEL"POSIX monotonic clock"LIBRARIES WrapRt::WrapRt CODE"#include <unistd.h>#include <time.h>int main(void){ /* BEGIN TEST: */#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)timespec ts;clock_gettime(CLOCK_MONOTONIC, &ts);#else# error Feature _POSIX_MONOTONIC_CLOCK not available#endif /* END TEST: */ return 0;}")# cloexecqt_config_compile_test(cloexec LABEL"O_CLOEXEC"CODE"#define _GNU_SOURCE 1#include <sys/types.h>#include <sys/socket.h>#include <fcntl.h>#include <unistd.h>int main(void){ /* BEGIN TEST: */int pipes[2];(void) pipe2(pipes, O_CLOEXEC | O_NONBLOCK);(void) fcntl(0, F_DUPFD_CLOEXEC, 0);(void) dup3(0, 3, O_CLOEXEC);#if defined(__NetBSD__)(void) paccept(0, 0, 0, NULL, SOCK_CLOEXEC | SOCK_NONBLOCK);#else(void) accept4(0, 0, 0, SOCK_CLOEXEC | SOCK_NONBLOCK);#endif /* END TEST: */ return 0;}")# copy_file_rangeqt_config_compile_test(copy_file_range LABEL"copy_file_range()"CODE"#include <unistd.h>int main(){ off_t off_in = 0, off_out = 1024; return copy_file_range(0, &off_in, 1, &off_out, 2147483647, 0) != 0;}")# Check if __cxa_thread_atexit{,_impl} are present in the C library (hence why# PROJECT_PATH instead of CODE for C++). Either one suffices to disable# FEATURE_broken_threadlocal_dtors. See details in qthread_unix.cpp.qt_config_compile_test(cxa_thread_atexit # Seen on Darwin and FreeBSDLABEL"__cxa_thread_atexit in C library"PROJECT_PATH"${CMAKE_CURRENT_SOURCE_DIR}/../config.tests/cxa_thread_atexit"CMAKE_FLAGS-DTEST_FUNC=__cxa_thread_atexit )qt_config_compile_test(cxa_thread_atexit_impl # Seen on Bionic, FreeBSD, glibcLABEL"__cxa_thread_atexit_impl in C library"PROJECT_PATH"${CMAKE_CURRENT_SOURCE_DIR}/../config.tests/cxa_thread_atexit"CMAKE_FLAGS-DTEST_FUNC=__cxa_thread_atexit_impl )# cxx17_filesystemqt_config_compile_test(cxx17_filesystem LABEL"C++17 <filesystem>"CODE"#include <filesystem>int main(void){ /* BEGIN TEST: */std::filesystem::copy( std::filesystem::path(\"./file\"), std::filesystem::path(\"./other\")); /* END TEST: */ return 0;}")# dladdrqt_config_compile_test(dladdr LABEL"dladdr"LIBRARIES dl CODE"#define _GNU_SOURCE 1#include <dlfcn.h>int i = 0;int main(void){ Dl_info info; dladdr(&i, &info); return 0;}")# futimensqt_config_compile_test(futimens LABEL"futimens()"CODE"#include <sys/stat.h>int main(void){ /* BEGIN TEST: */futimens(-1, 0); /* END TEST: */ return 0;}")# getauxvalqt_config_compile_test(getauxval LABEL"getauxval()"CODE"#include <sys/auxv.h>int main(void){ /* BEGIN TEST: */(void) getauxval(AT_NULL); /* END TEST: */ return 0;}")# getentropyqt_config_compile_test(getentropy LABEL"getentropy()"CODE"#include <unistd.h>#if __has_include(<sys/random.h>)# include <sys/random.h>#endifint main(void){ /* BEGIN TEST: */char buf[32];(void) getentropy(buf, sizeof(buf)); /* END TEST: */ return 0;}")# inotifyqt_config_compile_test(inotify LABEL"inotify"CODE"#include <sys/inotify.h>int main(void){ /* BEGIN TEST: */inotify_init();inotify_add_watch(0,\"foobar\", IN_ACCESS);inotify_rm_watch(0, 1); /* END TEST: */ return 0;}")# fsnotifyqt_config_compile_test(fsnotify LABEL"libfsnotify"LIBRARIES fsnotify CODE"#include <sys/inotify.h>int main(void){ /* BEGIN TEST: */ int fd = inotify_init(); if (fd >= 0) { inotify_add_watch(fd,\"foobar\", IN_ACCESS); inotify_rm_watch(fd, 1); } /* END TEST: */ return 0;}")qt_config_compile_test(sysv_shm LABEL"System V/XSI shared memory"CODE"#include <sys/types.h>#include <sys/ipc.h>#include <sys/shm.h>#include <fcntl.h>int main(void){ key_t unix_key = ftok(\"test\", 'Q'); shmget(unix_key, 0, 0666 | IPC_CREAT | IPC_EXCL); shmctl(0, 0, (struct shmid_ds *)(0)); return 0;}")qt_config_compile_test(sysv_sem LABEL"System V/XSI semaphores"CODE"#include <sys/types.h>#include <sys/ipc.h>#include <sys/sem.h>#include <fcntl.h>int main(void){ key_t unix_key = ftok(\"test\", 'Q'); semctl(semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL), 0, IPC_RMID, 0); return 0;}")if(LINUX)set(ipc_posix_TEST_LIBRARIES pthread WrapRt::WrapRt)endif()qt_config_compile_test(posix_shm LABEL"POSIX shared memory"LIBRARIES"${ipc_posix_TEST_LIBRARIES}"CODE"#include <sys/types.h>#include <sys/mman.h>#include <fcntl.h>int main(void){ shm_open(\"test\", O_RDWR | O_CREAT | O_EXCL, 0666); shm_unlink(\"test\"); return 0;}")qt_config_compile_test(posix_sem LABEL"POSIX semaphores"LIBRARIES"${ipc_posix_TEST_LIBRARIES}"CODE"#include <sys/types.h>#include <semaphore.h>#include <fcntl.h>int main(void){ sem_close(sem_open(\"test\", O_CREAT | O_EXCL, 0666, 0)); return 0;}")# linkatqt_config_compile_test(linkat LABEL"linkat()"CODE"#define _ATFILE_SOURCE 1#include <fcntl.h>#include <unistd.h>int main(void){ /* BEGIN TEST: */linkat(AT_FDCWD,\"foo\", AT_FDCWD,\"bar\", AT_SYMLINK_FOLLOW); /* END TEST: */ return 0;}")# memmemqt_config_compile_test(memmem LABEL"memmem()"CODE#define _APPLE_SAUCE 1 /* Apple doesn't require anything */"#define _BSD_SOURCE 1 /* For FreeBSD */#define _GNU_SOURCE 1 /* For glibc, Bionic */#include <string.h>int main(void){ const void *r = memmem(\"abc\", 3,\"bc\", 2); (void)r; return 0;}")# memrchrqt_config_compile_test(memrchr LABEL"memrchr()"CODE"#define _BSD_SOURCE 1 /* For FreeBSD */#define _GNU_SOURCE 1 /* For glibc, Bionic */#include <string.h>int main(void){ const void *r = memrchr(\"abc\", 'a', 3); (void)r; return 0;}")# ppollqt_config_compile_test(ppoll LABEL"ppoll()"CODE"#include <signal.h>#include <poll.h>int main(void){ /* BEGIN TEST: */struct pollfd pfd;struct timespec ts;sigset_t sig;ppoll(&pfd, 1, &ts, &sig); /* END TEST: */ return 0;}")# polltsqt_config_compile_test(pollts LABEL"pollts()"CODE"#include <poll.h>#include <signal.h>#include <time.h>int main(void){ /* BEGIN TEST: */struct pollfd pfd;struct timespec ts;sigset_t sig;pollts(&pfd, 1, &ts, &sig); /* END TEST: */ return 0;}")# pollqt_config_compile_test(poll LABEL"poll()"CODE"#include <poll.h>int main(void){ /* BEGIN TEST: */struct pollfd pfd;poll(&pfd, 1, 0); /* END TEST: */ return 0;}")# pthread_clockjoin# As of GCC 15, TSAN does not support pthread_clockjoin_np,# so disable it in a TSAN build. Unfortunately there doesn't# seem to be a version check possible, just check the# TSAN_INTERCEPT macros into tsan_interceptors_posix.cpp.qt_config_compile_test(pthread_clockjoin LABEL"pthread_clockjoin()"LIBRARIES Threads::Threads CODE"#include <pthread.h>#if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)#error#endifint main(){ void *ret; const struct timespec ts = {}; return pthread_clockjoin_np(pthread_self(), &ret, CLOCK_MONOTONIC, &ts);}")# pthread_condattr_setclockqt_config_compile_test(pthread_condattr_setclock LABEL"pthread_condattr_setclock()"LIBRARIES Threads::Threads CODE"#include <pthread.h>#include <time.h>int main(){ pthread_condattr_t condattr; return pthread_condattr_setclock(&condattr, CLOCK_REALTIME);}")# pthread_timedjoinqt_config_compile_test(pthread_timedjoin LABEL"pthread_timedjoin()"LIBRARIES Threads::Threads CODE"#include <pthread.h>#if __has_include(<pthread_np.h>)# include <pthread_np.h>#endifint main(){ void *ret; const struct timespec ts = {}; return pthread_timedjoin_np(pthread_self(), &ret, &ts);}")# renameat2qt_config_compile_test(renameat2 LABEL"renameat2()"CODE"#define _ATFILE_SOURCE 1#include <fcntl.h>#include <stdio.h>int main(int, char **argv){ /* BEGIN TEST: */renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEOUT); /* END TEST: */ return 0;}")qt_config_compile_test(winsdkicu LABEL"Windows SDK: ICU"LIBRARIES icu CODE"#include <icu.h>int main(void){ /* BEGIN TEST: */ /* END TEST: */ return 0;}")# cpp_winrtqt_config_compile_test(cpp_winrt LABEL"cpp/winrt"LIBRARIES runtimeobject CODE"// Including winrt/base.h causes an error in some configurations (Windows 10 SDK + c++20)# include <winrt/base.h>int main(void){ return 0;}")# std::format supportqt_config_compile_test(cxx20_format LABEL"C++20 std::format support"CODE"#include <format>#include <string>#if !defined(__cpp_lib_format) || (__cpp_lib_format < 202106L)#error#endifint main(void){ /* BEGIN TEST: */const auto s = std::format(\"{}\", 1); /* END TEST: */ return 0;}"CXX_STANDARD 20)# <stacktrace>qt_config_compile_test(cxx23_stacktrace LABEL"C++23 <stacktrace> support"CODE"#include <stacktrace>#if !defined(__cpp_lib_stacktrace)#error#endifint main(void){ /* BEGIN TEST: */const auto backtrace = std::stacktrace::current(); /* END TEST: */}"CXX_STANDARD 23)# <future>qt_config_compile_test(cxx_std_async_noncopyable LABEL"std::async() NonCopyable"LIBRARIES Threads::Threads CODE"// Calling std::async with lambda which takes non-copyable argument causes compilation error on// some platforms (VxWorks 24.03 and older with C++17-compatibility for example)#include <future>class NonCopyable {public: NonCopyable(const NonCopyable&) = delete; NonCopyable(NonCopyable&&) = default; NonCopyable(int value) :value (value) {} int value;};int main(int argc, char** argv) { return std::async( std::launch::deferred, [](NonCopyable value) { return value.value; }, NonCopyable(argc - 1)).get();}")# <chrono>qt_config_compile_test(chrono_tzdb LABEL"Support for timezones in C++20 <chrono>"CODE"#include <chrono>#if __cpp_lib_chrono < 201907L#error#endifint main(void){ /* BEGIN TEST: */ const std::chrono::tzdb &tzdb = std::chrono::get_tzdb(); auto when = std::chrono::system_clock::now(); const std::chrono::time_zone *currentZone = tzdb.current_zone(); auto zoneInfo = currentZone->get_info(when); /* END TEST: */ return 0;}")#### Featuresqt_feature("clock-gettime"PRIVATELABEL"clock_gettime()"CONDITION UNIX AND WrapRt_FOUND )qt_feature("clock-monotonic"PUBLICLABEL"POSIX monotonic clock"CONDITION QT_FEATURE_clock_gettime AND TEST_clock_monotonic )qt_feature_definition("clock-monotonic""QT_NO_CLOCK_MONOTONIC"NEGATE VALUE"1")qt_feature("copy_file_range"PRIVATELABEL"copy_file_range()"CONDITION QT_FEATURE_process AND TEST_copy_file_range AUTODETECT UNIX AND NOT DARWIN)qt_feature("doubleconversion"PRIVATELABEL"DoubleConversion")qt_feature_definition("doubleconversion""QT_NO_DOUBLECONVERSION"NEGATE VALUE"1")qt_feature("system-doubleconversion"PRIVATE SYSTEM_LIBRARYLABEL" Using system DoubleConversion"CONDITION QT_FEATURE_doubleconversion AND WrapSystemDoubleConversion_FOUND ENABLE INPUT_doubleconversion STREQUAL'system'DISABLE INPUT_doubleconversion STREQUAL'qt')qt_feature("cxx11_future"PUBLICLABEL"C++11 <future>"CONDITION TEST_cxx_std_async_noncopyable )qt_feature("cxx17_filesystem"PUBLICLABEL"C++17 <filesystem>"CONDITION TEST_cxx17_filesystem )qt_feature("broken-threadlocal-dtors"PRIVATELABEL"Broken execution of thread_local destructors at exit() time"# Windows is broken in different ways from UnixCONDITION WIN32 OR NOT(TEST_cxa_thread_atexit OR TEST_cxa_thread_atexit_impl))qt_feature("dladdr"PRIVATELABEL"dladdr"CONDITION QT_FEATURE_dlopen AND TEST_dladdr )qt_feature("futimens"PRIVATELABEL"futimens()"CONDITION NOT WIN32 AND TEST_futimens )qt_feature("getauxval"PRIVATELABEL"getauxval()"CONDITION LINUX AND TEST_getauxval )qt_feature("getentropy"PRIVATELABEL"getentropy()"CONDITION UNIX AND TEST_getentropy )qt_feature("glib"PUBLIC PRIVATELABEL"GLib"AUTODETECT NOT WIN32CONDITION GLIB2_FOUND)qt_feature_definition("glib""QT_NO_GLIB"NEGATE VALUE"1")qt_feature("icu"PRIVATELABEL"ICU"AUTODETECT NOT WIN32CONDITION ICU_FOUND)qt_feature("winsdkicu"PRIVATELABEL"ICU (Windows SDK)"AUTODETECT WIN32CONDITION TEST_winsdkicu DISABLE QT_FEATURE_icu )qt_feature("inotify"PUBLIC PRIVATELABEL"inotify"CONDITION TEST_inotify OR TEST_fsnotify )qt_feature("fsnotify"LABEL"fsnotify"CONDITION TEST_fsnotify )qt_feature_definition("inotify""QT_NO_INOTIFY"NEGATE VALUE"1")qt_feature("ipc_posix"LABEL"Defaulting legacy IPC to POSIX"CONDITION TEST_posix_shm AND TEST_posix_sem AND(FEATURE_ipc_posix OR(APPLE AND QT_FEATURE_appstore_compliant)OR NOT TEST_sysv_shm OR NOT TEST_sysv_sem ))qt_feature_definition("ipc_posix""QT_POSIX_IPC")qt_feature("jemalloc"PUBLIC PRIVATELABEL"JeMalloc"AUTODETECT OFFCONDITION JeMalloc_FOUND )qt_feature("journald"PRIVATELABEL"journald"AUTODETECT OFFCONDITION Libsystemd_FOUND )# Used by QCryptographicHash for the BLAKE2 hashing algorithmsqt_feature("system-libb2"PRIVATE SYSTEM_LIBRARYLABEL"Using system libb2"CONDITION Libb2_FOUND ENABLE INPUT_libb2STREQUAL'system'DISABLE INPUT_libb2STREQUAL'no'OR INPUT_libb2STREQUAL'qt')# Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rulesqt_feature("linkat"PRIVATELABEL"linkat()"AUTODETECT(LINUX AND NOT ANDROID)OR HURDCONDITION TEST_linkat )qt_feature("std-atomic64"PUBLICLABEL"64 bit atomic operations"CONDITION WrapAtomic_FOUND )qt_feature("memmem"PRIVATELABEL"C library function memmem()"CONDITION TEST_memmem )qt_feature("memrchr"PRIVATELABEL"C library function memrchr()"CONDITION TEST_memrchr )qt_feature("mimetype"PUBLICSECTION"Utilities"LABEL"Mimetype handling"PURPOSE"Provides MIME type handling.")qt_feature_definition("mimetype""QT_NO_MIMETYPE"NEGATE VALUE"1")qt_feature("mimetype-database"PRIVATELABEL"Built-in copy of the MIME database"CONDITION QT_FEATURE_mimetype )qt_feature("pcre2"LABEL"PCRE2"ENABLE INPUT_pcre STREQUAL'qt'OR QT_FEATURE_system_pcre2DISABLE INPUT_pcre STREQUAL'no')qt_feature_config("pcre2"QMAKE_PRIVATE_CONFIG)qt_feature("system-pcre2"PRIVATE SYSTEM_LIBRARYLABEL" Using system PCRE2"CONDITION WrapSystemPCRE2_FOUND ENABLE INPUT_pcre STREQUAL'system'DISABLE INPUT_pcre STREQUAL'no'OR INPUT_pcre STREQUAL'qt')qt_feature("poll_ppoll"PRIVATELABEL"Native ppoll()"CONDITION NOT WASM AND TEST_ppoll EMIT_IF NOT WIN32)qt_feature("poll_pollts"PRIVATELABEL"Native pollts()"CONDITION NOT QT_FEATURE_poll_ppoll AND TEST_pollts EMIT_IF NOT WIN32)qt_feature("poll_poll"PRIVATELABEL"Native poll()"CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND TEST_poll EMIT_IF NOT WIN32)qt_feature("poll_select"PRIVATELABEL"Emulated poll()"CONDITION NOT QT_FEATURE_poll_ppoll AND NOT QT_FEATURE_poll_pollts AND NOT QT_FEATURE_poll_poll EMIT_IF NOT WIN32)qt_feature_definition("poll_select""QT_NO_NATIVE_POLL")qt_feature("posix_sem"PRIVATELABEL"POSIX semaphores"CONDITION TEST_posix_sem AND QT_FEATURE_systemsemaphore )qt_feature("posix_shm"PRIVATELABEL"POSIX shared memory"CONDITION TEST_posix_shm AND UNIX)qt_feature("pthread_clockjoin"PRIVATELABEL"pthread_clockjoin() function"AUTODETECT UNIXCONDITION UNIX AND QT_FEATURE_thread AND TEST_pthread_clockjoin )qt_feature("pthread_condattr_setclock"PRIVATELABEL"pthread_condattr_setclock() function"AUTODETECT UNIXCONDITION UNIX AND QT_FEATURE_thread AND TEST_pthread_condattr_setclock )qt_feature("pthread_timedjoin"PRIVATELABEL"pthread_timedjoin() function"AUTODETECT UNIXCONDITION UNIX AND QT_FEATURE_thread AND TEST_pthread_timedjoin )qt_feature("qqnx_pps"PRIVATELABEL"PPS"CONDITION PPS_FOUNDEMIT_IF QNX)qt_feature("renameat2"PRIVATELABEL"renameat2()"CONDITION(LINUX OR HURD)AND TEST_renameat2)qt_feature("slog2"PRIVATELABEL"slog2"CONDITION Slog2_FOUND )qt_feature("syslog"PRIVATELABEL"syslog"AUTODETECT OFF)qt_feature("sysv_sem"PRIVATELABEL"System V / XSI semaphores"CONDITION TEST_sysv_sem AND QT_FEATURE_systemsemaphore )qt_feature("sysv_shm"PRIVATELABEL"System V / XSI shared memory"CONDITION TEST_sysv_shm )qt_feature("threadsafe-cloexec"LABEL"Threadsafe pipe creation"CONDITION TEST_cloexec )qt_feature_definition("threadsafe-cloexec""QT_THREADSAFE_CLOEXEC"VALUE"1")qt_feature_config("threadsafe-cloexec"QMAKE_PUBLIC_QT_CONFIG)qt_feature("regularexpression"PUBLICSECTION"Kernel"LABEL"QRegularExpression"PURPOSE"Provides an API to Perl-compatible regular expressions."CONDITION QT_FEATURE_system_pcre2OR QT_FEATURE_pcre2)qt_feature_definition("regularexpression""QT_NO_REGULAREXPRESSION"NEGATE VALUE"1")qt_feature("backtrace"PRIVATELABEL"backtrace"CONDITION UNIX AND QT_FEATURE_regularexpression AND WrapBacktrace_FOUND )qt_feature("cxx20_format"PRIVATELABEL"C++20 std::format support"CONDITION TEST_cxx20_format # intentionally not checking QT_FEATURE_cxx20!AUTODETECT TRUE)qt_feature("cxx23_stacktrace"PRIVATELABEL"C++23 <stacktrace>"CONDITION TEST_cxx23_stacktrace AND QT_FEATURE_cxx2b )qt_feature("sharedmemory"PUBLICSECTION"Kernel"LABEL"QSharedMemory"PURPOSE"Provides access to a shared memory segment."CONDITION WIN32 OR TEST_sysv_shm OR TEST_posix_shm )qt_feature_definition("sharedmemory""QT_NO_SHAREDMEMORY"NEGATE VALUE"1")qt_feature("shortcut"PUBLICSECTION"Kernel"LABEL"QShortcut"PURPOSE"Provides keyboard accelerators and shortcuts.")qt_feature_definition("shortcut""QT_NO_SHORTCUT"NEGATE VALUE"1")qt_feature("systemsemaphore"PUBLICSECTION"Kernel"LABEL"QSystemSemaphore"PURPOSE"Provides a general counting system semaphore."CONDITION WIN32 OR TEST_sysv_sem OR TEST_posix_sem )qt_feature_definition("systemsemaphore""QT_NO_SYSTEMSEMAPHORE"NEGATE VALUE"1")qt_feature("xmlstream"PUBLICSECTION"Kernel"LABEL"XML Streaming APIs"PURPOSE"Provides a simple streaming API for XML.")qt_feature("cpp-winrt"PRIVATE PUBLICLABEL"cpp/winrt base"PURPOSE"basic cpp/winrt language projection support"AUTODETECT WIN32CONDITION WIN32 AND TEST_cpp_winrt )qt_feature("xmlstreamreader"PUBLICSECTION"Kernel"LABEL"QXmlStreamReader"PURPOSE"Provides a well-formed XML parser with a simple streaming API."CONDITION QT_FEATURE_xmlstream )qt_feature("xmlstreamwriter"PUBLICSECTION"Kernel"LABEL"QXmlStreamWriter"PURPOSE"Provides a XML writer with a simple streaming API."CONDITION QT_FEATURE_xmlstream )qt_feature("textdate"PUBLICSECTION"Data structures"LABEL"Text Date"PURPOSE"Supports month and day names in dates.")qt_feature_definition("textdate""QT_NO_TEXTDATE"NEGATE VALUE"1")qt_feature("datestring"PUBLICSECTION"Data structures"LABEL"QDate/QTime/QDateTime"PURPOSE"Provides conversion between dates and strings."CONDITION QT_FEATURE_textdate )qt_feature_definition("datestring""QT_NO_DATESTRING"NEGATE VALUE"1")qt_feature("process"PUBLICSECTION"File I/O"LABEL"QProcess"PURPOSE"Supports external process invocation."CONDITION QT_FEATURE_processenvironment AND(QT_FEATURE_thread OR NOT UNIX)AND NOT UIKITAND NOT INTEGRITYAND NOT VXWORKSAND NOT rtems AND NOT WASM)qt_feature_definition("process""QT_NO_PROCESS"NEGATE VALUE"1")qt_feature("processenvironment"PUBLICSECTION"File I/O"LABEL"QProcessEnvironment"PURPOSE"Provides a higher-level abstraction of environment variables."CONDITION NOT INTEGRITY AND NOT rtems )qt_feature("temporaryfile"PUBLICSECTION"File I/O"LABEL"QTemporaryFile"PURPOSE"Provides an I/O device that operates on temporary files.")qt_feature_definition("temporaryfile""QT_NO_TEMPORARYFILE"NEGATE VALUE"1")qt_feature("library"PUBLICSECTION"File I/O"LABEL"QLibrary"PURPOSE"Provides a wrapper for dynamically loaded libraries."CONDITION WIN32 OR HPUX OR QT_FEATURE_dlopen )qt_feature_definition("library""QT_NO_LIBRARY"NEGATE VALUE"1")qt_feature("settings"PUBLICSECTION"File I/O"LABEL"QSettings"PURPOSE"Provides persistent application settings.")qt_feature_definition("settings""QT_NO_SETTINGS"NEGATE VALUE"1")qt_feature("filesystemwatcher"PUBLICSECTION"File I/O"LABEL"QFileSystemWatcher"PURPOSE"Provides an interface for monitoring files and directories for modifications.")qt_feature_definition("filesystemwatcher""QT_NO_FILESYSTEMWATCHER"NEGATE VALUE"1")qt_feature("filesystemiterator"PUBLICSECTION"File I/O"LABEL"QFileSystemIterator"PURPOSE"Provides fast file system iteration.")qt_feature_definition("filesystemiterator""QT_NO_FILESYSTEMITERATOR"NEGATE VALUE"1")qt_feature("itemmodel"PUBLICSECTION"ItemViews"LABEL"Qt Item Model"PURPOSE"Provides the item model for item views")qt_feature_definition("itemmodel""QT_NO_ITEMMODEL"NEGATE VALUE"1")qt_feature("proxymodel"PUBLICSECTION"ItemViews"LABEL"QAbstractProxyModel"PURPOSE"Supports processing of data passed between another model and a view."CONDITION QT_FEATURE_itemmodel )qt_feature_definition("proxymodel""QT_NO_PROXYMODEL"NEGATE VALUE"1")qt_feature("sortfilterproxymodel"PUBLICSECTION"ItemViews"LABEL"QSortFilterProxyModel"PURPOSE"Supports sorting and filtering of data passed between another model and a view."CONDITION QT_FEATURE_proxymodel AND QT_FEATURE_regularexpression )qt_feature_definition("sortfilterproxymodel""QT_NO_SORTFILTERPROXYMODEL"NEGATE VALUE"1")qt_feature("identityproxymodel"PUBLICSECTION"ItemViews"LABEL"QIdentityProxyModel"PURPOSE"Supports proxying a source model unmodified."CONDITION QT_FEATURE_proxymodel )qt_feature_definition("identityproxymodel""QT_NO_IDENTITYPROXYMODEL"NEGATE VALUE"1")qt_feature("transposeproxymodel"PUBLICSECTION"ItemViews"LABEL"QTransposeProxyModel"PURPOSE"Provides a proxy to swap rows and columns of a model."CONDITION QT_FEATURE_proxymodel )qt_feature_definition("transposeproxymodel""QT_NO_TRANSPOSEPROXYMODEL"NEGATE VALUE"1")qt_feature("concatenatetablesproxymodel"PUBLICSECTION"ItemViews"LABEL"QConcatenateTablesProxyModel"PURPOSE"Supports concatenating source models."CONDITION QT_FEATURE_proxymodel )qt_feature_definition("concatenatetablesproxymodel""QT_NO_CONCATENATETABLESPROXYMODEL"NEGATE VALUE"1")qt_feature("stringlistmodel"PUBLICSECTION"ItemViews"LABEL"QStringListModel"PURPOSE"Provides a model that supplies strings to views."CONDITION QT_FEATURE_itemmodel )qt_feature_definition("stringlistmodel""QT_NO_STRINGLISTMODEL"NEGATE VALUE"1")qt_feature("translation"PUBLICSECTION"Internationalization"LABEL"Translation"PURPOSE"Supports translations using QObject::tr().")qt_feature_definition("translation""QT_NO_TRANSLATION"NEGATE VALUE"1")qt_feature("easingcurve"PUBLICSECTION"Utilities"LABEL"Easing curve"PURPOSE"Provides easing curve.")qt_feature("animation"PUBLICSECTION"Utilities"LABEL"Animation"PURPOSE"Provides a framework for animations."CONDITION QT_FEATURE_easingcurve )qt_feature_definition("animation""QT_NO_ANIMATION"NEGATE VALUE"1")qt_feature("gestures"PUBLICSECTION"Utilities"LABEL"Gesture"PURPOSE"Provides a framework for gestures.")qt_feature_definition("gestures""QT_NO_GESTURES"NEGATE VALUE"1")qt_feature("sha3-fast"PRIVATESECTION"Utilities"LABEL"Speed optimized SHA3"PURPOSE"Optimizes SHA3 for speed instead of size.")qt_feature("jalalicalendar"PUBLICSECTION"Utilities"LABEL"QJalaliCalendar"PURPOSE"Support the Jalali (Persian) calendar")qt_feature("hijricalendar"PRIVATESECTION"Utilities"LABEL"QHijriCalendar"PURPOSE"Generic basis for Islamic calendars, providing shared locale data")qt_feature("islamiccivilcalendar"PUBLICSECTION"Utilities"LABEL"QIslamicCivilCalendar"PURPOSE"Support the Islamic Civil calendar"CONDITION QT_FEATURE_hijricalendar )qt_feature("timezone"PUBLICSECTION"Utilities"LABEL"QTimeZone"PURPOSE"Provides support for time-zone handling."CONDITION NOT WASM AND NOT VXWORKS)qt_feature("timezone_locale"PRIVATESECTION"Utilities"LABEL"QTimeZoneLocale"PURPOSE"Provides support for localized time-zone display names."CONDITIONQT_FEATURE_timezone AND NOT APPLE AND NOT ANDROID)qt_feature("timezone_tzdb"PUBLICSECTION"Utilities"LABEL"std::chrono::tzdb QTZ backend"PURPOSE"Provides support for a timezone backend using std::chrono."CONDITION TEST_chrono_tzdb # See QTBUG-127598 for gcc's libstdc++'s deficiencies.# Update src/corelib/doc/src/cpp20-overview.qdoc before enabling this:AUTODETECT OFF)qt_feature("datetimeparser"PRIVATESECTION"Utilities"LABEL"QDateTimeParser"PURPOSE"Provides support for parsing date-time texts."CONDITION QT_FEATURE_datestring )qt_feature("commandlineparser"PUBLICSECTION"Utilities"LABEL"QCommandlineParser"PURPOSE"Provides support for command line parsing.")qt_feature("lttng"PRIVATELABEL"LTTNG"AUTODETECT OFFCONDITION LINUX AND LTTNGUST_FOUNDENABLE INPUT_trace STREQUAL'lttng'OR(INPUT_trace STREQUAL'yes'AND LINUX)DISABLE INPUT_trace STREQUAL'etw'OR INPUT_trace STREQUAL'no')qt_feature("etw"PRIVATELABEL"ETW"AUTODETECT OFFCONDITION WIN32ENABLE INPUT_trace STREQUAL'etw'OR(INPUT_trace STREQUAL'yes'AND WIN32)DISABLE INPUT_trace STREQUAL'lttng'OR INPUT_trace STREQUAL'no')qt_feature("ctf"PRIVATELABEL"CTF"AUTODETECT OFFENABLE INPUT_trace STREQUAL'ctf'DISABLE INPUT_trace STREQUAL'etw'OR INPUT_trace STREQUAL'no'OR INPUT_trace STREQUAL'lttng')qt_feature("forkfd_pidfd"PRIVATELABEL"CLONE_PIDFD support in forkfd"CONDITION LINUX)qt_feature("cborstreamreader"PUBLICSECTION"Utilities"LABEL"CBOR stream reading"PURPOSE"Provides support for reading the CBOR binary format. Note that this is required for plugin loading. Qt GUI needs QPA plugins for basic operation.")qt_feature("cborstreamwriter"PUBLICSECTION"Utilities"LABEL"CBOR stream writing"PURPOSE"Provides support for writing the CBOR binary format.")qt_feature("poll-exit-on-error"PRIVATELABEL"Poll exit on error"AUTODETECT OFFCONDITION UNIXPURPOSE"Exit on error instead of just printing the error code and continue.")qt_feature("permissions"PUBLICSECTION"Utilities"LABEL"Application permissions"PURPOSE"Provides support for requesting user permission to access restricted data or APIs")qt_feature("openssl-hash"PRIVATELABEL"OpenSSL based cryptographic hash"AUTODETECT OFFCONDITION QT_FEATURE_openssl_linked AND QT_FEATURE_opensslv30PURPOSE"Uses OpenSSL based implementation of cryptographic hash algorithms.")qt_configure_add_summary_section(NAME"Qt Core")qt_configure_add_summary_entry(ARGS"backtrace")qt_configure_add_summary_entry(ARGS"cxx23_stacktrace")qt_configure_add_summary_entry(ARGS"doubleconversion")qt_configure_add_summary_entry(ARGS"system-doubleconversion")qt_configure_add_summary_entry(ARGS"forkfd_pidfd"CONDITION LINUX)qt_configure_add_summary_entry(ARGS"glib")qt_configure_add_summary_entry(ARGS"icu")qt_configure_add_summary_entry(ARGS"jemalloc")qt_configure_add_summary_entry(ARGS"timezone_tzdb")qt_configure_add_summary_entry(ARGS"system-libb2")qt_configure_add_summary_entry(ARGS"mimetype-database")qt_configure_add_summary_entry(ARGS"permissions")qt_configure_add_summary_entry(ARGS"ipc_posix"CONDITION UNIX)qt_configure_add_summary_entry(TYPE"firstAvailableFeature"ARGS"etw lttng ctf"MESSAGE"Tracing backend")qt_configure_add_summary_entry(ARGS"openssl-hash")qt_configure_add_summary_section(NAME"Logging backends")qt_configure_add_summary_entry(ARGS"journald")qt_configure_add_summary_entry(ARGS"syslog")qt_configure_add_summary_entry(ARGS"slog2")qt_configure_end_summary_section()# end of "Logging backends" sectionqt_configure_add_summary_entry(ARGS"qqnx_pps"CONDITION QNX)qt_configure_add_summary_entry(ARGS"pcre2")qt_configure_add_summary_entry(ARGS"system-pcre2")qt_configure_end_summary_section()# end of "Qt Core" sectionqt_configure_add_report_entry(TYPE NOTEMESSAGE"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 ERRORMESSAGE"detected a std::atomic implementation that fails for function pointers. Please apply the patch corresponding to your Standard Library vendor, found in qtbase/config.tests/atomicfptr"CONDITION NOT TEST_atomicfptr )qt_configure_add_report_entry(TYPE ERRORMESSAGE"Qt requires poll(), ppoll(), poll_ts() or select() on this platform"CONDITION(UNIX OR INTEGRITY)AND(NOT QT_FEATURE_poll_ppoll )AND(NOT QT_FEATURE_poll_pollts )AND(NOT QT_FEATURE_poll_poll )AND(NOT QT_FEATURE_poll_select ))qt_configure_add_report_entry(TYPE WARNINGMESSAGE"Basic cpp/winrt support missing. Some features might not be available."CONDITION WIN32 AND NOT QT_FEATURE_cpp_winrt )
close