summaryrefslogtreecommitdiffstats
path: root/src/tools/ifcodegen/generate.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix references to Jinja sourcesZoltan Gera10 days1-4/+4
| | | | | | | | | | Include and import references to Jinja sources and build system references to template files are fixed to use the changed extensions. Task-number: QTBUG-140720 Pick-to: 6.11 Change-Id: I427264a45fc3eca5aaea92e7a2cac19cce44b5b7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add flag for capturing target platform in generatorShveta Mittal2024-11-221-7/+9
| | | | | | | | This commit introduces a new flag to the generator to capture the target platform. This information will be passed from CMake to the Jinja templates, allowing for dynamic decision-making within the templates based on the specified target platform. Task-number: QTBUG-130661 Change-Id: I95fd6e075671b961c413c79a6342b538a96dd0f4 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* ifcodegen: Integrate a selfcheck modeDominik Holland2024-08-081-1/+84
| | | | | | | | | | | | | This selfcheck mode creates a small qface file and a minimal template inside a temp folder and runs the generator. In case the generation fails a error message is shown to help the developers to identify the problem and how to workaround it. The new selfcheck is automatically executed after building ifcodegen. Pick-to: 6.8 6.7 6.5 6.2 Change-Id: I04838f14908de3a175aecf38d6a80e48fa33f891 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Update the bundled qface to the latest version (2.0.10)Dominik Holland2024-08-011-2/+2
| | | | | | | Change-Id: I6b24049df326be28b7a898a42ff2f72a51a61522 Pick-to: 6.8 6.7 6.5 Fixes: QTBUG-127627 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ifcodegen: Add support for deprecating annotationsDominik Holland2023-08-101-0/+30
| | | | | | | | | | When a deprecated annotation is used a warning is printed. The CMake integration has been improved to also forward those warnings to the user. Pick-to: 6.6 Change-Id: Ib77dcbb58f9697b8dfb1f2cf837319f371a0578e Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ifcodegen: Add support to load extra jinja filtersDominik Holland2022-10-181-0/+5
| | | | | | | | | | | | | | In addition to allow a filters.py which can be part of a custom template folder, there is now also a way to load filters from other locations. The extra_filters are configured in the generation yaml file and can load files from other templates or common folders within the template search path. Fixes: QTBUG-107005 Change-Id: I518ff96659a3792fbb2a1d64ffc1d5c40eb69767 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Use SPDX license identifiersDominik Holland2022-06-151-30/+5
| | | | | | | | | | | | 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. Change-Id: I601c778c0e88c61cda97ef3bd0259faf39b915e5 Pick-to: 6.4 Task-number: QTBUG-67283 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ifcodegen: Update the generated comment to reflect the new module nameDominik Holland2022-02-231-1/+7
| | | | | | Pick-to: 6.2 6.3 Change-Id: Ie84890c29a2b56b5994ec42c83921359e4318745 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* cmake: Better cross-compilation supportDominik Holland2021-08-241-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | Start using the ifcodegen from the host Qt, instead of building and installing a new ifcodegen into the target Qt. As a consequence the templates are now separate from the generator, similar to mkspecs and qmake binary. This change introduces a new qt_ensure_ifcodegen() function which detects the correct ifcodegen binary and the correct template location and stores them as CACHE variables. Similar to other build tools, the ifcodegen is now installed to libexec, while the templates are installed to archdata. The config log and summary shows which codegen location is used and depending on that the related Python information. Change-Id: I20043a122d2af5acfab4629892ae2f0e46962993 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Refactor the ifcodegen CMake APIDominik Holland2021-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The new API consists of three public functions: ifcodegen_generate: Generates code but doesn't import it to CMake ifcodegen_extend_target: Extends a given target by autogenerated code. ifcodegen_import_variables: Imports CMake variablse from the autogenerated code, in order to use your own CMake logic for building. The latter two function are also generating code by default, but this can be disabled by passing the NO_GENERATE option. The IFCODEGEN_ prefix for all input variables as been dropped to be more in line with all other cmake functions. Change-Id: I62a1b88717655ad8df0c54ca5a92eacbde3d5b83 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Update the bundled qface to the latest version (2.0.4)Dominik Holland2021-07-071-2/+2
| | | | | | | | Also change the configure check to allow newer releases of qface, instead of expecting the exact version. Change-Id: I7376ee4b8d8ec08e6a3023c86bbf366f7f8269c9 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* ifcodegen: Streamline the naming for the various input variablesDominik Holland2021-07-051-4/+4
| | | | | | | | | | | | All qmake variables which were previously prefixed with QFACE_ are now prefixed with IFCODEGEN_ to match the new name of the generator and also match the prf file name. The --format argument of the generator (QFACE_FORMAT) will be renamed to --template and the new qmake variable name is IFCODEGEN_TEMPLATE. Change-Id: If5166091335bd12f71c82ffb93f9de3c6a60c92f Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Rename all files to match the new module nameDominik Holland2021-06-161-0/+218
This is a follow-up of the previous commit. Task-number: AUTOSUITE-1633 Change-Id: I6feb63a346a4c94c434df83cd1255904fe8acc68 Reviewed-by: Robert Griebl <robert.griebl@qt.io>