summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Define QT_STATIC for static buildsJoerg Bornemann2020-04-011-1/+16
| | | | | | | | | | QT_STATIC must be defined for static builds to have the right import/export symbol macros defined. Originally, this macro is wrapped in a condition. That's why we extend qt_feature_definition to be able to write a prerequisite to qconfig.h. Change-Id: I610e60acc7f5bdc031eff6d53a76e0b229a5c8c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'rpath' featureJoerg Bornemann2020-04-011-2/+5
| | | | | | | | This is needed for qmake mixing. Change-Id: I368169606606a8de4dc8f2db5b98660a0a2fa349 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Move qsimd* from corelib/tools to corelib/globalLars Knoll2020-03-261-5/+83
| | | | | | | | | | | It's not used in tools at all and fits a lot better in global. Also fix the qsimd_x86* files to have a proper copyright header. Change-Id: Id3d8e7cfcd7769a1ca9f3d8cf6d357a31a99ba40 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix exception in pro2cmake about missing v1 apiLeander Beernaert2020-03-251-0/+1
| | | | | | | | This patch silences the exception about missing v1 api entry for the qt_add_3rdparty_library() function. Change-Id: I74a473ed1c063b13f0a9ca64dcb568b8f8b27235 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add support for bundled SQLite libraryLeander Beernaert2020-03-253-4/+4
| | | | | Change-Id: I4d3f6e3bf04eb2fcf337e2c5dbc04b6e6f8ebe0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configuration of FEATURE_JPEGLeander Beernaert2020-03-251-1/+0
| | | | | | | | Without this patch JPEG support is always disabled, even though we can build it from 3rdparty sources. Change-Id: I9e619f0ca8ec3ca3e7c58981bb6af9b33426a029 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: "Port" the c89, c99 and c11 featuresJoerg Bornemann2020-03-231-3/+0
| | | | | | | | We can ignore the tests for those features and directly ask CMake whether the compiler supports the respective language version. Change-Id: I31cd35493443fea0c6d0b0a5e641768c3bcbe736 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Consider system-assimp for conditionsAlexandru Croitor2020-03-231-0/+1
| | | | | | Change-Id: Idee55dfdd88b04792dc1485a818ab41218fa2707 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Skip inclusion of selfcover.priLeander Beernaert2020-03-191-0/+4
| | | | | | | | | Do not process selfcover.pri in the conversion as the output requires a lot of special case fixs ups. Change-Id: Iebee484db887973369b5604344a6d486f4bea20b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Don't use GUI for tests that use QT += testlib-privateAlexandru Croitor2020-03-191-3/+3
| | | | | | Change-Id: I90cac19928d6e6e30214a6480a5855479a8d4d77 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: pro2cmake: Add alternative package installation instructionsMitch Curtis2020-03-181-0/+6
| | | | | | | | | | | I kept getting Ignoring pytest: markers 'python_version >= "3.7"' don't match your environment when using the pip command, but this alternative worked. Change-Id: Ibfc7f36de04153d2247f8f62bd129b0c0c723bf2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Handle javascript files not present in qmldirAlexandru Croitor2020-03-171-0/+5
| | | | | | | | | | If a file is present in a QML_FILES variable inside a qmake .pro file, but is not listed in the static qmldir file, mark the file so no qmldir entry created for it. Change-Id: I3ec77b6eedf70ea9124bf7f447ee3477204bc4f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: pro2cmake: Handle system tiff featureAlexandru Croitor2020-03-171-0/+1
| | | | | | | | Don't exclude it, because we use it in qtimageformats. Change-Id: I0004830580dd9711cf7a5bd934ecd5a7f9036800 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Simon Hausmann2020-03-1617-192/+1503
|\
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-1617-192/+1503
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| | * Deduplicate day-name data in QLocaleXML filesEdward Welbourne2020-03-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to commit ebb0212133bd91f1da4931b29eb1d33fb77b1444. The day name data appeared twice in the XML files. Skip the second copy, saving 8.8% of the intermediate file-size. This makes no change to generated QLocale data. Change-Id: Ic2cc543a2a85cbb1d2d47ebac7df4fa9ad6ee0a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Update UCD to Revision 26Edward Welbourne2020-03-1416-190/+1503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include WordBreakTest.html, since a test uses sample strings from it, albeit without actually reading the file. Had to comment out more of the new tests, as at Revision 24, pending an update to harfbuzz and the text boundary detection code. Task-number: QTBUG-79631 Task-number: QTBUG-79418 Task-number: QTBUG-82747 Change-Id: I0082294b09d67ffdc6a9b5c15acf77ad3b86f65f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-166-29/+29
| | | | | | | | | | | | | | | | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-165-20/+20
|/ / | | | | | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: pro2cmake handle ${QT_SOURCE_TREE} for include statementsLeander Beernaert2020-03-121-0/+7
| | | | | | | | | | | | | | | | | | | | Replace ${QT_SOURCE_TREE} with top level project directory when encountered in include statements. This is required to parse tests/auto/testlib/selftests/test/test.pro. Change-Id: I80f31142cf5a35441d1424c38e21bb097e44cd0f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Reformat the python scripts using blackAlexandru Croitor2020-03-123-29/+48
| | | | | | | | | | | | Change-Id: I1e2eba46eb7c9dfefd267be91790be7898634c3a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: pro2cmake: Handle LIBS_SUFFIX define correctlyAlexandru Croitor2020-03-121-0/+12
| | | | | | | | | | | | | | | | | | Matches the LIBS_SUFFIX define we use in Android conditions and replaces it with a sane amount of escaped characters. Change-Id: I7d870f992c70b105dd80b6fa94f87d3fa5644006 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: pro2cmake: Fix opengles condition substitutionAlexandru Croitor2020-03-101-1/+1
| | | | | | | | | | | | | | | | Missing parenthesis caused wrong condiiton simplification in scopes. Change-Id: Ia2a1a97f4da36b185631a2a3c7855ae01595b0f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Remove old 3rdparty mechanism for harfbuzz-non-ngAlexandru Croitor2020-03-101-1/+0
| | | | | | | | | | | | Change-Id: I37c1e561ac83c51a06aae50ccb176094785d52f5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Remove old 3rdparty mechanism for double conversionAlexandru Croitor2020-03-103-4/+2
| | | | | | | | | | | | Change-Id: I2b20d4d9d95a1f7f59bc506046a1ebc20eb305f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Add python version requirement note to pro2cmakeAlexandru Croitor2020-03-091-0/+3
| | | | | | | | | | | | Change-Id: Iccaf61e19fb7257ed21f656c287976d7d778ed1c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Disable framework builds on macOS when target config is DebugAlexandru Croitor2020-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents Coin from trying to automatically enable the framework feature when no configuration is specified on the command line. By default if no configuration is specified, and there's a .git subfolder, "Debug" will be the chosen config, and that would conflict with the framework feature, which would cause configuration to fail. Change-Id: Ia9db3e8178794737692307b4662a2e77cc574ccd Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | CMake: Fix handling of QML_IMPORT_VERSION in pro2cmakeAlexandru Croitor2020-03-091-21/+27
| | | | | | | | | | | | Change-Id: Iaab6796204a6bb13b3d061d2589b2aebd4f342a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* | CMake: Port most of the configure summary supportAlexandru Croitor2020-03-091-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teaches configurejson2cmake about summaries / reports, so things like enabled features, configure sections, notes, etc. Add relevant CMake API for adding summary sections and entries, as well as configure reports. The commands record the passed data, and the data is later evaluated when the summary needs to be printed. This is needed, to ensure that all features are evaluated by the time the summary is printed. Some report and summary entries are not generated if they mention a feature that is explicitly exclduded by configurejson2cmake's feature mapping dictionary. This is to prevent CMake from failing at configure time when trying to evaluate an unknown feature. We should re-enable these in the future. A few custom report types are skipped by configurejson2cmake (like values of qmake CONFIG or buildParts). These will have to be addressed a case-by-case basis if still needed. Change-Id: I95d74ce34734d347681905f15a781f64b5bd5edc Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Port the 'separate_debug_info' featureJoerg Bornemann2020-03-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For this, we have to uninline the separate_debug_info configure test, because supporting the conversion of this in configurejson2cmake is not worth the hassle. Separate debug information can be turned on for a target by calling the function qt_enable_separate_debug_info. For Qt's shared libraries and tools separate debug information is generated if the 'separate_debug_info' feature is manually turned on. Change-Id: Ic2ffc15efef3794dc0aa42f3d853ef6d651a751c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Fix condition of the 'debug' featureJoerg Bornemann2020-03-061-1/+1
| | | | | | | | | | | | | | | | For the moment, in feature conditions that use STREQUAL, the lhs must be a variable. Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Handle configure.json library testsLeander Beernaert2020-03-062-118/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates configurejson2cmake.py to generate compile tests for library entries. The test also support the inherit keyword, which is currently limited to one level of inheritance. LibraryMapping has been extended with a test_library_overwrite as a means to overwrite the mapped library during a compile test. Certain tests such as openssl_headers form src/network are mapped with *_nolink libraries which do not exist when the test is run. Failing to do so will cause the test to run as it is skipped when the library target isn't found. To avoid redundant checks, the library tests need to be opt in by setting run_library_test to True on an instance of LibraryMapping. Change-Id: I607b24eda389fa67afad301c616e31bb7ab38d20 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | configurejson2cmake: Fix non-inline compile testsJoerg Bornemann2020-03-051-13/+10
| | | | | | | | | | | | | | | | | | | | If there's no test dir set, use "config.tests" as default value, and perform the check for the existence of CMakeLists.txt in configurejson2cmake, not the configure.cmake file. Change-Id: I8d3be8f2b68767c7592665c374022353c2dc6c57 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | configurejson2cmake: Fix compile tests without a "test" entryJoerg Bornemann2020-03-051-1/+4
| | | | | | | | | | | | | | | | | | Set the default value of the "test" entry to the test's name like the qmake-based configure does. Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Port the 'force_debug_info' featureJoerg Bornemann2020-03-051-1/+3
| | | | | | | | | | | | | | | | | | | | This feature is read-only and is ON if CMAKE_BUILD_TYPE is RelWithDebInfo or if that value is in CMAKE_CONFIGURATION_TYPES. It mainly exists for the qmake support. Change-Id: I25cb57e832dcfcab100834a104b1a3d34f01086b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Port the 'debug_and_release' featureJoerg Bornemann2020-03-051-1/+4
| | | | | | | | | | | | | | | | This feature is read-only. It's controlled by the multi-config feature of CMake. It mainly exists for the qmake support. Change-Id: I322459598fe92568eda4d42319ded444537e95d4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Port the 'shared' featureJoerg Bornemann2020-03-051-1/+1
| | | | | | | | | | | | | | | | This feature is read-only and supposed to be set by BUILD_SHARED_LIBS. It mainly exists for the qmake support. Change-Id: I722b0de53211d0aab1924e45a77120c890f31f50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Port the 'debug' featureJoerg Bornemann2020-03-051-1/+1
| | | | | | | | | | | | | | | | This feature is read-only and supposed to be set by variables like CMAKE_BUILD_TYPE. It mainly exists for the qmake support. Change-Id: Ic7e32cbda0f3c2d92dd446b07a3bf1a8d85ec3b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-03-043-11/+10
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-043-11/+10
| |\| | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| | * Rename the localexml module to qlocalexmlEdward Welbourne2020-03-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It implements interaction with the QLocaleXML file format type, so rename it to match. Task-number: QTBUG-81344 Change-Id: I46302d4ac1038cdfc5929e73b554b6d793814c56 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Rename the endonym members of the Locale typeEdward Welbourne2020-03-032-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other members had camelCase names, but the endonyms had prefix_endonym names, requiring munging where they were emitted to XML. So just do that munging upstream in the attribute name of the Locale objects. Makes no change to the data output by the scripts, not even to the intermediate QLocaleXML file. Task-number: QTBUG-81344 Change-Id: I01c15a822216281dc669b3e7ebda096d18b04f9b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | CMake: Remove incorrect hardcoded harfbuzz conditionAlexandru Croitor2020-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The non-system harfbuzz feature doesn't actually have a condition in the json file. Change-Id: I4b74915f28da97d6ef8f89690e91306d243913ee Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | CMake: Fix stack-protector-strong test and featureJoerg Bornemann2020-03-041-1/+5
|/ / | | | | | | | | | | | | | | | | And in order to do this we must teach qt_config_compile_test a COMPILE_OPTIONS argument. Change-Id: I66fa45142b544e3a2fc599af1c1a4c69b442b318 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Correct pro2cmake's Requirements messageEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | | | It only told me about two packages to install, so I got an error after I'd installed them and ran it, because I hadn't installed the rest. Save the next person an extra round-trip. Change-Id: I8b544fc2637b86656ec2adddce8e95e6e9e1daf5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | glgen: Fix endl warningsJohan Klokkhammer Helsing2020-02-281-169/+169
| | | | | | | | | | Change-Id: Ibb4fd83778a5d6c00cabae55c14ba3e771345aef Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | CMake: Port the reduce-relocations featureJoerg Bornemann2020-02-252-1/+15
| | | | | | | | | | | | | | | | | | | | As reduce-relocations implies bsymbolic_functions, we also add the -Bsymbolic-functions linker flag. Also, handle the .dynlist files that are passed to the linker by bsymbolic_functions.prf in the qmake build. Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Allow building bundled 3rd party libraries in qtbaseAlexandru Croitor2020-02-253-31/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few things are needed to accomplish that: - the python scripts do not ignore certain system_foo features anymore (it is a hardcoded list for now just to be safe) - configurejson2cmake now outputs qt_find_package(WrapSystemFoo) calls for bundled libraries (see below) - the harfbuzz .pro file is modified to accommodate pro2cmake not being able to correctly parse some conditional scopes - the freetype .pro file is modified to make sure linking of the library succeeds without duplicate symbol errors, which qmake doesn't encounter due to magical exclusion of cpp files that are included in other cpp files (presumably for include moc_foo.cpp support) - feature evaluation for Core, Gui, Network now happens in the qtbase/src directory, so that bundled libraries can be conditionally built - for each bundled library there are now two FindWrap scripts: - FindWrapSystemFoo which finds an installed library in the system - FindWrapFoo which either uses the system installed library or the built bundled one depending on a condition - projects that intend to use bundled libraries need to link against WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets (this is handled by pro2cmake). Unfortunately manually added qt_find_package(WrapFoo) calls might still be needed as is the case for WrapFreetype and others. - a new cmake/QtFindWrapHelper.cmake file is added that provides a macro to simplify creation of WrapFoo targets that link against a bundled or system library. The implementation is fairly ugly due to CMake macro constraints, but it was deemed better than copy-pasting a bunch of almost identical code across all FindWrapFoo.cmake files. - a qtzlib header-only module is now created when using bundled zlib, to provide public syncqt created headers for consumers that need them. These are projects that have 'QT_PRIVATE += zlib-private' in their .pro files (e.g. qtimageformats, qtlocation, qt3d, etc.) This is unfortunately needed due to QtNetwork using zlib types in its private C++ API. The change includes support for building the following bundled libraries: - zlib - libpng - libjpeg - Freetype - Harfbuzz-ng - PCRE2 The following 3rd party libraries are still using an old implementation within the CMake build system, and should be migrated to the new one in the near future: - double-conversion - Old harfbuzz The are a few libraries that are not yet ported: - system-sqlite - systemxcb - maybe others Among other things, this change allows building qtbase on Windows without requiring vcpkg. Task-number: QTBUG-82167 Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>