| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Pick-to: 6.8 6.7 6.5 6.2
Change-Id: I88223dbbd85a6bcfd8f14323ee884dd435d5c7a8
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Also make sure to show a FATAL_ERROR in case we couldn't find
a working venv.
Pick-to: 6.8
Change-Id: I2e4663a312eb163290cddf59e430d905498b8c95
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The new default OUTPUT_DIRECTORY is now the URI with dots replaced
by forward slashes.
Pick-to: 6.8
Change-Id: I1a3b069483ca7d37731effc49d3fb0d5f537ed12
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user can set the output folder for code generation to be the current
binary folder of the build. In this case, a simple prefix check is
passing while the current folder can contain other cmake-related data
which is removed unintentionally. Removing the folder should only be
done if the output folder is a real subfolder of the current build
directory and it has the name of the template, so the use case is the
default one usually set.
Pick-to: 6.8
Change-Id: Iac0eb4f470bfeb677192decf0b73a5288472ae70
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Keep track of all parameters from the calls of ifcodegen, so forcing a
regeneration can be done in case parameters change. Also unsuccessful
ifcodegen calls are automatically retried until they succeed. All this
affects cmake's configuration time logic regarding ifcodegen usage.
Fixes: QTBUG-100411
Pick-to: 6.8
Change-Id: I9cef009aae460072b0e1fc2ca988d7f254dcfb11
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python has venv in its standard library set, so using it instead of the
virtualenv package can make virtual environment deployment easier with
less dependencies used. The newer venv package is now used for both
compiled and interpreted workflows.
Instead of making virtual environments relocatable, they are
distributed with a generated requirements file which makes it possible
for them to be regenerated after relocation.
Fixes: QTBUG-104239
Pick-to: 6.8
Change-Id: I7795457be74637188ad1b1c448cca117491e4799
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For every warning reported by ifcodegen we already send a CMAKE_WARNING
with the corresponding message. This is useful to see the CMake call
causing the warning, but it doesn't highlight the file the warning is
in.
In addition we now also post the full warning including the file as
a normal CMake message. This is picked up by QtCreator and shows the
error directly and the correct file and line number.
Pick-to: 6.8
Change-Id: Ib2af05dc3c37d71eea6f85b78361e87f275a6be7
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Make sure to always create a dummy target until ifcodegen is ready to
be used.
Pick-to: 6.8
Change-Id: I3153a33073be0c23e8070d37f8fdd0217fd26eb1
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The new argument is named IDL_IMPORT_PATH. The argument needs to be
renamed as it clashes with the IMPORT_PATH of qt_add_qml_module.
Otherwise the IMPORT_PATH argument is not forwarded correctly to
qt_add_qml_module in the new qt_ifcodege_add_qml_module function.
Change-Id: I2b857579b26c063c4a423afab7880a1c56d38a1d
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This makes it easier to generate qml modules as it will take the URI
and VERSION from the ifcodegen template, but also allows to be passed
to the function to overwrite the values.
Fixes: QTBUG-118780
Change-Id: I15b2f06c6ac8373286d002dc64d8d34941df11df
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This makes it easier to generate backend plugins while making sure
those plugins are of the correct type and use the correct class name
to support static linking.
Fixes: QTBUG-123370
Change-Id: I4f32cce7df308bbe320a2063b5a9840de77a050f
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When cross-compiling using a yocto SDK, find_package returns the
target interpreter, which is incompatible.
We need to explicitly search in the host sysroot for the python
interpreter.
Fixes: QTBUG-116662
Pick-to: 6.2 6.5 6.6
Change-Id: Ia24a73ea3117cf38f930455a0758b17d3b86dff5
Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
Fixes: QTBUG-114686
Pick-to: 6.6
Change-Id: I6dd445af4c40fee7768c4c970ccec1e74a07f21f
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ARG_PREFIX can be non-set so the default value is set to VAR_PREFIX.
We should use it when filtering header files and setting the
GENERATED property.
Amends: ed930aa68c3dc0c3cf0a837ae8b544a8b9fc110e
Pick-to: 6.5
Task-number: QTBUG-112684
Change-Id: Ie7946115f7d02e6a3a3b3037bf30b039466c4867
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
The property is used in the Qt build system internal functionality to
detect the generated files and apply the required postprocessing.
This also could be useful for user projects.
Fixes: QTBUG-112684
Pick-to: 6.5
Change-Id: Id265b5f4b194a79d4daa9c09461f2a48a4118d70
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generator is packaged using nuitka as a standalone onefile
binary package. The resulting binary doesn't depend on a lot
of files and contains everything which is needed for the
generator to work.
The binary replaces the error prone virtualenv packaging.
The compilation takes some time and doesn't have any benefit
for qt-module developers. Because of that, the compilation needs
to be enabled by using the -compiled-ifcodegen configure option.
The current virtualenv packaging is not removed from the
repository yet, but once the new binary proves to be a good
replacement the code can be removed.
Change-Id: I43cc97429553b72bac7391d0d558615277988151
Fixes: QTBUG-105233
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to call python using the -B flag. This makes sure new byte
code is NOT written into a __pycache__ folder next to the python file.
This keeps the git repository clean from unwanted files and help in
case of errors introduced from that cache at the cost of slight
performance degradation.
Reporting ifcodegen errors using FATAL_ERROR does add additional
newlines and doesn't allow the command to be copied easily.
To fix that, the command and error log is now reported as a normal
cmake message and building is stopped with a FATAL_ERROR afterwards.
Pick-to: 6.2 6.3 6.4
Change-Id: I9f300959fa47a8d895f224beb0645fc32f5179b5
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of setting the environment variables for ifcodegen using
CMakes set command, we now set the environment variables only for the
call itself using "cmake -E env".
Fixes: QTBUG-107661
Pick-to: 6.2 6.3 6.4
Change-Id: I1f2b85e90d30f43a201e08d2632666fe709c4340
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This partially reverts 70ba71837aa1c93eb2a37fc90ed66c90e5c79f6a, which
causes problems when a installed virtualenv should e used.
The PYTHONHOME environment varible is always needed, as it tells
python where to search for its base libraries.
70ba71837aa1c93eb2a37fc90ed66c90e5c79f6a was needed to also build
with python3.10 on Debian. The problem there seems to be related
to their additional python patches and how python detects a
virtualenv. Usually the VIRTUAL_ENV environment variable is enough
for that and causes the site-packages folder inside the virtualenv
to be added to the search path.
To fix this we now set the PYTHONPATH environment variable as well,
to force the site-packages folder to be always within the search
path.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-105211
Change-Id: I64baa314c3d3aa947a651f6c168f47d69ab1558d
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
This causes issues with newer python/virtualenv versions and doesn't
seem to be needed for older ones to work correctly either.
Fixes: QTBUG-103919
Pick-to: 6.2 6.3 6.4
Change-Id: I112dd5ce3acfc05c85e8e5dba569c6ad4758be2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This is done by changing the default value of the OUTPUT_DIR argument
to be template specific.
Fixes: QTBUG-100410
Pick-to: 6.3
Change-Id: I807d10ce60965b0c1c0a06db8276e22d4658e183
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
| |
In the documentation it is already marked as mandatory, but the
code happily accepted it without it.
Pick-to: 6.2 6.3
Change-Id: If0b12260728a5729009fb4371886c4b6f85ba701
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
This makes it easier to define your own set of templates within a
repository and use it without having to define the absolute path to
the template.
Pick-to: 6.2
Fixes: AUTOSUITE-1644
Change-Id: I8ab2677ebb50940445362f1a404adbe23ec7a5b7
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
| |
The old macro is still available, but marked deprecated.
Pick-to: 6.2
Change-Id: Ibb08209dc708ce1d65f12d338df406e0b4cf9ee8
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
| |
Change-Id: Ibcb7ce164dab3ea3f1ef073f1ad73c0129614704
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
We need to include the QtFindPackageHelpers explicitly in this case, in
order to use qt_find_package in our functions.
Change-Id: Iafaa74a85b42fca055268cd08fbc5d3dedd736db
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default only basic messages are printed, for which qface file is currently
processed.
In case of an error, the command and the full generation output is
printed as a FATAL_ERROR stopping the cmake run.
Verbose output can be enabled by passing the --log-level=verbose argument
to cmake, setting the IFCODEGEN_VERBOSE cmake variable to ON, or by
passing the VERBOSE argument to one of the autogeneration functions.
Change-Id: I6305225739e41e79607a9c38b8fd5dee7ab3539e
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|
|
|
This is a follow-up of the previous commit.
Task-number: AUTOSUITE-1633
Change-Id: I6feb63a346a4c94c434df83cd1255904fe8acc68
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
|