| 1 |
# Information about Coin instruction templates |
| 2 |
|
| 3 |
## Build templates |
| 4 |
|
| 5 |
* ``coin_qtbase_build_template_v2.yaml`` did not exist. The build instructions were directly embedded into |
| 6 |
``module_config.yaml`` and did not support repos outside of qtbase, also no cross-compilation. |
| 7 |
* ``coin_qtbase_build_template_v2`` introduced support for building other repos, and also enabled |
| 8 |
build cross-compiling targets like ``Android`` and ``iOS``. |
| 9 |
A bit later the template gained the ability to build ``qemu`` cross-compiling configurations. |
| 10 |
The counterpart to qtbase to build other repositories is ``coin_module_build_template_v2`` |
| 11 |
|
| 12 |
## Test templates |
| 13 |
|
| 14 |
* ``coin_module_test_template_v1`` did not exist. The test instructions were directly embedded into |
| 15 |
``module_config.yaml`` and did not support repos outside of qtbase, also no cross-compilation. |
| 16 |
* ``coin_module_test_template_v2`` introduced support for building tests for other repos, and made |
| 17 |
sure not to build and run tests on cross-compiling configuration. A bit later the template gained |
| 18 |
the ability to build and run tests for ``qemu`` cross-compiling configurations. |
| 19 |
* ``coin_module_test_template_v3`` changed the run test instructions to not ignore the exit code |
| 20 |
and thus enforce that tests pass in the CI. |
| 21 |
|
| 22 |
# Environment variable description and usage |
| 23 |
|
| 24 |
The following environment variables are used in Coin instructions when building Qt, tests, etc: |
| 25 |
|
| 26 |
`CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments |
| 27 |
(e.g. `-shared`), that will be passed to a qtbase configure call |
| 28 |
`CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments |
| 29 |
(e.g. `-DOPENSSL_ROOT_DIR=Foo`) that will be passed to a qtbase |
| 30 |
configure call |
| 31 |
`NON_QTBASE_CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments |
| 32 |
that will be passed to a non-qtbase qt-configure-module call |
| 33 |
`NON_QTBASE_CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments |
| 34 |
that will be passed to a non-qtbase qt-configure-module call |
| 35 |
`<MODULE>_CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments |
| 36 |
that will be passed to the specified module's qt-configure-module call |
| 37 |
`<MODULE>_CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments |
| 38 |
that will be passed to the specified module's qt-configure-module call |
| 39 |
`COMMON_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in |
| 40 |
`prepare_building_env.yaml` that apply to qtbase configurations |
| 41 |
only. |
| 42 |
`COMMON_NON_QTBASE_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in |
| 43 |
`prepare_building_env.yaml` that apply to |
| 44 |
configuration of repos other than qtbase |
| 45 |
`COMMON_TEST_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in |
| 46 |
`prepare_building_env.yaml` that apply to configuration of |
| 47 |
all standalone tests |
| 48 |
|
| 49 |
All of the above apply to host builds only. |
| 50 |
|
| 51 |
There is a a set of environment variables that apply to target builds when cross-compiling which |
| 52 |
mirror the ones above. They are: |
| 53 |
|
| 54 |
`TARGET_CONFIGURE_ARGS` |
| 55 |
`TARGET_CMAKE_ARGS` |
| 56 |
`NON_QTBASE_TARGET_CONFIGURE_ARGS` |
| 57 |
`NON_QTBASE_TARGET_CMAKE_ARGS` |
| 58 |
`<MODULE>_TARGET_CONFIGURE_ARGS` |
| 59 |
`<MODULE>_TARGET_CMAKE_ARGS` |
| 60 |
|
| 61 |
`COMMON_TARGET_CMAKE_ARGS` |
| 62 |
`COMMON_NON_QTBASE_TARGET_CMAKE_ARGS` |
| 63 |
`COMMON_TARGET_TEST_CMAKE_ARGS` |
| 64 |
|
| 65 |
Currently, there are no common ``configure-style`` variables for configuring |
| 66 |
repos or tests, only ``CMake-style` ones. |
| 67 |
|
| 68 |
|
| 69 |
`COIN_CMAKE_ARGS` contains the final set of cmake args that is passed to |
| 70 |
`configure` / `qt-configure-module`, it is built up from the variables above + any additional values added |
| 71 |
by custom instructions, like specification of `CMAKE_INSTALL_PREFIX` etc. |
| 72 |
|
| 73 |
`INSTALL_DIR_SUFFIX` is used to append either `/host` or `/target` suffixes to install paths in |
| 74 |
instructions when cross-building. |
| 75 |
|
| 76 |
`CONFIGURE_EXECUTABLE` contains a platform-specific path to `configure` / `qt-configure-module` |
| 77 |
or `cmake`/ `qt-cmake` depending on whether `UseConfigure` feature is enabled. |
| 78 |
|
| 79 |
`CONFIGURE_ENV_PREFIX` contains the value of either `ENV_PREFIX` or `TARGET_ENV_PREFIX` depending on |
| 80 |
whether it's a cross-build configure call. The values are used when configuring and building, to ensure |
| 81 |
that things like compilers are found correctly. |
| 82 |
|
| 83 |
We use `unixPathSeparators` to pass an install prefix with forward slashes even on Windows, |
| 84 |
to avoid escaping issues when using configure. |