summaryrefslogtreecommitdiffstats
path: root/util/cmake/condition_simplifier_cache.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix message about missing portalockerOliver Wolff2019-10-151-1/+1
| | | | | Change-Id: Ia82c0aab7c9085eee8a07c4a15485c0804e65e5a Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
* cmake scripts: minor cleanupFrederik Gladhorn2019-10-111-1/+1
| | | | | | | | | | 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
* pro2cmake: Make condition cache work well with run_pro2cmakeAlexandru Croitor2019-10-101-6/+69
| | | | | | | | | | | | | | 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: fix type issuesFrederik Gladhorn2019-10-091-3/+3
| | | | | | | | Some of the changes are just cosmetic, but a bunch of them must be bugs, such as mixing lists and str randomly. Change-Id: Idd8340e17bcea7af3b87e595e251e13f5df1aa3f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Allow disabling condition cacheAlexandru Croitor2019-10-071-1/+8
| | | | | | | | | New option --skip-condition-cache allows forcing recomputation of condition simplification. Useful when debugging certain condition mappings. Change-Id: I68a85c2e4085ad7a3043d7334db71a334a6469e9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement persistent caching for simplify_conditionAlexandru Croitor2019-10-011-0/+113
Store the results of simplify_condition in a json cache file, next to the pro2cmake.py script. Dramatically speeds up re-conversion of projects. The cache is cleared whenever the content of the condition_simplifier.py file changes, effectively presuming that the condition computing code has changed. Sample times. Initial corelib.pro conversion - 142.13 seconds. Next re-conversion with hot cache - 1.17 seconds. Change-Id: I8790b2736358236e4b23bcb5f10f45a36fdfa426 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot