summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Rework qlocalexml2cpp.py to use writers based on TranscriberEdward Welbourne2020-04-021-508/+438
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This saves repetition of temporary-file manipulation code. In the process, ensure that we tidy away temporary files on failure. Moved a comment in qlocale.h to *outside* the re-written portion, to save having to rewrite it every time. Added blank lines to separate script data from country data in the generated output. Changed 0s in one comment to zeros, to match another comment. Isolated use of sys to the __main__ block. Isolated use of enumdata to the new LocaleHeaderWriter class. Modernised all the string-formatting I touched. Task-number: QTBUG-81344 Change-Id: I5768e45d9a8ea23facc303b3dd8af8b3ccbf7ff2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Rework cldr2qtimezone.py into more maintainable formEdward Welbourne2020-04-021-165/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke out the updating of a source file to a ZoneIdWriter helper class, which enables tidying away the temporary file if we fail. Collected up the rest of the script into a main() that's now called from a __name__ == '__main__' block. Rationalized the imports. Eliminated an inefficient lookup function by constructing a suitable dict() before entering the loop that needed it. Separated the "data you might need to update" tables from the code that does the work, to make it easier for those adding support for new zones to see what they're doing. Removed the spurious $Revision$ from the output and reworded the premable of the generated file. (It would seem CLDR no longer uses an RCS-based version-control system.) Generated output is otherwise unchanged. Task-number: QTBUG-81344 Change-Id: I7d9de8357ebcb599d154de9f862e25f7ade00390 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Add tools to localetools to facilitate source file recreationEdward Welbourne2020-04-021-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now unused; later commits shall put them to use. Transcriber -- base, takes care of tempfile and renaming. SourceFileEditor -- handles copying parts before and after a common delimiter. Task-number: QTBUG-81344 Change-Id: I28cf977d0a08825fbb873fb330da6823b88ad3ed Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Move some shared code to a localetools moduleEdward Welbourne2020-04-026-75/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The time-zone script was importing two functions from the locale data generation script. Move them to a separate module, to which I'll shortly add some more shared utilities. Cleaned up some imports in the process. Combined qlocalexml2cpp's and xpathlit's error classes into a new Error class in the new module and made it a bit more like a proper python error class. Task-number: QTBUG-81344 Change-Id: Idbe0139ba9aaa2f823b8f7216dee1d2539c18b75 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Move qlocalexml2cpp.py's XML-reading to QLocaleXmlReaderEdward Welbourne2020-04-022-277/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new class mirrors the existing QLocaleXmlWriter and places the two side-by-side in qlocalexml.py, rather than having the writing and reading in separate places. Made judicious use of transformed versions of mappings to save repeated iteration of a mapping's entries to do lookups on fist entries of pair-values; several (id, name, code) data-sets are sometimes indexed by id, sometimes by name. Reworked the default_map, that the complicated compareLocaleKeys() used in sorting locale keys, to map IDs instead of names; the function also needed the locale_map so that it could convert IDs to names, which we can skip by going directly with IDs. Task-number: QTBUG-81344 Change-Id: Iff6a97f7f0755b56dda70d8a6796ec074c558910 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Rework cldr2qlocalexml.py in terms of a QLocaleXmlWriter classEdward Welbourne2020-04-022-197/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delegate the output of XML to a helper class provided by qlocalexml.py and restructure the driver script so that it can be imported without running anything. It now has a minimal __name__ == '__main__' block that calls a main() function. This, for the moment, requires a global via which it shares the CLDR directory with various other functions; that shall go away in a later commit. Task-number: QTBUG-81344 Change-Id: Ica2d3ec09f2d38ba42fd930258cc765283f29a71 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | CMake: Handle finding of OpenSSL headers correctlyAlexandru Croitor2020-04-082-6/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Coin when provisioning for Android, we download and configure the OpenSSL package, but don't actually build it. This means that find_package(OpenSSL) can find the headers, but not the library, and thus the package is marked as not found. Previously the openssl_headers feature used the result of finding the OpenSSL package, which led to it being disabled in the above described Android case. Introduce 2 new find scripts FindWrapOpenSSL and FindWrapOpenSSLHeaders. FindWrapOpenSSLHeaders wraps FindOpenSSL, and checks if the headers were found, regardless of the OpenSSL_FOUND value, which can be used for implementing the openssl_headers feature. FindWrapOpenSSL uses FindWrapOpenSSLHeaders, and simply wraps the OpenSSL target if available. The find scripts also have to set CMAKE_FIND_ROOT_PATH for Android. Otherwise when someone passes in an OPENSSL_ROOT_DIR, its value will always be prepended to the Android sysroot, causing the package not to be found. Adjust the mapping in helper.py to use the targets created by these find scripts. This also replaces the openssl/nolink target. Adjust the projects and tests to use the new target names. Adjust the compile tests for dtls and oscp to use the WrapOpenSSLHeaders target, so that the features can be enabled even if the library is dlopen-ed (like on Android). Task-number: QTBUG-83371 Change-Id: I738600e5aafef47a57e1db070be40116ca8ab995 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | CMake: pro2cmake: Handle $$PWD in included .pri files correct-ishAlexandru Croitor2020-04-081-1/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the $$PWD was evaluated within the including .pro file, which generated incorrect relative paths to source files. Now we use a horrible hack to evaluate keys ending with SOURCES and HEADERS. If such is a case, use a map_file transformer which will use the included scope, thus creating correct relative paths. Fixes projects in qtdeclarative like src/qmltypregistrar and qmllint. Checked that it doesn't break projects in qtdeclarative and qtbase. Change-Id: I21f1e4c638c2cf8d0f67e94e1a583ebc54c175a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: Implement proper exclusion of tools including installingAlexandru Croitor2020-04-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous approach didn't work for prefix builds. While a target might be excluded from building via EXCLUDE_FROM_ALL property, when calling make install it would still try to install the target and thus fail. It's not possible to modify an install() command in a post-processing step, so we switch the semantics around. pro2cmake will now write a qt_exclude_tool_directories_from_default_target() call before adding subdirectories. This will set an internal variable with a list of the given subdirectories, which is checked by qt_add_executable. If the current source dir matches one of the given subdirectories, the EXCLUDE_FROM_ALL property is set both for the target and the qt_install() command. This should fix the failing Android prefix builds of qttools. Amends 622894f96e93d62147a28a6f37b7ee6a90d74042 Change-Id: Ia19323a2ef72a3fb9cb752ad2d4f2742269d11c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | CMake: Port the 'static' featureJoerg Bornemann2020-04-061-1/+0
| | | | | | | | | | | | | | | | Now that we have the 'shared' feature implemented we can easily port the 'static' feature. Change-Id: Ia9b54b68d532d73c3d62d12a86c9e8b83e7909c8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Reformat python scriptsAlexandru Croitor2020-04-062-9/+10
| | | | | | | | | | | | Change-Id: I1dfac318cdbbc4b4b7c76b113edca7db8f52f56b Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: pro2cmake: Allow specifiying custom output fileAlexandru Croitor2020-04-061-5/+24
| | | | | | | | | | | | Change-Id: If984d2bbc3e4b655a5eb58c68b282e3d13d51218 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | CMake: configurejson2cmake: Port precompile_header featureAlexandru Croitor2020-04-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | We don't need the test, we can just check the value of BUILD_WITH_PCH to know whether the feature is enabled. Regenerate configure.cmake files. Change-Id: I5691a22af2913bc398f99825e0c41cf2daf5a587 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add Qt Core5Compat to the library mappingSona Kurazyan2020-04-031-0/+1
| | | | | | | | | | | | Change-Id: Iad613c75705b09f7ae043cff417b0fcf3f5dd946 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: pro2cmake: Skip conversion of doc snippetsAlexandru Croitor2020-04-031-0/+5
| | | | | | | | | | | | | | | | Most of them are hand-written. Change-Id: Ia3d83cdc9e279420c9b4700993b428e10cf8fb22 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Make sure that the library config.test is used for assimpAlexandru Croitor2020-04-031-1/+9
| | | | | | | | | | | | Change-Id: Ia5b2a2ffca2dda460a323fd3f564c548be84c0aa Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Handle standalone config.tests in configure libraries sectionAlexandru Croitor2020-04-032-16/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some library entries in configure.json have a test entry. An example is assimp in qtquick3d. qmake tries to find the library via the sources section, and then tries to compile the test found in config.tests/assimp/assimp.pro while automagically passing it the include and link flags it found for assimp. We didn't handle that in CMake, and now we kind of do. configurejson2cmake will now create a corresponding qt_config_compile_test call where it will pass a list of packages and libraries to find and link against. pro2cmake will in turn generate new code for the standalone config.test project. This code will iterate over packages that need to be found (like WrapAssimp) and then link against a list of passed-in targets. In this way the config.test/assimp/main.cpp file can successfully use assimp code (due to propagated include headers). qt_config_compile_test is augmented to take a new PACKAGES argument, with an example as follows PACKAGES PACKAGE Foo 6 COMPONENTS Bar PACKAGE Baz REQUIRED The arguments will be parsed and passed to the try_compile project, to call find_package() on them. We also need to pass the C/C++ standard values to the try_compile project, as well as other try_compile specific flags, like the toolchain, as given by qt_get_platform_try_compile_vars(). Change-Id: I4a3f76c75309c70c78e580b80114b33870b2cf79 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Allow excluding tools and apps from the default 'all' targetAlexandru Croitor2020-04-022-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt uses the qtNomakeTools() function to mark a directory which will not be built as part of the default target. This is especially important when cross-compiling (to iOS for example) because the build process might fail. The condition for not building these "GUI tool sub-directory projects" is the absence of the "tools" value in qmake's QT_BUILD_PARTS variable. Introduce a QT_NO_MAKE_TOOLS CMake variable. If the value is true, it's equivalent to "tools" not being present in QT_BUILD_PARTS. Introduce qt_exclude_tool_directories_from_default_target(). It's the qmake counter part to qtNomakeTools(). Teach pro2cmake to generate it where appropriate. Change-Id: If2e5958d91847ab139af0e452608510286e73fa0 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Report which qt parts will be built by defaultAlexandru Croitor2020-04-021-0/+3
| | | | | | | | | | | | | | | | | | Like libs, tools, examples, tests. Built by default means they are part of the default make / ninja target. Change-Id: I304e5724fc5dbd39626e9d589a6e1e92a4dd7882 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | 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>