summaryrefslogtreecommitdiffstats
path: root/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
Commit message (Collapse)AuthorAgeFilesLines
* coin: Add instructions to build standalone examplesAlexandru Croitor2024-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | If a qt5.git configuration is marked with the StandaloneTests feature, tell CMake not to build the examples in-tree, and instead use qt-internal-configure-examples to build the examples out-of-tree. This brings a couple of improvements: - higher chance of building examples as ExternalProjects without issues - ability to use deployment api in examples, without installing the examples into a main install prefix The new coin instructions files use a copy of the standalone tests instructions as a base. Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: If89e6da0b327a38b9c2738f58aa1b5b5fb9fda37 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use install from libexec for QNX on WindowsToni Saario2023-08-171-12/+32
| | | | | | | | | | It moved to libexec at some point in 6.5. Pick-to: 6.5 6.6 Change-Id: I1e80c0dd1dc253c08bf509aeb605b863a5d67e47 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Move Some of the Private CMake Helper Scripts from `bin/` to `libexec/`Amir Masoud Abdol2022-12-051-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | After this change, private CMake scripts are mostly live in `libexec/`, except the `qt-cmake` which will stay in `bin/`. This doesn't affect the Windows configuration. - `qt-cmake` stays in `bin/` - `qt-configure-module` moves into `libexec/` - `qt-cmake-private` moves into `libexec/` - `qt-cmake-private-install.cmake` moves into `libexec/` - `qt-cmake-standalone-test` moves into `libexec/` - `qt-internal-configure-test` moves into `libexec/` In cases where `QT_GENERATE_WRAPPER_SCRIPTS_FOR_ALL_HOSTS` is set to ON, e.g., ANDROID, WASM, both Batch and Bash files will be generated and placed in `bin/` and `libexec/` accordingly; in both cases, qt-cmake and qt-cmake.bat will be in `bin/` anyway. [ChangeLog][CMake] The private Qt CMake scripts, i.e., qt-configure-module, qt-cmake-private, qt-cmake-private-install.cmake, qt-cmake-standalone-test and qt-internal-configure-test were moved into $prefix/libexec on Unix platforms. Fixes: QTBUG-107621 Change-Id: Ic4f4ec85f64d2ede0e208bca928959e30be906a6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Coin: use CMAKE_STAGING_PREFIX for cross-compilationsSamuli Piippo2022-03-291-1/+1
| | | | | | | | | | | | Re-apply 9a9b253b686618e23c2874cbcb2e5b89e56cd66d to use CMAKE_STAGING_PREFIX in cross-compilation builds. Amends b7986a8f6e9df3727f433a0df0ba56a3355153d0. Fixes: QTBUG-102108 Pick-to: 6.3 Change-Id: I8875da2df1427f02be68dd737168d76a8dc4ed2a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* coin: Use configure and qt-configure-module in instructionsAlexandru Croitor2022-03-171-18/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to use configure and qt-configure-module when building in Coin, rather than pure cmake and qt-cmake. There are a few benefits: - CI tests the scripts, making sure we don't introduce regressions - CI uses the same scripts that we mention in our documentation for developers to use - The platform configurations become a bit less verbose and easier to read due to less shouty-case CMake options To ensure a more gradual porting, Coin will only use the new instructions if the 'UseConfigure' feature is set on a platform configuration in qt5.git. This allows going back to the old instructions in case if something isn't working properly. Due the opt-in, we need to support both old and new instructions in the implementation. The change strives to remove as much duplicate code as possible, by moving it into common includes. The README.md is updated to mention the overview of how the different environment variables are used. There are a few important things to point out. 1) Because during the porting we have to allow mixing of the old style and new style, platform configs have to separate CMake-style options from configure-style options in different environment variables. Otherwise the instructions wouldn't be able to create a valid configure call, where all CMake-style options have to go at the end after a double dash --. After all platform configs are ported to the new style, it should be possible to combine all the options in a single environment variable if that is desired, but it will require another round of porting to remove all the '-D' prefixes in CMake-style options, and just use regular variable assignment which configure supports. e.g. -DQT_BUILD_EXAMPLES=ON becomes QT_BUILD_EXAMPLES=ON, which can be mixed in-between configure-style args. 2) Configure is more strict in that it doesn't allow passing unknown options. Due to that, we can't pass non-qtbase configure options via NON_QTBASE_CONFIGURE_ARGS. qt-configure-module would error out in the repos where the configure option is unknown. Because we don't have a Coin configure variable for each repo, we circumvent the issue by continuing to pass CMake-style options via NON_QTBASE_CMAKE_ARGS instead, which does not do validation checks. In the future, we could introduce a configure flag that disables the validation checks. Pick-to: 6.2 6.3 Task-number: QTQAINFRA-4357 Task-number: QTQAINFRA-4815 Change-Id: I72d8ba0b3a543b42982e22ae8d6566c0e885c446 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Toni Saario <toni.saario@qt.io>
* Remove useless error messagingToni Saario2022-03-171-2/+2
| | | | | | | | | | This part originates from when the CMake was being introduced and now things are stable enough that the bug rarely is everywhere. Pick-to: 6.2 6.3 Task-number: COIN-828 Change-Id: Ifb7b5ce82740f5ae49f712f9666870993ce00b15 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Coin: use CMAKE_STAGING_PREFIX for cross-compilationsSamuli Piippo2022-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Use CMAKE_STAGING_PREFIX instead of CMAKE_INSTALL_PREFIX when cross-compiling. This separates the host path used in staging prefix and the target path used in the install prefix for the device. This prevents for example Windows paths from being used in a device that does not support those. It also tells qmake not to sysrootify paths when building with it. Embedded linux and QNX builds are mostly affected and need this to use correct RPATHs and to unsysrootify qmake. Mobile platforms (Android and iOS) are not affected since they package binaries separately. WASM and INTEGRITY are static builds and device paths are not used. Cross-compiled auto tests keep staging prefix in RPATHs due to the behavior implemented in commit 20292250d44e08437306096e9096fc655cc9fb8b which keeps the QEMU test runs working as before. Pick-to: 6.3 6.2 Change-Id: If464ccd8cd9318a853df9afcb2aa709fbb2c1837 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* coin: Move AUTOGEN and tests options addition into a common locationAlexandru Croitor2022-01-191-2/+2
| | | | | | | | | As a drive-by this fixes the qtbase build to also have the CMAKE_AUTOGEN_VERBOSE option set. Pick-to: 6.2 6.3 Change-Id: I32324fb1e8e16299c5f34517edbc7ff335d84e14 Reviewed-by: Toni Saario <toni.saario@qt.io>
* Turn on autotest build for INTEGRITY on CITatiana Borisova2021-12-011-2/+2
| | | | | | | | - add INTEGRITY tests to CI for qtbase Pick-to: 6.2 Change-Id: I7c7b0cb2639a086c1d53bea2d2e682d4c0fb2581 Reviewed-by: Toni Saario <toni.saario@qt.io>
* CMake: Build examples with qmake against a CMake built QtAlexandru Croitor2020-12-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | We want to remove the Qt .pro files for projects, except examples, because examples are still meant to build with qmake. To not lose coverage on examples built with qmake, add instructions that will build the qtrepo/examples folder with qmake when the CMake configuration has -DQT_BUILD_EXAMPLES=ON. This means that such configurations will build examples both with CMake and qmake. Aside from making sure that our examples will still build with qmake, it will gives us some some coverage that a CMake-built qmake works correctly. Implementation-wise, add new instructions files that can call qmake and make depending on configuration and target type. Pick-to: 6.0 Fixes: QTBUG-85986 Change-Id: Ie8f4cbcda03c94da2aef455e32f48dad41a4bdb0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Name QT_NO_MAKE_*/BUILD_* variables consistentlyJoerg Bornemann2020-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency, apply the following renamings: QT_NO_MAKE_EXAMPLES -> QT_BUILD_EXAMPLES_BY_DEFAULT QT_NO_MAKE_TESTS -> QT_BUILD_TESTS_BY_DEFAULT QT_NO_MAKE_TOOLS -> QT_BUILD_TOOLS_BY_DEFAULT BUILD_EXAMPLES -> QT_BUILD_EXAMPLES BUILD_TESTING -> QT_BUILD_TESTS This should help to better convey the difference between "BUILD" and "NO_MAKE". To configure tests, but not to build them by default, pass the following to CMake: -DQT_BUILD_TESTS=ON -DQT_BUILD_TESTS_BY_DEFAULT=OFF Analoguous for examples: -DQT_BUILD_EXAMPLES=ON -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF Tools can be excluded from the default build with: -DBUILD_TOOLS_BY_DEFAULT=OFF The variable BUILD_TESTING is still available and initialized with the value of QT_BUILD_TESTS. Pick-to: 6.0 6.0.0 Change-Id: Ie5f29dfbdca8bfa8d687981dfe8c19c0397ca080 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Use CMAKE_AUTOGEN_VERBOSE to see moc invocationsToni Saario2020-07-241-2/+2
| | | | | | | | | | In qmake builds we can see the moc invocations, whereas in CMake builds by default we don't. Modify the Coin instructions to pass the CMAKE_AUTOGEN_VERBOSE cache variable so that AUTOMOC prints the moc invocations. Change-Id: I50be13224839fbbdece3c9e8a4935a72aba91a8e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Add instructions to re-use host artifacts for target buildsToni Saario2020-07-241-28/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want to build the host Qt configuration every single time we do a cross-build in Coin. Coin learned some new qt5.git platform configuration options, which allow specifying a dependency between a host Coin configuration and a target one. This means we can specify a host macOS config as a dependency when building iOS, and the host artifacts for all dependent repos (qtbase, qtsvg, qtdeclarative, etc) will be installed into /home/qt/work/install (as specified by the {{.AgentWorkingDir}}/install location). Same for Linux + Android and Linux + qemu. Modify the qtbase Coin instructions to use these installed host artifacts if such a dependency is present (platformDependency is not null). The target artifacts will be installed into a subfolder of the host installation, called 'target', e.g. /home/qt/work/install/target. If a dependency is not present, continue to build a host Qt before doing a target build. This allows gradual conversion of configurations in case if some of them don't work, or if the dependencies.yaml have not propagated far enough for all new repos to use the new instructions. In this case the locations of the artifacts are different host - /home/qt/work/install/host target - /home/qt/work/install/target Task-number: QTBUG-85623 Change-Id: I33539f4376034539fb7db80293dc4d39dcb9539b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Use custom install script to support Ninja Multi-Config buildsAlexandru Croitor2020-05-191-24/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Calling cmake --install . only installs a single configuration. To install both debug and release artifacts, the install invocation needs to be done for each configuration. To keep the Coin instruction code simpler, delegate the looping over configurations to a custom CMake script, and use it in the Coin instructions. Replace all cmake --install calls in the instructions with calls to either call_host_install.yaml or call_target_install.yaml. The path to the script depends on whether we are building qtbase or another module. In the former case the script should be called from the build dir, otherwise from the install dir. The other distinction is whether the host or target env prefix needs to be added. Task-number: QTBUG-80900 Change-Id: Ied4bf739e2b1a2307f22fc79c1cfad746c8cbc44 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add support for building building against yoctoSimon Hausmann2020-04-291-4/+4
| | | | | | | | Using an environment prefix wrapper shell script that sources the SDK's env setup. The script also ensure that we don't loose cmake on the way. Change-Id: I9d08bc58f0efaf688512ab26a7ddb800309a5015 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Pass --verbose flag to ninjaAlexandru Croitor2020-03-131-2/+2
| | | | | | | | | To allow seeing the exact compiler flags when build in Coin. We do the same for qmake builds. Change-Id: I8c43f35b95d722d914aaeaa8860720a3a0578737 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* coin: remove contact person for cmake issuesLiang Qi2020-02-131-4/+4
| | | | | | Change-Id: Id274bf821f424077e7259ed42433f2ef88153c36 Reviewed-by: Toni Saario <toni.saario@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: upload artifact for qtbase android build and etcLiang Qi2020-02-071-0/+87
Task-number: QTBUG-78945 Change-Id: I3361e63ed4830ac0e1ebb9d4b9495df09c45f476 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>