summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Add support for benchmark conversionLeander Beernaert2019-11-041-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert benchmark executables to add_qt_benchmark(). Currently add_qt_benchmark just calls add_qt_executable() and ensures that it they build under CMAKE_CURRENT_BUILD_DIR and do not install. Add QT_BUILD_BENCHMARKS option to enable/disable building of benchmarks. Change-Id: Id0bc676698d21d50048d97d9abef51d92ccb6638 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Prevent infinite recursionFrederik Gladhorn2019-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qtvirtualkeyboard/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/lipicommon.pri we have TARGET = $$TARGET$$qtPlatformTargetSuffix which keeps on recursing. Change-Id: Ia0e020c7258cd87bba9b9681ed7b4568e8f0c9c2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Fix formatting to conform to black rulesSimon Hausmann2019-10-292-24/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ran make format. Change-Id: Ib4fc021c30834a69a9a5df653435dd92dc6a9c05 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Add replacement for '*g++*' to pro2cmake.pyLeander Beernaert2019-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I3dc04a6169a98b7ff22392b979e743c41d6e0475 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Distinguish between qt_plugin and regular pluginsLeander Beernaert2019-10-281-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we do not encounter the load(qt_plugin) statement in the .pro file but we do see the entry CONFIG+=plugin, treat the target as a regular CMake library instead of treating it as a qt_plugin by default. Change-Id: I67ad5c865a1a5ab691a6b0d86c2db4b686aa04dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Convert ANDROID_PACKAGE_SOURCE_DIR for android (pro2cmake)Leander Beernaert2019-10-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I76730852e4433d095bc42ff617254a77f2d1bf51 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | cmake scripts: do not override local target through includesFrederik Gladhorn2019-10-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for tests/auto/gui/kernel/qguiapplication which includes the qcoreapplication test. Without this change, the target name is taken from the included .pro file, instead of from the current file. Change-Id: I2d8a207fd70a49ad956fb9a83a59811d89682082 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | cmake scripts: do not add spaces in empty linesFrederik Gladhorn2019-10-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding resources inside a condition, we'd end up with lines containing just spaces. Change-Id: I623203d042e2492bdd72f97d8b9d90517040b0df Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | cmake scripts: handle aix-g++Frederik Gladhorn2019-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I62b9e9fa9aae3350dc8c668a98453c2373c1a709 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Handle Library dependencies in compile testsLeander Beernaert2019-10-211-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update configurejson2cmake.py to also write out the libraries compile tests depend on. Change-Id: I22dbc227a33b9b5d39a2198c6ee6062e7e1bf3de Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Add conversion code for Java codeLeander Beernaert2019-10-181-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to pro2cmake to convert java code for android. Add support to override API_LEVEL for the Android sdk jar file. If the sdk is not found, we'll default to the one located by QT_ANDROID_JAR. Change-Id: If0b746dc7f9148ac43e6592a4a4dd23d46bbd4cd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Fix C++ standard detectionSimon Hausmann2019-10-171-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot use a generator expression in an if statement, it does not work. Instead, we could inspect the CMAKE_C/CXX_COMPILE_FEATURES list, but unfortunately that's not reliable. For example it detects that ICPC supports C++17 when in fact that depends on the installed libstdc++. Therefore this patch revives our own configure tests. Change-Id: Ic3bc5762fbe81837722523e3881ac16e84628519 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Fix message about missing portalockerOliver Wolff2019-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia82c0aab7c9085eee8a07c4a15485c0804e65e5a Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
| * | | Fix add_qt_resource condition scopesLeander Beernaert2019-10-151-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to add_qt_resource from extend_target were not being wrapped in a condition scope. Change-Id: I78cf889fcf4663660fd870bfb93eec90a4ca1c47 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Update android arch condition conversionLeander Beernaert2019-10-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only convert the architectures if they are in a stand alone form. This means conditions such as 'if(x86 OR x86_64)', 'if(x86)', among others. This also correctly converts statements such as 'equals(QT_ARCH,x86)'. Change-Id: I1c3b8580ff9e4077c03a229d894d2bd3d95dba3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Regenerate files after dev -> wip/cmake mergeAlexandru Croitor2019-10-142-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note the following bigger things that had to be done: Handle GSS library / feature with a new custom find module. Implement rudimentary support for relocatability (does not currently handle extprefix). Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-64/+38
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * | | | Fix up android architecture suffixingSimon Hausmann2019-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't globally map any variable use of QT_ARCH to ANDROID_ABI, as that'll break if somebody uses it in a different context. Instead the CMAKE_SYSTEM_PROCESSOR variable provides a reasonable value and it is also set by the Android toolchain files. Change-Id: Ibf203c39db586bbec5b800a365d83b3a509dbb62 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Fix Android build from multi-arch qmake changesLeander Beernaert2019-10-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add condition replacements for the android ABIs. Add a replacement for QT_ARCH to ANDROID_ABI, since QT_ARCH is only used with the android build for now. Change-Id: I553d7910546de32236f723ec2e9a05a18da76130 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Run blake on pro2cmake.pyLeander Beernaert2019-10-141-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I16cc7058f817d22e2c72fb6d42c472250a7e6cfb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Handle empty contents for condition scopes in examplesLeander Beernaert2019-10-141-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only print condition scopes when there is something to print. Change-Id: I24151ca4834317940712b6173046abe91aac5628 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-113-68/+173
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
| * | | | | pro2cmake: Translate C++ standard version checksJoerg Bornemann2019-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate checks like contains(QT_CONFIG, c++11) to cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES Also allows contains(CONFIG, c++11) and different versions of course. Change-Id: I0f51a1ee7c92df6b87c31d0fb64c22fdba2002ec Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | pro2cmake: Handle source files in example scopesAlexandru Croitor2019-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I653801d6b13eb144719a4e6eac4779b1cd15e75c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | pro2cmake: Handle simd assignments in scopesAlexandru Croitor2019-10-111-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to process simd assignments in scopes by enclosing the add_qt_simd calls into if blocks. Change-Id: I3c7f2466cfa5bb0136d40deffb190ea8aabfb572 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | Expand test install pathLeander Beernaert2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand target.path value for tests. Change-Id: Ic35122b0ef1440950c0ef2ba9a04e8697ca2cdfe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Minor fix to qt_process_qlalr APISimon Hausmann2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's probably best to make it follow the usual calling convention that the associated (consuming) target is the first parameter of the function. So first this change accepts both formats. Change-Id: I1f20706b23d5e819e0eb689eecedb3afb49df3b7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Add SKIP_INSTALL to add_qt_plugin()Leander Beernaert2019-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a SKIP_INSTALL argument to add_qt_plugin for test cases with plugins lacking install information. Change-Id: Iddb3843fab1790d69d64686530a46057a2ff0477 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Fix styling of configurejson2cmake script to make flake8 happyAlexandru Croitor2019-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends a986455d108d99ebc8234b9bfab2407c33422e41 Change-Id: I5a6327f5bfd9d73e518f0ec1d9bb418282c45077 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | configurejson2cmake: Re-add wayland_server library for qtbaseAlexandru Croitor2019-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now there are two of them, one used in qtbase and one in qtwayland. In the future we should merge them. Amends 08aba5ea0ab4196779c79a4e8d8ba6d510b14e12 Change-Id: Ife98df28c762836277a02a34dd07e82ce7a1e871 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | | | | cmake scripts: format with blackFrederik Gladhorn2019-10-113-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is agreement to use black for formatting, run it and make flake8 happy with its output. Change-Id: I800d764a50cacba0eac1d8efb5c1dee0cf10a4ad Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | cmake scripts: minor cleanupFrederik Gladhorn2019-10-113-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not in is considered easier to read and thus recommended (flake8) and avoid one temporary name that is never used. Adjust flake8 to be compatible with black formatting. Change-Id: Ia049adb2344f11b53c78574972f6d9d670f4e66d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
| * | | | | cmake scripts: make pro_conversion_rate.py mypy cleanFrederik Gladhorn2019-10-101-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id5b210361b6df61bb54324507fcff259cc4091e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * | | | | Fix invalid condition in module generationLeander Beernaert2019-10-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix invalid condition which would cause valid qt modules not to be written out as modules. Change-Id: Id4b408f2502a34c011595c4602145b6980ee9d58 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Reformat conversion scripts with blackAlexandru Croitor2019-10-103-32/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ida7d42dc86c81315bc0727839a620fb68b7f0268 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | cmake scripts: flake8 cleanupFrederik Gladhorn2019-10-104-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least setting the example install dir looks like a bug. Change-Id: Ibcced739d05de5445fa455e509cc6f42b9ed935b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Add 'add_cmake_library' to QtBuild.cmakeLeander Beernaert2019-10-101-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add add_cmake_library to allow us to create normal cmake targets using all the information we have collected via the conversion script. This function is only meant for tests. For an example, see tests/auto/corelib/plugin/qpluginloader/lib/lib.pro. Change-Id: I738cb8ac241b8da1a1da3ef957c24dc7a754d43f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | cmake scripts: add portalocker as dependency for PipenvFrederik Gladhorn2019-10-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0b377e042a7abe69664776a6676df53e601c07af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Add a makefile to conveniently run python testsFrederik Gladhorn2019-10-103-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9b1bbc9b21d9292eac60715116f02533563fa606 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Set STATIC argument for pluginsLeander Beernaert2019-10-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the STATIC argument when we have 'static' in the qmake configuration. Change-Id: Ia8369bbd5ec4cfce0be51f36c61a811d53522729 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | cmake scripts: move parser into separate fileFrederik Gladhorn2019-10-104-347/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is nicely separated between parsing and processing. Splitting that into two files makes it easier to follow which function belongs to which part. Change-Id: I576b8613b0d05b2dae3f9c6fa65d9ed5b582a0f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | cmake scripts: fix test_scope_handlingFrederik Gladhorn2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file parameter for a new Scope got renamed to qmake_file. Change-Id: I6cb9d010892f3e3132fac09eead1dbf45d6ba86d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Add install directory for plugins without typeLeander Beernaert2019-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we run into a plugin that does not have a type and is not a qml plugin, we try to see if we can find the target installation path and provide INSTALL_DIRECTORY AND ARCHIVE_INSTALL_DIRECTORY to the add_qt_plugin call. We run into this frequently with the unit tests. This patch also changes add_qt_plugin() to use the value provided in INSTALL_DIRECTORY for ARCHIVE_INSTALL_DIRECTORY if no value is provided for the latter. Change-Id: I61278904a4d2d72308079cd362bd085b4e2f540c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | cmake scripts: add mapping for mkspec conditionsFrederik Gladhorn2019-10-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves for example tests/auto/tools/moc/moc.pro conversion. Change-Id: I80f82be75299a0407be510824df35f0ea101c0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
| * | | | | pro2cmake: Make condition cache work well with run_pro2cmakeAlexandru Croitor2019-10-102-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using run_pro2cmake, multiple pro2cmake processes try to access and override the condition cache. Make sure that reads / writes of the cache file are protected by a file lock, and the content is merged rather than overridden. This requires use of a new pip package, portalocker. The script will tell the user to install it if it's missing. Change-Id: I44798c46ff0912981b186bec40e3e918f249fb4d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | cmake scripts: when writing resources, replace OUT_PWDFrederik Gladhorn2019-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed in tests/auto/corelib/plugin/qfactoryloader/test/ for example. Change-Id: I5a2904e25d2895355fe11d4fc3e2e7c742346e42 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Use regular -framework for examplesLeander Beernaert2019-10-091-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not replace framework libraries in examples as they tend to use only system level frameworks. Change-Id: Ide604b3ecc90f1f4c81b9ddaaa8e0a5acb486080 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Extract public/private libraries from scope for ExamplesLeander Beernaert2019-10-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Public/public libraries were always processed from the global scope. Change-Id: I1223f04f100f91790ced1da41fda2fb9b52c5987 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Add scope conditions for examplesLeander Beernaert2019-10-091-29/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update example conversion to process scopes and conditions. Change-Id: If1bbbd25092a8d5371b2d1fa2830d91e5aa591c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | cmake scripts: Do not add empty child conditions into condition listFrederik Gladhorn2019-10-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c.condition can be None, there is no point in adding it into the set of conditions. An example is tests/auto/corelib/codecs/qtextcodec/test.pro Initializing the set to an empty set instead of None makes mypy happy, since we could otherwise end up passing None where frozenset was expected. Change-Id: If88a86d810b4c55aae7f1ee97a62db559abfc86d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>