summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/cmake.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* cmake.bbclass: use --installAdrian Freihofer2024-02-021-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Since version 3.15 CMake provides a command-line signature to install an already-generated project binary tree. This may be used after building a project to run installation without using the generated build system or the native build tool. This is a small improvement, for regular bitbake calls. CMake does not check the dependencies again which is expected to be faster. The main motivation for this change is using CMake from an SDK context. With this change it is possible to initiate the compile step from an IDE and later on initiating the install step via bitbake which runs the install step on pseudo. This is also what the meson.bbclass already does with the --no-rebuild option. (From OE-Core rev: 72388593d62d45d54790710b9665eb8f13897c8c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: add Darwin supportEtienne Cordonnier2024-01-211-0/+2
| | | | | | | | | | | | This was initially added by https://git.yoctoproject.org/meta-darwin/commit/?id=97a84e083d0c2812e44231d48fb478e9a9cfac79 to the meta-darwin repository, however having it directly in openembedded-core will make the maintenance of meta-darwin easier. (From OE-Core rev: 8ded801178376a02125e653833d8ff062f80457f) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: Add *.cmake to CONFIGURE_FILESPeter Kjellerstedt2023-10-091-1/+1
| | | | | | | | | | This makes do_configure depend on changes to any cmake file when externalsrc is active. (From OE-Core rev: dae2757bf0fea6ae821a28bd6ea9d0232694c177) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: refactor cmake argsAdrian Freihofer2023-09-101-19/+24
| | | | | | | | | | Make the details of the cmake configure arguments available to d.getVar(). This allows to share them with devtool via tinfoil. (From OE-Core rev: 325fc8523bb5f62cd3754277aa34032cc0884861) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: cleanup spaces and tabsAdrian Freihofer2023-09-101-2/+4
| | | | | | | (From OE-Core rev: f1e96bf4ace090ff8ef9d311268ff068a0a3768e) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: fix allarch override syntaxChen Qi2023-08-291-4/+4
| | | | | | | | | | The override syntax should be ":allarch" instead of "_allarch". (From OE-Core rev: bea74c9942a3bb4f71aca0f722b4a7306ae52fb4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: do not search host paths for find_program()Chen Qi2023-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM[1] controls the search behavior of find_program(). When this variable's value was first used in OE, it was deliberately set to BOTH to allow searching of host tools. This is to ensure the necessary tools from host could be used. The downside is that the configure behavior may differ on different host environments. Later, this cmake.bbclass was added the ability to search tools under the HOSTTOOLS_DIR. This means we no longer needs cmake to search the host paths. So we remove the class-native setting of BOTH. [1] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html (From OE-Core rev: f4ea12f6635125ee793f4dd801c538c0186f9dc3) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: add CMAKE_SYSROOT to generated toolchain filePascal Bach2023-04-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This already got fixed in the toolchain file that is used during development in https://github.com/openembedded/openembedded-core/commit/cb42802f2fe1760f894a435b07286bca3a220364 The toolchain file generated by the cmake.bbclass however does not set CMAKE_SYSROOT. Under certain circumstances this also leads to the error: `"stdlib.h: No such file or directory #include_next <stdlib.h>"` during the build of a recipe. An example where this accured was during the upgrade of the Apache Thrift recipe in meta-openembedded to 0.11.0. With this change the build works out of the box. CMAKE_SYSROOT must only be set when crosscompiling, otherwise it will interfere with the native compiler headers. (From OE-Core rev: eb51e30e17c0c98441583854e8f8632e4fb5d11c) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> (from http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154791.html ) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> Signed-off-by: Poonam Jadhav <ppjadhav456@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+223
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>