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>
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>
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>
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>
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>
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
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>
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
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>
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>