summaryrefslogtreecommitdiffstats
path: root/util/cmake/run_pro2cmake.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix pro2cmake formattingSimon Hausmann2019-11-231-6/+3
| | | | | | | | | ... by running make format. Change-Id: I523a48abd2c483107f5c16c24daa695fcc0a55e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CMake Build Bot
* pro2cmake: Allow limiting the number of projects to convertAlexandru Croitor2019-11-141-0/+17
| | | | | | Change-Id: I7c06d530cb98cc07e4a618427a7cf7b5c70aa171 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Allow passing args from run_pro2cmake to pro2cmakeAlexandru Croitor2019-11-131-3/+18
| | | | | | Change-Id: Ic874d4cd3488903ffec438f5c127b589e6371f7a Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* pro2cmake: Allow skipping subdirs projects via command lineAlexandru Croitor2019-11-121-0/+8
| | | | | | | | | | Pass either --skip-subdirs-project to pro2cmake or --skip-subdirs-projects to run_pro2cmake. Change-Id: Ic444858f6fc6deb3c893782c0770993aa39d5579 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake scripts: more type cleanupFrederik Gladhorn2019-10-091-1/+1
| | | | | Change-Id: Ic32394548bb997af96756f260b453e830d8b9e9b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* run_pro2cmake: Fix the file preference sorterAlexandru Croitor2019-10-081-1/+3
| | | | | | | | | | | | When invoking the script with "." as the only argument, and there are multiple .pro files in the current directory, the script would not choose the correct preferred .pro file (the one that has the same name as the current directory). Fix the sorter to handle such a case. Change-Id: I6df70d7c577649f8854bca9b8879f13bdb1b4d26 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix run_pro2cmake only_qtbase_main_modules optionAlexandru Croitor2019-09-271-1/+1
| | | | | | | | | There was a missing f prefix for the f-string, and thus no replacements were done. Change-Id: If778d4ce25905c302de22a76c27af00a63f3c515 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add option to generate pro2cmake on failed onesCristian Maureira-Fredes2019-09-181-0/+11
| | | | | | | | The option --only-missing was added to check only the cases where there is a pro file and not a CMakeLists.txt Change-Id: Ifc6233552757e0afe8e7242a79f958e8bc77f823 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve styling of util/cmake scriptsCristian Maureira-Fredes2019-09-181-45/+64
| | | | | | | | | | | | | | | | | | | | | | flake8 was used to evaluate the file, with a couple of exeptions: E501,E266,W503 black was used to reformat the code automatically The changes were: * Added a README that explains how to use pipenv and pip, * Remove unnecessary return statements, * Remove '\' from the end of the lines, * Use f-strings (>= 3.6) since we are requiring Python 3.7, * Commenting unused variables, * Adding assert when Python >= 3.7 is not being used, * Wrapping long lines to 100 (Qt Style), * Re-factoring some lines, * Re-ordering imports, * Naming `except` for sympy (SympifyError, TypeError) Change-Id: Ie05f754e7d8ee4bf427117c58e0eb1b903202933 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* run_pro2cmake.py: Run on WindowsFriedemann Kleint2019-09-171-2/+6
| | | | | | | | | Prefix by python executable and drop os.nice. Change-Id: Idd1d0de6695887652db84261da1130a084e5af78 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* Extend run_pro2cmake.py to pass --is-example to pro2cmakeLeander Beernaert2019-08-231-1/+7
| | | | | | | | | Add command line argument to make run_pro2cmake invoke pro2cmake with the --is-example option so we can convert examples in bulk. Change-Id: I162eddffc509f16a97de5517698e8daca5207b74 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve run_pro2cmake.pyAlexandru Croitor2019-06-051-33/+104
| | | | | | | | | | | | | | | | | | Add two new options: If you pass --only-existing, the pro2cmake script will only be executed on .pro files that already have a CMakeLists.txt next to them. This is useful if you modify pro2cmake, and only want to regenerate existing files. If you pass --only-qtbase-main-modules, the script will be executed on the main modules in qtbase/src. This is useful if you want to check if your pro2cmake modification works correctly on the more complicated projects. Change-Id: I5228411a252dbef6d77f01ca742a7b98583c5a75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Do not overwrite CMakeLists.txt when running run_pro2cmakeJędrzej Nowacki2019-03-281-2/+26
| | | | | | | | | | | | One directory may contain many pro files. The generator was happily generating the same CMakeLists.txt for all of them (overwriting). This patch implements a different logic. It tries to find the main pro file and skips others assuming that somehow implicitly they will be incorporated (for example through SUBDIRS). Change-Id: Ie07d75e900a96dd48bf981a896c9dfb920f39a23 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Speedup run_pro2cmakeJędrzej Nowacki2019-03-261-11/+23
| | | | | | | | | | We can use all cores. Sadly it doesn't balance cores well as corelib.pro takes most of the time anyway, but the speedup is visible from ~15 to 5 min. Change-Id: Id8209c58491b38d19c6e9f1163d366c3e33a182c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: run_pro2cmake.py: Add statisticsTobias Hunger2019-02-281-4/+20
| | | | | Change-Id: I78e65970694d0c37c4b3c3ba6e6a83155579ea0f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Begin port of qtbase to CMakeSimon Hausmann2018-11-011-0/+44
Done-by: Alexandru Croitor <alexandru.croitor@qt.io> Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-by: Kevin Funk <kevin.funk@kdab.com> Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Done-by: Simon Hausmann <simon.hausmann@qt.io> Done-by: Tobias Hunger <tobias.hunger@qt.io> Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-by: Volker Krause <volker.krause@kdab.com> Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>