summaryrefslogtreecommitdiffstats
path: root/util/cmake/condition_simplifier_cache.py
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove pro2cmake and configurejson2cmakeAlexandru Croitor2025-02-111-154/+0
| | | | | | | | | | | | | | | | Most qt repos and modules are now ported from qmake to CMake. The CMake API for internal Qt modules has evolved, and these tools have not been kept up-to-date. It's time to remove them. Developers can still use qmake2cmake for their own user projects, which is hosted in a different repo. If we do end up needing the scripts again, they can be used from one of the older branches like 6.9. Fixes: QTBUG-133678 Change-Id: I8d9a765f2575a6c0fcfe9a0346a06a7eec302914 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* pro2cmake: Fix static type errors in condition_simplifier_cache.pyJoerg Bornemann2022-03-031-5/+1
| | | | | | | | | | | | | | | | | Mypy reported the following: condition_simplifier_cache.py:111: error: Argument 1 has incompatible type "*List[str]"; expected "Optional[float]" file_handle = file_open_func(*file_open_args, **file_open_kwargs) ^ condition_simplifier_cache.py:111: error: Argument 2 has incompatible type "**Dict[str, object]"; expected "Union[str, Path]" file_handle = file_open_func(*file_open_args, **file_open_kwargs) Fix by calling portalocker.Lock directly. Change-Id: I538319791b1a4a1b6dffac0544d87c705e8809a7 Reviewed-by: Alexandru Croitor <[email protected]>
* Fix message about missing portalockerOliver Wolff2019-10-151-1/+1
| | | | | Change-Id: Ia82c0aab7c9085eee8a07c4a15485c0804e65e5a Reviewed-by: Mårten Nordheim <[email protected]>
* 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 <[email protected]> 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Qt CMake Build Bot