1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#### Inputs
#### Libraries
qt_find_package(WrapSystemZLIB 1.0.8 PROVIDED_TARGETS WrapSystemZLIB::WrapSystemZLIB MODULE_NAME global QMAKE_LIB zlib)
# Work around global target promotion failure when WrapZLIB is used on APPLE platforms.
# What ends up happening is that the ZLIB::ZLIB target is not promoted to global by qt_find_package,
# then qt_find_package(WrapSystemPNG) tries to find its dependency ZLIB::ZLIB, sees it's not global
# and tries to promote it to global, but fails because the directory scope of the PNG package is
# different (src/gui) from where ZLIB was originally found (qtbase root).
# To avoid that, just manually promote the target to global here.
if(TARGET ZLIB::ZLIB)
set_property(TARGET ZLIB::ZLIB PROPERTY IMPORTED_GLOBAL TRUE)
endif()
# Look for Threads in the same scope as OpenSSL package, because OpenSSL sometimes depends on
# Threads (for static OpenSSL builds) and we want to promote the target to global in the same
# directory scope.
qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
qt_find_package(WrapOpenSSLHeaders PROVIDED_TARGETS WrapOpenSSLHeaders::WrapOpenSSLHeaders MODULE_NAME core)
# openssl_headers
# OPENSSL_VERSION_MAJOR is not defined for OpenSSL 1.1.1
qt_config_compile_test(opensslv11_headers
LABEL "opensslv11_headers"
LIBRARIES
WrapOpenSSLHeaders::WrapOpenSSLHeaders
CODE
"#include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !defined(OPENSSL_VERSION_NUMBER) || defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_NUMBER-0 < 0x10101000L
# error OpenSSL >= 1.1.1 is required
#endif
#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
# error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it is libressl which is unsupported
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
")
qt_find_package(WrapOpenSSL PROVIDED_TARGETS WrapOpenSSL::WrapOpenSSL MODULE_NAME core QMAKE_LIB openssl)
# openssl
# OPENSSL_VERSION_MAJOR is not defined for OpenSSL 1.1.1
qt_config_compile_test(opensslv11
LABEL "opensslv11"
LIBRARIES
WrapOpenSSL::WrapOpenSSL
CODE
"#include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !defined(OPENSSL_VERSION_NUMBER) || defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_NUMBER-0 < 0x10101000L
# error OpenSSL >= 1.1.1 is required
#endif
#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
# error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it is libressl which is unsupported
#endif
int main(void)
{
/* BEGIN TEST: */
SSL_free(SSL_new(0));
/* END TEST: */
return 0;
}
")
# opensslv30
# openssl_headers
qt_config_compile_test(opensslv30_headers
LABEL "opensslv30_headers"
LIBRARIES
WrapOpenSSLHeaders::WrapOpenSSLHeaders
CODE
"#include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !OPENSSL_VERSION_PREREQ(3,0)
# error OpenSSL >= 3.0 is required
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
")
qt_config_compile_test(opensslv30
LABEL "opensslv30"
LIBRARIES
WrapOpenSSL::WrapOpenSSL
CODE
"#include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !OPENSSL_VERSION_PREREQ(3,0)
# error OpenSSL >= 3.0 is required
#endif
int main(void)
{
/* BEGIN TEST: */
SSL_free(SSL_new(0));
/* END TEST: */
return 0;
}
")
qt_find_package(WrapZSTD 1.3
PROVIDED_TARGETS
WrapZSTD::WrapZSTD
zstd::libzstd
zstd::libzstd_static
zstd::libzstd_shared
MODULE_NAME global
QMAKE_LIB zstd
)
qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev)
qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST MODULE_NAME core QMAKE_LIB lttng-ust)
qt_add_qmake_lib_dependency(lttng-ust libdl)
#### Early-evaluated, Linker-related Tests and Features
qt_internal_check_if_linker_is_available(use_bfd_linker
LABEL "bfd linker"
FLAG "-fuse-ld=bfd"
)
qt_internal_check_if_linker_is_available(use_gold_linker
LABEL "gold linker"
FLAG "-fuse-ld=gold"
)
qt_internal_check_if_linker_is_available(use_lld_linker
LABEL "lld linker"
FLAG "-fuse-ld=lld"
)
# We set an invalid flag as a default flag so the compile test fails
# in case if no mold is found in PATH.
set(__qt_internal_mold_linker_flags "-Wl,-invalid-flag")
if(NOT QT_CONFIGURE_RUNNING)
qt_internal_get_mold_linker_flags(__qt_internal_mold_linker_flags)
endif()
qt_internal_check_if_linker_is_available(use_mold_linker
LABEL "mold linker"
FLAG "${__qt_internal_mold_linker_flags}"
)
unset(__qt_internal_mold_linker_flags)
qt_feature("use_bfd_linker"
PRIVATE
LABEL "bfd"
AUTODETECT false
CONDITION NOT MSVC AND NOT INTEGRITY AND NOT WASM AND TEST_use_bfd_linker
ENABLE INPUT_linker STREQUAL 'bfd'
DISABLE INPUT_linker STREQUAL 'gold' OR INPUT_linker STREQUAL 'lld'
OR INPUT_linker STREQUAL 'mold'
)
qt_feature_config("use_bfd_linker" QMAKE_PRIVATE_CONFIG)
qt_feature("use_gold_linker_alias"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_gold_linker
)
qt_feature("use_gold_linker"
PRIVATE
LABEL "gold"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND NOT rtems AND TEST_use_gold_linker
ENABLE INPUT_linker STREQUAL 'gold' OR QT_FEATURE_use_gold_linker_alias
DISABLE INPUT_linker STREQUAL 'bfd' OR INPUT_linker STREQUAL 'lld'
OR INPUT_linker STREQUAL 'mold'
)
qt_feature_config("use_gold_linker" QMAKE_PRIVATE_CONFIG)
qt_feature("use_lld_linker"
PRIVATE
LABEL "lld"
AUTODETECT false
CONDITION NOT MSVC AND NOT INTEGRITY AND NOT WASM AND TEST_use_lld_linker
ENABLE INPUT_linker STREQUAL 'lld'
DISABLE INPUT_linker STREQUAL 'bfd' OR INPUT_linker STREQUAL 'gold'
OR INPUT_linker STREQUAL 'mold'
)
qt_feature_config("use_lld_linker" QMAKE_PRIVATE_CONFIG)
qt_feature("use_mold_linker"
PRIVATE
LABEL "mold"
AUTODETECT FALSE
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_mold_linker
ENABLE INPUT_linker STREQUAL 'mold'
DISABLE INPUT_linker STREQUAL 'bfd' OR INPUT_linker STREQUAL 'gold'
OR INPUT_linker STREQUAL 'lld'
)
qt_feature_config("use_mold_linker" QMAKE_PRIVATE_CONFIG)
if(NOT QT_CONFIGURE_RUNNING)
qt_evaluate_feature(use_bfd_linker)
qt_evaluate_feature(use_gold_linker_alias)
qt_evaluate_feature(use_gold_linker)
qt_evaluate_feature(use_lld_linker)
qt_evaluate_feature(use_mold_linker)
qt_run_linker_version_script_support()
endif()
qt_feature("version_tagging"
PUBLIC
AUTODETECT TRUE
CONDITION TEST_ld_version_script OR APPLE OR WIN32
)
qt_feature_definition("version_tagging" "QT_NO_VERSION_TAGGING" NEGATE)
#### Tests
# machineTuple
qt_config_compile_test_machine_tuple("machine tuple")
# glibc
qt_config_compile_test(glibc
LABEL "Using Glibc"
CODE
"#include <features.h>
#ifndef __GLIBC__
#error
#endif
int main() {}"
)
# glibc 2.34, for _FORTIFY_SOURCE == 3
qt_config_compile_test(glibc_234
LABEL "Using Glibc >= 2.34"
CODE
"#include <features.h>
#if !defined(__GLIBC__) || !__GLIBC_PREREQ(2, 34)
#error
#endif
int main() {}"
)
# cxx20
qt_config_compile_test(cxx20
LABEL "C++20 support"
CODE
"#if __cplusplus > 201703L
// Compiler claims to support C++20, trust it
#else
# error __cplusplus must be > 201703L (the value for C++17)
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
"
CXX_STANDARD 20
)
qt_config_compile_test(cxx2b
LABEL "C++23 support"
CODE
"#if __cplusplus > 202002L
// Compiler claims to support C++23, trust it
#else
# error __cplusplus must be > 202002L (the value for C++20)
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
"
CXX_STANDARD 23
)
qt_config_compile_test(cxx2c
LABEL "C++2c support"
CODE
"#if __cplusplus > 202302L
// Compiler claims to support C++2c, trust it
#else
# error __cplusplus must be > 202302L (the value for C++23)
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
"
CXX_STANDARD 26
)
# precompile_header
qt_config_compile_test(precompile_header
LABEL "precompiled header support"
PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/precompile_header"
)
qt_config_compiler_supports_flag_test(optimize_debug
LABEL "-Og support"
FLAG "-Og"
)
qt_config_compile_test(no_direct_extern_access
LABEL "-mno-direct-extern-access / -fno-direct-access-external-data support"
PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/no_direct_extern_access"
)
qt_config_linker_supports_flag_test(enable_new_dtags
LABEL "new dtags support"
FLAG "--enable-new-dtags"
)
qt_config_linker_supports_flag_test(gdb_index
LABEL "gdb index support"
FLAG "--gdb-index"
)
# reduce_relocations
qt_config_compile_test(reduce_relocations
LABEL "-Bsymbolic-functions support"
CODE
"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)) || defined(__sun)
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
#endif
int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
"# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
)
if(MSVC OR APPLE)
# These platforms / toolchains support separate debug information. Skip the compile test.
set(TEST_separate_debug_info ON CACHE INTERNAL "separate debug information support")
else()
qt_config_compile_test("separate_debug_info"
LABEL "separate debug information support"
PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/separate_debug_info"
)
endif()
# signaling_nan
qt_config_compile_test(signaling_nan
LABEL "Signaling NaN for doubles"
CODE
"#if defined(__ghs) && (__GHS_VERSION_NUMBER <= 202014)
# error Signal NaNs are not supported by GHS compiler, but has_signaling_NaN returns TRUE. Will be fixed in future compiler releases.
#endif
#include <limits>
int main(void)
{
/* BEGIN TEST: */
using B = std::numeric_limits<double>;
static_assert(B::has_signaling_NaN, \"System lacks signaling NaN\");
/* END TEST: */
return 0;
}
")
# basic x86 intrinsics support
qt_config_compile_test(x86intrin
LABEL "Basic x86 intrinsics"
PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/x86intrin"
)
# x86: avx512vbmi2
qt_config_compile_test_x86simd(avx512vbmi2 "AVX512VBMI2")
# x86: vaes
qt_config_compile_test_x86simd(vaes "VAES")
# arm: crypto
qt_config_compile_test_armintrin(crypto "CRYPTO")
# arm: sve
qt_config_compile_test_armintrin(sve "SVE")
# loongarch: lsx
qt_config_compile_test_loongarchsimd(lsx "LSX")
# loongarch: lasx
qt_config_compile_test_loongarchsimd(lasx "LASX")
# localtime_r
qt_config_compile_test(localtime_r
LABEL "localtime_r()"
CODE
"#include <time.h>
int main(void)
{
/* BEGIN TEST: */
(void) localtime_r(nullptr, nullptr);
/* END TEST: */
return 0;
}
")
# localtime_s
qt_config_compile_test(localtime_s
LABEL "localtime_s()"
CODE
"#include <time.h>
int main(void)
{
/* BEGIN TEST: */
(void) localtime_s(nullptr, nullptr);
/* END TEST: */
return 0;
}
")
# posix_fallocate
qt_config_compile_test(posix_fallocate
LABEL "POSIX fallocate()"
CODE
"#include <fcntl.h>
#include <unistd.h>
int main(void)
{
/* BEGIN TEST: */
(void) posix_fallocate(0, 0, 0);
/* END TEST: */
return 0;
}
")
# stack_protector
if(NOT WASM AND NOT VXWORKS)
# emcc doesn't support this, but the detection accidentally succeeds
# https://github.com/emscripten-core/emscripten/issues/17030
# VXWORKS: We currently don't know the correct linker options. This is
# tracked at QTBUG-123715
qt_config_compiler_supports_flag_test(stack_protector
LABEL "stack protection"
FLAG "-fstack-protector-strong"
)
endif()
# stack_clash_protection
if(NOT CLANG) # https://gitlab.kitware.com/cmake/cmake/-/issues/21998
qt_config_compiler_supports_flag_test(stack_clash_protection
LABEL "-fstack-clash-protection support"
FLAG "-fstack-clash-protection"
)
endif()
# trivial_auto_var_init_pattern
if(NOT GCC OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.2.0")
# Causes broken codegen on GCC https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115527
qt_config_compiler_supports_flag_test(trivial_auto_var_init_pattern
LABEL "-ftrivial-auto-var-init=pattern support"
FLAG "-ftrivial-auto-var-init=pattern"
)
endif()
# intelcet
if(MSVC)
qt_config_linker_supports_flag_test(intelcet
LABEL "Support for Intel Control-flow Enforcement Technology (CET)"
FLAG "-CETCOMPAT"
)
else()
qt_config_compile_test(intelcet
LABEL "Support for Intel Control-flow Enforcement Technology (CET)"
COMPILE_OPTIONS -fcf-protection=full
CODE
"int main(void)
{
/* BEGIN TEST: */
#if !defined(__CET__)
# error Intel CET not available
#endif
/* END TEST: */
return 0;
}
"
)
endif()
# -z relro -z now
if(NOT WIN32)
qt_config_linker_supports_flag_test(relro_now_linker
LABEL "Support for -z relro and -z now"
FLAG "-z,relro,-z,now"
)
endif()
# Is libc++ the default Standard Library?
qt_config_compile_test(using_stdlib_libcpp
LABEL "Compiler defaults to libc++"
CODE
"
#include <ciso646>
int main(void)
{
/* BEGIN TEST: */
#ifndef _LIBCPP_VERSION
# error
#endif
/* END TEST: */
}
"
)
#### Features
# This belongs into gui, but the license check needs it here already.
qt_feature("android-style-assets" PRIVATE
LABEL "Android Style Assets"
CONDITION ANDROID
)
qt_feature_alias("shared" PUBLIC
LABEL "Building shared libraries"
ALIAS_OF_CACHE BUILD_SHARED_LIBS
)
qt_feature_definition("shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)")
qt_feature_config("shared" QMAKE_PUBLIC_QT_CONFIG)
qt_feature_config("shared" QMAKE_PUBLIC_CONFIG)
qt_feature_alias("static"
ALIAS_OF_FEATURE "shared"
NEGATE
)
qt_feature_config("static" QMAKE_PUBLIC_QT_CONFIG)
qt_feature_config("static" QMAKE_PUBLIC_CONFIG)
qt_feature("cross_compile" PUBLIC
LABEL "Cross compiling"
CONDITION CMAKE_CROSSCOMPILING
)
qt_feature_config("cross_compile" QMAKE_PUBLIC_CONFIG)
qt_feature_config("cross_compile" QMAKE_PRIVATE_CONFIG)
qt_feature("gc_binaries" PRIVATE
CONDITION NOT QT_FEATURE_shared
)
qt_feature("optimize_debug"
LABEL "Optimize debug build"
AUTODETECT NOT QT_FEATURE_developer_build
CONDITION NOT MSVC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) AND TEST_optimize_debug
)
qt_feature_config("optimize_debug" QMAKE_PRIVATE_CONFIG)
qt_feature("optimize_size"
LABEL "Optimize release build for size"
AUTODETECT OFF
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
qt_feature_config("optimize_size" QMAKE_PRIVATE_CONFIG)
qt_feature("optimize_full"
LABEL "Fully optimize release builds (-O3)"
AUTODETECT OFF
)
qt_feature_config("optimize_full" QMAKE_PRIVATE_CONFIG)
qt_feature("msvc_obj_debug_info"
LABEL "Embed debug info in object files (MSVC)"
ENABLE QT_USE_CCACHE
AUTODETECT OFF
EMIT_IF MSVC
)
qt_feature_config("msvc_obj_debug_info" QMAKE_PRIVATE_CONFIG)
qt_feature("pkg-config" PUBLIC
LABEL "Using pkg-config"
AUTODETECT NOT APPLE AND NOT WIN32 AND NOT ANDROID
CONDITION PKG_CONFIG_FOUND
)
qt_feature_config("pkg-config" QMAKE_PUBLIC_QT_CONFIG
NEGATE)
qt_feature("developer-build" PRIVATE
LABEL "Developer build"
AUTODETECT OFF
)
qt_feature("no-prefix"
LABEL "No prefix build"
AUTODETECT NOT QT_WILL_INSTALL
CONDITION NOT QT_WILL_INSTALL
)
qt_feature("lint_generated_code"
LABEL "Lint qt-generated code"
AUTODETECT QT_FEATURE_developer_build
)
qt_feature("private_tests" PRIVATE
LABEL "Developer build: private_tests"
CONDITION QT_FEATURE_developer_build
)
qt_feature("doc_snippets" PRIVATE
LABEL "Developer build: doc_snippets"
AUTODETECT QT_FEATURE_developer_build
CONDITION QT_FEATURE_shared
)
qt_feature_definition("developer-build" "QT_BUILD_INTERNAL")
qt_feature_config("developer-build" QMAKE_PUBLIC_QT_CONFIG
NAME "private_tests"
)
qt_feature("debug" PRIVATE
LABEL "Build for debugging"
AUTODETECT ON
CONDITION CMAKE_BUILD_TYPE STREQUAL Debug OR Debug IN_LIST CMAKE_CONFIGURATION_TYPES
)
qt_feature("debug_and_release" PUBLIC
LABEL "Compile libs in debug and release mode"
AUTODETECT 1
CONDITION QT_GENERATOR_IS_MULTI_CONFIG
)
qt_feature_config("debug_and_release" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("force_debug_info"
LABEL "Add debug info in release mode"
AUTODETECT CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR RelWithDebInfo IN_LIST CMAKE_CONFIGURATION_TYPES
)
qt_feature_config("force_debug_info" QMAKE_PRIVATE_CONFIG)
qt_feature("separate_debug_info" PUBLIC
LABEL "Split off debug information"
AUTODETECT OFF
CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND TEST_separate_debug_info
)
qt_feature_config("separate_debug_info" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("appstore-compliant" PUBLIC
LABEL "App store compliance"
PURPOSE "Disables code that is not allowed in platform app stores"
AUTODETECT UIKIT OR ANDROID
)
if(APPLE)
qt_feature_definition("appstore-compliant" "QT_APPLE_NO_PRIVATE_APIS")
endif()
qt_feature("simulator_and_device" PUBLIC
LABEL "Build for both simulator and device"
CONDITION IOS AND NOT QT_APPLE_SDK
)
qt_feature_config("simulator_and_device" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("rpath" PUBLIC
LABEL "Build with RPATH"
AUTODETECT 1
CONDITION BUILD_SHARED_LIBS AND UNIX AND NOT WIN32 AND NOT ANDROID
)
qt_feature_config("rpath" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("elf_private_full_version" PRIVATE
LABEL "Use Qt's full version number in ELF version symbols"
AUTODETECT OFF
CONDITION BUILD_SHARED_LIBS AND UNIX AND NOT APPLE
)
qt_feature_config("elf_private_full_version" QMAKE_PRIVATE_QT_CONFIG)
qt_feature("force_asserts" PUBLIC
LABEL "Force assertions"
AUTODETECT OFF
)
qt_feature("exceptions"
LABEL "Enable exceptions"
AUTODETECT OFF
)
qt_feature("framework" PUBLIC
LABEL "Build Apple Frameworks"
AUTODETECT ON
# If changing this, please align with logic in
# qt_internal_setup_cmake_config_postfix.
CONDITION APPLE
)
qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG
NAME "qt_framework"
)
qt_feature_config("framework" QMAKE_PUBLIC_CONFIG
NAME "qt_framework"
)
qt_feature("largefile"
LABEL "Large file support"
CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT rtems
)
qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64")
qt_feature_config("largefile" QMAKE_PRIVATE_CONFIG)
qt_feature("sanitize_address"
LABEL "Addresses"
AUTODETECT OFF
)
qt_feature_config("sanitize_address" QMAKE_PUBLIC_CONFIG)
qt_feature("sanitize_thread"
LABEL "Threads"
AUTODETECT OFF
)
qt_feature_config("sanitize_thread" QMAKE_PUBLIC_CONFIG)
qt_feature("sanitize_memory"
LABEL "Memory"
AUTODETECT OFF
)
qt_feature_config("sanitize_memory" QMAKE_PUBLIC_CONFIG)
qt_feature("sanitize_fuzzer_no_link"
LABEL "Fuzzer (instrumentation only)"
PURPOSE "Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's."
AUTODETECT OFF
)
qt_feature_config("sanitize_fuzzer_no_link" QMAKE_PUBLIC_CONFIG)
qt_feature("sanitize_undefined"
LABEL "Undefined"
AUTODETECT OFF
)
qt_feature_config("sanitize_undefined" QMAKE_PUBLIC_CONFIG)
qt_feature("sanitizer"
LABEL "Sanitizers"
CONDITION QT_FEATURE_sanitize_address OR QT_FEATURE_sanitize_thread OR QT_FEATURE_sanitize_memory OR QT_FEATURE_sanitize_fuzzer_no_link OR QT_FEATURE_sanitize_undefined
)
qt_feature_config("sanitizer" QMAKE_PUBLIC_CONFIG)
qt_feature("plugin-manifests"
LABEL "Embed manifests in plugins"
AUTODETECT OFF
EMIT_IF WIN32
)
qt_feature_config("plugin-manifests" QMAKE_PUBLIC_CONFIG
NEGATE
NAME "no_plugin_manifest"
)
qt_feature("c++20" PUBLIC
LABEL "C++20"
AUTODETECT OFF
CONDITION TEST_cxx20 AND NOT VXWORKS
)
qt_feature_config("c++20" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("c++2a" PUBLIC
LABEL "C++20"
CONDITION QT_FEATURE_cxx20
)
qt_feature_config("c++2a" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("c++2b" PUBLIC
LABEL "C++23"
AUTODETECT OFF
CONDITION QT_FEATURE_cxx20 AND (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") AND TEST_cxx2b
)
qt_feature_config("c++2b" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("c++2c" PUBLIC
LABEL "C++2c"
AUTODETECT OFF
CONDITION QT_FEATURE_cxx2b AND (CMAKE_VERSION VERSION_GREATER_EQUAL "3.25") AND TEST_cxx2c
)
qt_feature_config("c++2c" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("precompile_header"
LABEL "Using precompiled headers"
CONDITION BUILD_WITH_PCH AND TEST_precompile_header
AUTODETECT NOT WASM
)
qt_feature_config("precompile_header" QMAKE_PRIVATE_CONFIG)
set(__qt_ltcg_detected FALSE)
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
set(__qt_ltcg_detected TRUE)
else()
foreach(config ${CMAKE_BUILD_TYPE} ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${config}" __qt_uc_config)
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${__qt_uc_config})
set(__qt_ltcg_detected TRUE)
break()
endif()
endforeach()
unset(__qt_uc_config)
endif()
qt_feature("ltcg"
LABEL "Using Link Time Optimization (LTCG)"
AUTODETECT ON
CONDITION __qt_ltcg_detected
)
qt_feature_config("ltcg" QMAKE_PRIVATE_CONFIG)
if(NOT QT_CONFIGURE_RUNNING)
# This feature is used early in QtCompilerOptimization.cmake.
qt_evaluate_feature(ltcg)
endif()
qt_feature("enable_new_dtags"
LABEL "Using new DTAGS"
CONDITION LINUX AND TEST_enable_new_dtags
)
qt_feature_config("enable_new_dtags" QMAKE_PRIVATE_CONFIG)
qt_feature("enable_gdb_index"
LABEL "Generating GDB index"
AUTODETECT QT_FEATURE_developer_build
CONDITION GCC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release ) AND TEST_gdb_index
)
qt_feature_config("enable_gdb_index" QMAKE_PRIVATE_CONFIG)
qt_feature("reduce_exports" PRIVATE
LABEL "Reduce amount of exported symbols"
CONDITION NOT MSVC
)
qt_feature_definition("reduce_exports" "QT_VISIBILITY_AVAILABLE")
qt_feature_config("reduce_exports" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("no_direct_extern_access" PRIVATE
LABEL "Use protected visibility and -mno-direct-extern-access"
CONDITION NOT WIN32 AND TEST_no_direct_extern_access
AUTODETECT OFF
)
qt_feature_definition("no_direct_extern_access" "QT_USE_PROTECTED_VISIBILITY")
qt_feature_config("no_direct_extern_access" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("reduce_relocations" PUBLIC
LABEL "Reduce amount of relocations"
CONDITION NOT WIN32 AND TEST_reduce_relocations
)
qt_feature_definition("reduce_relocations" "QT_REDUCE_RELOCATIONS")
qt_feature_config("reduce_relocations" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("signaling_nan" PUBLIC
LABEL "Signaling NaN"
CONDITION TEST_signaling_nan
)
qt_feature("x86intrin" PRIVATE
LABEL "Basic"
CONDITION (((TEST_architecture_arch STREQUAL i386) OR (TEST_architecture_arch STREQUAL x86_64))
AND (QT_FORCE_FEATURE_x86intrin OR TEST_x86intrin))
AUTODETECT NOT WASM
)
qt_feature("sse2" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
qt_feature_config("sse2" QMAKE_PRIVATE_CONFIG)
qt_feature("sse3" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1")
qt_feature_config("sse3" QMAKE_PRIVATE_CONFIG)
qt_feature("ssse3" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1")
qt_feature_config("ssse3" QMAKE_PRIVATE_CONFIG)
qt_feature("sse4_1" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("sse4_1" "QT_COMPILER_SUPPORTS_SSE4_1" VALUE "1")
qt_feature_config("sse4_1" QMAKE_PRIVATE_CONFIG)
qt_feature("sse4_2" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1")
qt_feature_config("sse4_2" QMAKE_PRIVATE_CONFIG)
qt_feature("avx" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1")
qt_feature_config("avx" QMAKE_PRIVATE_CONFIG)
qt_feature("f16c" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1")
qt_feature_config("f16c" QMAKE_PRIVATE_CONFIG)
qt_feature("avx2" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
qt_feature_config("avx2" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512f" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1")
qt_feature_config("avx512f" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512er" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1")
qt_feature_config("avx512er" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512cd" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1")
qt_feature_config("avx512cd" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512pf" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1")
qt_feature_config("avx512pf" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512dq" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1")
qt_feature_config("avx512dq" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512bw" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1")
qt_feature_config("avx512bw" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512vl" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1")
qt_feature_config("avx512vl" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512ifma" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1")
qt_feature_config("avx512ifma" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512vbmi" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
qt_feature_config("avx512vbmi" QMAKE_PRIVATE_CONFIG)
qt_feature("avx512vbmi2" PRIVATE
LABEL "AVX512VBMI2"
CONDITION QT_FEATURE_x86intrin AND TEST_subarch_avx512vbmi2
)
qt_feature_definition("avx512vbmi2" "QT_COMPILER_SUPPORTS_AVX512VBMI2" VALUE "1")
qt_feature_config("avx512vbmi2" QMAKE_PRIVATE_CONFIG)
qt_feature("aesni" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
qt_feature_config("aesni" QMAKE_PRIVATE_CONFIG)
qt_feature("vaes" PRIVATE
LABEL "VAES"
CONDITION QT_FEATURE_x86intrin AND TEST_subarch_vaes
)
qt_feature_definition("vaes" "QT_COMPILER_SUPPORTS_VAES" VALUE "1")
qt_feature_config("vaes" QMAKE_PRIVATE_CONFIG)
qt_feature("rdrnd" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
qt_feature_config("rdrnd" QMAKE_PRIVATE_CONFIG)
qt_feature("rdseed" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1")
qt_feature_config("rdseed" QMAKE_PRIVATE_CONFIG)
qt_feature("shani" PRIVATE
CONDITION QT_FEATURE_x86intrin
)
qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
qt_feature_config("shani" QMAKE_PRIVATE_CONFIG)
qt_feature("lsx" PRIVATE
LABEL "LSX"
CONDITION ( TEST_architecture_arch STREQUAL loongarch64 ) AND TEST_subarch_lsx
)
qt_feature_definition("lsx" "QT_COMPILER_SUPPORTS_LSX" VALUE "1")
qt_feature_config("lsx" QMAKE_PRIVATE_CONFIG)
qt_feature("lasx" PRIVATE
LABEL "LASX"
CONDITION ( TEST_architecture_arch STREQUAL loongarch64 ) AND TEST_subarch_lasx
)
qt_feature_definition("lasx" "QT_COMPILER_SUPPORTS_LASX" VALUE "1")
qt_feature_config("lasx" QMAKE_PRIVATE_CONFIG)
qt_feature("mips_dsp" PRIVATE
LABEL "DSP"
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dsp
)
qt_feature_definition("mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1")
qt_feature_config("mips_dsp" QMAKE_PRIVATE_CONFIG)
qt_feature("mips_dspr2" PRIVATE
LABEL "DSPr2"
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dspr2
)
qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1")
qt_feature_config("mips_dspr2" QMAKE_PRIVATE_CONFIG)
qt_feature("neon" PRIVATE
LABEL "NEON"
CONDITION ( ( ( TEST_architecture_arch STREQUAL arm ) OR
( TEST_architecture_arch STREQUAL arm64 ) ) AND
TEST_arch_${TEST_architecture_arch}_subarch_neon ) OR QT_FORCE_FEATURE_neon
)
qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1")
qt_feature_config("neon" QMAKE_PRIVATE_CONFIG)
qt_feature("arm_crc32" PRIVATE
LABEL "CRC32"
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_crc32
)
qt_feature_definition("arm_crc32" "QT_COMPILER_SUPPORTS_CRC32" VALUE "1")
qt_feature_config("arm_crc32" QMAKE_PRIVATE_CONFIG)
qt_feature("arm_crypto" PRIVATE
LABEL "AES"
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND ( TEST_arch_${TEST_architecture_arch}_subarch_crypto OR TEST_subarch_crypto )
)
qt_feature_definition("arm_crypto" "QT_COMPILER_SUPPORTS_CRYPTO" VALUE "1")
qt_feature_definition("arm_crypto" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
qt_feature_config("arm_crypto" QMAKE_PRIVATE_CONFIG)
qt_feature("arm_sve" PRIVATE
LABEL "SVE"
CONDITION ( TEST_architecture_arch STREQUAL arm64 ) AND ( TEST_arch_${TEST_architecture_arch}_subarch_sve OR TEST_subarch_sve )
)
qt_feature_definition("arm_sve" "QT_COMPILER_SUPPORTS_SVE" VALUE "1")
qt_feature_config("arm_sve" QMAKE_PRIVATE_CONFIG)
qt_feature("wasm-simd128" PUBLIC
LABEL "WebAssembly SIMD128"
PURPOSE "Enables WebAssembly SIMD"
AUTODETECT OFF
)
qt_feature_definition("wasm-simd128" "QT_COMPILER_SUPPORTS_WASM_SIMD128" VALUE "1")
qt_feature_config("wasm-simd128" QMAKE_PRIVATE_CONFIG)
qt_feature("wasm-exceptions" PUBLIC
LABEL "WebAssembly Exceptions"
PURPOSE "Enables WebAssembly Exceptions"
AUTODETECT OFF
)
qt_feature_definition("wasm-exceptions" "QT_WASM_EXCEPTIONS" VALUE "1")
qt_feature_config("wasm-exceptions" QMAKE_PRIVATE_CONFIG)
qt_feature("wasm-jspi" PUBLIC
LABEL "WebAssembly JSPI"
PURPOSE "Enables WebAssembly JavaScript Promise Integration (JSPI)"
AUTODETECT OFF
)
qt_feature_definition("wasm-jspi" "QT_WASM_JSPI" VALUE "1")
qt_feature_config("wasm-jspi" QMAKE_PRIVATE_CONFIG)
qt_feature("localtime_r" PRIVATE
LABEL "localtime_r()"
CONDITION TEST_localtime_r
)
qt_feature("localtime_s" PRIVATE
LABEL "localtime_s()"
CONDITION TEST_localtime_s
)
qt_feature("posix_fallocate" PRIVATE
LABEL "POSIX fallocate()"
CONDITION TEST_posix_fallocate
)
qt_feature("force-system-libs" PRIVATE
LABEL "Force the usage of system libraries"
AUTODETECT OFF
)
qt_feature("force-bundled-libs" PRIVATE
LABEL "Force the usage of bundled libraries"
AUTODETECT OFF
)
qt_feature("system-zlib" PRIVATE SYSTEM_LIBRARY
LABEL "Using system zlib"
CONDITION WrapSystemZLIB_FOUND
)
qt_feature("zstd" PUBLIC
LABEL "Zstandard support"
CONDITION WrapZSTD_FOUND
)
qt_feature("stdlib-libcpp" PRIVATE
LABEL "Using stdlib=libc++"
AUTODETECT OFF
CONDITION MINGW OR (LINUX AND NOT ANDROID)
)
# Check whether CMake was built with zstd support.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21552
if(NOT DEFINED CACHE{QT_CMAKE_ZSTD_SUPPORT})
set(QT_CMAKE_ZSTD_SUPPORT FALSE CACHE INTERNAL "")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
execute_process(COMMAND "${CMAKE_COMMAND}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/cmake_zstd/check_zstd.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/config.tests"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE qt_check_zstd_exit_code)
if(qt_check_zstd_exit_code EQUAL 0)
set(QT_CMAKE_ZSTD_SUPPORT TRUE CACHE INTERNAL "")
endif()
unset(qt_check_zstd_exit_code)
endif()
endif()
qt_feature("thread" PUBLIC
SECTION "Kernel"
LABEL "Thread support"
PURPOSE "Provides QThread and related classes."
AUTODETECT NOT WASM
)
qt_feature("future" PUBLIC
SECTION "Kernel"
LABEL "QFuture"
PURPOSE "Provides QFuture and related classes."
CONDITION QT_FEATURE_thread
)
qt_feature("concurrent" PUBLIC
SECTION "Kernel"
LABEL "Qt Concurrent"
PURPOSE "Provides a high-level multi-threading API."
CONDITION QT_FEATURE_future
)
qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
qt_feature("dbus" PUBLIC PRIVATE
LABEL "Qt D-Bus"
AUTODETECT NOT UIKIT AND NOT ANDROID AND NOT VXWORKS
CONDITION QT_FEATURE_thread AND NOT WASM
)
qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
qt_feature("dbus-linked" PRIVATE
LABEL "Qt D-Bus directly linked to libdbus"
CONDITION QT_FEATURE_dbus AND DBus1_FOUND
ENABLE INPUT_dbus STREQUAL 'linked'
DISABLE INPUT_dbus STREQUAL 'runtime'
)
qt_feature("qreal"
LABEL "Type for qreal"
CONDITION DEFINED QT_COORD_TYPE AND NOT QT_COORD_TYPE STREQUAL "double"
)
qt_feature_definition("qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}")
qt_feature_definition("qreal" "QT_COORD_TYPE_STRING" VALUE "\"${QT_COORD_TYPE}\"")
if(QT_COORD_TYPE STREQUAL "double")
qt_feature_definition("qreal" "QT_COORD_TYPE_IS_DOUBLE" VALUE "1")
elseif(QT_COORD_TYPE STREQUAL "float")
qt_feature_definition("qreal" "QT_COORD_TYPE_IS_FLOAT" VALUE "1")
endif()
qt_feature("gui" PRIVATE
LABEL "Qt Gui"
)
qt_feature_config("gui" QMAKE_PUBLIC_QT_CONFIG
NEGATE)
qt_feature("network" PRIVATE
LABEL "Qt Network"
SECTION "Module"
PURPOSE "Provides the Qt Network module."
)
qt_feature("printsupport" PRIVATE
LABEL "Qt PrintSupport"
CONDITION QT_FEATURE_widgets
SECTION "Module"
PURPOSE "Provides the Qt PrintSupport module."
)
qt_feature("sql" PRIVATE
LABEL "Qt Sql"
SECTION "Module"
PURPOSE "Provides the Sql module."
)
qt_feature("testlib" PRIVATE
LABEL "Qt Testlib"
SECTION "Module"
PURPOSE "Provides the Qt Testlib module."
)
qt_feature("widgets" PRIVATE
LABEL "Qt Widgets"
AUTODETECT NOT TVOS AND NOT WATCHOS
CONDITION QT_FEATURE_gui
)
qt_feature_definition("widgets" "QT_NO_WIDGETS" NEGATE)
qt_feature_config("widgets" QMAKE_PUBLIC_QT_CONFIG
NEGATE)
qt_feature("xml" PRIVATE
LABEL "Qt Xml"
SECTION "Module"
PURPOSE "Provides the Qt Xml module."
)
qt_feature("libudev" PRIVATE
LABEL "udev"
CONDITION Libudev_FOUND AND NOT INTEGRITY
)
qt_feature("openssl" PRIVATE
LABEL "OpenSSL"
CONDITION QT_FEATURE_openssl_runtime OR QT_FEATURE_openssl_linked
ENABLE false
)
qt_feature_definition("openssl" "QT_NO_OPENSSL" NEGATE)
qt_feature_config("openssl" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("openssl-runtime"
AUTODETECT NOT WASM
CONDITION TEST_opensslv11_headers OR TEST_opensslv30_headers
ENABLE INPUT_openssl STREQUAL 'yes' OR INPUT_openssl STREQUAL 'runtime'
DISABLE INPUT_openssl STREQUAL 'no' OR INPUT_openssl STREQUAL 'linked' OR INPUT_ssl STREQUAL 'no'
)
qt_feature("openssl-linked" PUBLIC
LABEL " Qt directly linked to OpenSSL"
AUTODETECT OFF
CONDITION TEST_opensslv11 OR TEST_opensslv30
ENABLE INPUT_openssl STREQUAL 'linked'
)
qt_feature_definition("openssl-linked" "QT_LINKED_OPENSSL")
qt_feature("opensslv11" PUBLIC
LABEL "OpenSSL 1.1"
CONDITION TEST_opensslv11 OR TEST_opensslv11_headers
DISABLE INPUT_openssl STREQUAL 'no' OR INPUT_ssl STREQUAL 'no'
)
qt_feature("opensslv30" PUBLIC
LABEL "OpenSSL 3.0"
CONDITION TEST_opensslv30 OR TEST_opensslv30_headers
DISABLE INPUT_openssl STREQUAL 'no' OR INPUT_ssl STREQUAL 'no'
)
qt_feature("ccache"
LABEL "Using ccache"
AUTODETECT 1
CONDITION QT_USE_CCACHE
)
qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG)
qt_feature("static_runtime"
LABEL "Statically link the C/C++ runtime library"
AUTODETECT OFF
CONDITION NOT QT_FEATURE_shared
EMIT_IF WIN32
)
qt_feature_config("static_runtime" QMAKE_PUBLIC_CONFIG)
qt_feature_config("static_runtime" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("dlopen" PRIVATE
LABEL "dlopen()"
CONDITION UNIX AND NOT INTEGRITY
)
qt_feature("relocatable" PRIVATE
LABEL "Relocatable"
PURPOSE "Enable the Qt installation to be relocated."
AUTODETECT QT_FEATURE_shared
CONDITION QT_FEATURE_dlopen OR WIN32 OR NOT QT_FEATURE_shared
)
# hardening features
qt_feature("intelcet" PRIVATE
LABEL "Using Intel Control-flow Enforcement Technology (CET)"
AUTODETECT ON
CONDITION TEST_intelcet
)
qt_feature_config("intelcet" QMAKE_PUBLIC_CONFIG)
qt_feature("glibc_fortify_source" PRIVATE
LABEL "Using Glibc function fortification"
AUTODETECT ON
CONDITION TEST_glibc
)
qt_feature_config("glibc_fortify_source" QMAKE_PUBLIC_CONFIG)
qt_feature("trivial_auto_var_init_pattern" PRIVATE
LABEL "Using -ftrivial-auto-var-init=pattern"
AUTODETECT ON
CONDITION TEST_trivial_auto_var_init_pattern
)
qt_feature_config("trivial_auto_var_init_pattern" QMAKE_PUBLIC_CONFIG)
qt_feature("stack_protector" PRIVATE
LABEL "Using -fstack-protector-strong"
AUTODETECT ON
CONDITION TEST_stack_protector
)
qt_feature_config("stack_protector" QMAKE_PUBLIC_CONFIG)
qt_feature("stack_clash_protection" PRIVATE
LABEL "Using -fstack-clash-protection"
AUTODETECT ON
CONDITION TEST_stack_clash_protection
)
qt_feature_config("stack_clash_protection" QMAKE_PUBLIC_CONFIG)
qt_feature("libstdcpp_assertions" PRIVATE
LABEL "Using libstdc++ assertions"
AUTODETECT ON
CONDITION (GCC OR (CLANG AND NOT MSVC AND NOT QT_FEATURE_stdlib_libcpp AND NOT TEST_using_stdlib_libcpp))
)
qt_feature_config("libstdcpp_assertions" QMAKE_PUBLIC_CONFIG)
qt_feature("libcpp_hardening" PRIVATE
LABEL "Using libc++ hardening"
AUTODETECT ON
CONDITION (QT_FEATURE_stdlib_libcpp OR TEST_using_stdlib_libcpp)
)
qt_feature_config("libcpp_hardening" QMAKE_PUBLIC_CONFIG)
qt_feature("relro_now_linker" PRIVATE
LABEL "Using -z relro -z now when linking"
AUTODETECT ON
CONDITION TEST_relro_now_linker
)
qt_feature_config("relro_now_linker" QMAKE_PUBLIC_CONFIG)
if("${INPUT_coverage}" STREQUAL "gcov")
qt_config_compile_test(gcov
LABEL "gcov compiler flags"
COMPILE_OPTIONS "--coverage"
CODE
"int main(void)
{
/* BEGIN TEST: */
/* END TEST: */
return 0;
}
")
endif()
qt_feature("coverage-gcov"
LABEL "Gcov"
ENABLE INPUT_coverage STREQUAL "gcov"
CONDITION TEST_gcov AND
( QT_FEATURE_debug OR QT_FEATURE_debug_and_release )
)
qt_feature("coverage"
LABEL "Coverage"
CONDITION QT_FEATURE_coverage_gcov
)
qt_configure_add_summary_build_type_and_config()
qt_configure_add_summary_section(NAME "Build options")
qt_configure_add_summary_build_mode(Mode)
qt_configure_add_summary_entry(
ARGS "optimize_debug"
CONDITION NOT MSVC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry(
ARGS "optimize_size"
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
qt_configure_add_summary_entry(
ARGS "optimize_full"
)
qt_configure_add_summary_entry(ARGS "shared")
qt_configure_add_summary_entry(
ARGS "ccache"
CONDITION UNIX
)
qt_configure_add_summary_entry(
TYPE "message" ARGS "Unity Build" MESSAGE "yes" CONDITION QT_UNITY_BUILD
)
qt_configure_add_summary_entry(
TYPE "message" ARGS "Unity Build" MESSAGE "no" CONDITION NOT QT_UNITY_BUILD
)
qt_configure_add_summary_entry(
TYPE "message"
ARGS "Unity Build Batch Size"
MESSAGE "${QT_UNITY_BUILD_BATCH_SIZE}"
CONDITION QT_UNITY_BUILD
)
qt_configure_add_summary_entry(
TYPE "firstAvailableFeature"
ARGS "use_bfd_linker use_gold_linker use_lld_linker use_mold_linker"
MESSAGE "Linker"
CONDITION QT_FEATURE_use_bfd_linker OR QT_FEATURE_use_gold_linker OR QT_FEATURE_use_lld_linker
OR QT_FEATURE_use_mold_linker
)
qt_configure_add_summary_entry(
ARGS "enable_new_dtags"
CONDITION LINUX
)
qt_configure_add_summary_entry(
ARGS "enable_gdb_index"
CONDITION GCC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry(ARGS "relocatable")
qt_configure_add_summary_entry(ARGS "precompile_header")
qt_configure_add_summary_entry(ARGS "ltcg")
qt_configure_add_summary_entry(ARGS "intelcet")
qt_configure_add_summary_entry(ARGS "glibc_fortify_source")
qt_configure_add_summary_entry(ARGS "trivial_auto_var_init_pattern")
qt_configure_add_summary_entry(ARGS "stack_protector")
qt_configure_add_summary_entry(ARGS "stack_clash_protection")
qt_configure_add_summary_entry(ARGS "libstdcpp_assertions")
qt_configure_add_summary_entry(ARGS "libcpp_hardening")
qt_configure_add_summary_entry(ARGS "relro_now_linker")
qt_configure_add_summary_entry(
ARGS "wasm-simd128"
CONDITION ( TEST_architecture_arch STREQUAL wasm )
)
qt_configure_add_summary_entry(
ARGS "wasm-exceptions"
CONDITION ( TEST_architecture_arch STREQUAL wasm )
)
qt_configure_add_summary_entry(
ARGS "wasm-jspi"
CONDITION ( TEST_architecture_arch STREQUAL wasm )
)
qt_configure_add_summary_section(NAME "Target compiler supports")
qt_configure_add_summary_entry(
TYPE "featureList"
ARGS "x86intrin vaes avx512vbmi2"
MESSAGE "x86 Intrinsics"
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry(
TYPE "featureList"
ARGS "neon arm_crc32 arm_crypto arm_sve"
MESSAGE "ARM Extensions"
CONDITION ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 )
)
qt_configure_add_summary_entry(
TYPE "featureList"
ARGS "lsx lasx"
MESSAGE "LOONGARCH Extensions"
CONDITION ( TEST_architecture_arch STREQUAL loongarch64 )
)
qt_configure_add_summary_entry(
ARGS "mips_dsp"
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_add_summary_entry(
ARGS "mips_dspr2"
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_end_summary_section() # end of "Target compiler supports" section
qt_configure_add_summary_section(NAME "Sanitizers")
qt_configure_add_summary_entry(ARGS "sanitize_address")
qt_configure_add_summary_entry(ARGS "sanitize_thread")
qt_configure_add_summary_entry(ARGS "sanitize_memory")
qt_configure_add_summary_entry(ARGS "sanitize_fuzzer_no_link")
qt_configure_add_summary_entry(ARGS "sanitize_undefined")
qt_configure_end_summary_section() # end of "Sanitizers" section
qt_configure_add_summary_build_parts("Build parts")
if(QT_INSTALL_EXAMPLES_SOURCES)
set(_examples_sources_entry_message "yes")
else()
set(_examples_sources_entry_message "no")
endif()
qt_configure_add_summary_entry(ARGS "Install examples sources" TYPE "message"
MESSAGE "${_examples_sources_entry_message}")
qt_configure_add_summary_entry(
ARGS "appstore-compliant"
CONDITION APPLE OR ANDROID OR WIN32
)
qt_configure_end_summary_section() # end of "Build options" section
qt_configure_add_summary_section(NAME "Qt modules and options")
qt_configure_add_summary_entry(ARGS "concurrent")
qt_configure_add_summary_entry(ARGS "dbus")
qt_configure_add_summary_entry(ARGS "dbus-linked")
qt_configure_add_summary_entry(ARGS "gui")
qt_configure_add_summary_entry(ARGS "network")
qt_configure_add_summary_entry(ARGS "printsupport")
qt_configure_add_summary_entry(ARGS "sql")
qt_configure_add_summary_entry(ARGS "testlib")
qt_configure_add_summary_entry(ARGS "widgets")
qt_configure_add_summary_entry(ARGS "xml")
qt_configure_end_summary_section() # end of "Qt modules and options" section
qt_configure_add_summary_section(NAME "Support enabled for")
qt_configure_add_summary_entry(ARGS "pkg-config")
if(QT_USE_VCPKG AND (DEFINED ENV{VCPKG_ROOT} OR VCPKG_TARGET_TRIPLET))
set(_vcpkg_entry_message "yes")
else()
set(_vcpkg_entry_message "no")
endif()
qt_configure_add_summary_entry(ARGS "Using vcpkg" TYPE "message" MESSAGE "${_vcpkg_entry_message}")
qt_configure_add_summary_entry(ARGS "libudev")
qt_configure_add_summary_entry(ARGS "openssl")
qt_configure_add_summary_entry(ARGS "openssl-linked")
qt_configure_add_summary_entry(ARGS "opensslv11")
qt_configure_add_summary_entry(ARGS "opensslv30")
qt_configure_add_summary_entry(ARGS "system-zlib")
qt_configure_add_summary_entry(ARGS "zstd")
qt_configure_add_summary_entry(ARGS "thread")
qt_configure_end_summary_section() # end of "Support enabled for" section
qt_configure_add_report_entry(
TYPE NOTE
MESSAGE "Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library."
CONDITION NOT QT_FEATURE_shared
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "-debug-and-release is only supported on Darwin and Windows platforms. Qt can be built in release mode with separate debug information, so -debug-and-release is no longer necessary."
CONDITION INPUT_debug_and_release STREQUAL 'yes' AND NOT APPLE AND NOT WIN32
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Static builds don't support RPATH"
CONDITION ( QT_FEATURE_rpath OR QT_EXTRA_RPATHS ) AND NOT QT_FEATURE_shared
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Command line option -sanitize fuzzer-no-link is only supported with clang compilers."
CONDITION QT_FEATURE_sanitize_fuzzer_no_link AND NOT CLANG
)
if (TEST_architecture_arch STREQUAL x86_64 OR TEST_architecture_arch STREQUAL i386)
if ((TEST_architecture_arch STREQUAL i386) OR QNX OR WASM)
# Warn only
qt_configure_add_report_entry(
TYPE WARNING
CONDITION (NOT QT_FEATURE_x86intrin)
MESSAGE [=[
All x86 intrinsics and SIMD support were disabled. If this was in error, check
the result of the build in config.tests/x86intrin and report at https://bugreports.qt.io.
]=]
)
elseif (MSVC AND CLANG)
# Warn only
qt_configure_add_report_entry(
TYPE WARNING
CONDITION (NOT QT_FEATURE_x86intrin)
MESSAGE [=[
x86 intrinsics support is disabled for clang-cl build. This might be necessary due to
https://github.com/llvm/llvm-project/issues/53520
]=]
)
else()
string(CONCAT x86_intrin_error_message
"x86 intrinsics support missing. Check your compiler settings.\n"
"If this is a problem for you, report at https://bugreports.qt.io with your compiler ID and "
"version, and the TEST_x86intrin compile test output.\n"
)
qt_configure_add_report_entry(
TYPE ERROR
CONDITION (NOT QT_FEATURE_x86intrin)
COMPILE_TESTS_TO_SHOW_ON_ERROR TEST_x86intrin
MESSAGE "${x86_intrin_error_message}"
)
endif()
endif()
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Setting a library infix is not supported for framework builds."
CONDITION QT_FEATURE_framework AND DEFINED QT_LIBINFIX
)
qt_configure_add_report_entry(
TYPE NOTE
MESSAGE "WASM Thread support enabled."
CONDITION QT_FEATURE_thread AND WASM
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "You should use the recommended Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt. You have ${EMCC_VERSION}."
CONDITION WASM AND ${EMCC_VERSION} VERSION_LESS ${QT_EMCC_RECOMMENDED_VERSION}
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "Using Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt
may have issues. You have ${EMCC_VERSION}."
CONDITION WASM AND ${EMCC_VERSION} VERSION_GREATER ${QT_EMCC_RECOMMENDED_VERSION}
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "Some tests might fail to build when targeting WASM without -feature-thread."
CONDITION WASM AND QT_BUILD_TESTS AND NOT QT_FEATURE_thread
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Building Qt with C++20 is not supported with MSVC 2019."
CONDITION QT_FEATURE_cxx20 AND MSVC AND MSVC_VERSION LESS "1930"
)
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "You cannot force both system and bundled libraries."
CONDITION QT_FEATURE_force_bundled_libs AND QT_FEATURE_force_system_libs
)
if(WASM)
qt_extra_definition("QT_EMCC_VERSION" "\"${EMCC_VERSION}\"" PUBLIC)
endif()
qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC)
qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)
qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)
qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)
qt_extra_definition("QT_COPYRIGHT" \"${QT_COPYRIGHT}\" PUBLIC)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "QT_ALLOW_SYMLINK_IN_PATHS is enabled. This is not recommended, and it may lead to unexpected issues.
E.g., When building QtWebEngine, enabling this option may result in build issues in certain platforms.
See https://bugreports.qt.io/browse/QTBUG-59769."
CONDITION QT_ALLOW_SYMLINK_IN_PATHS
)
# QtGuiTest interface
qt_feature_definition("test_gui" "QT_GUI_TEST" VALUE "1")
qt_feature("test_gui" PUBLIC
LABEL "Build QtGuiTest namespace"
)
|