Commit Graph

7 Commits

Author SHA1 Message Date
Peter Kjellerstedt
68b54a02d5 cmake.bbclass: Add *.cmake to CONFIGURE_FILES
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>
2023-10-09 15:51:13 +01:00
Adrian Freihofer
27414b27d4 cmake.bbclass: refactor cmake args
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>
2023-09-10 08:54:36 +01:00
Adrian Freihofer
d0a91931f2 cmake.bbclass: cleanup spaces and tabs
(From OE-Core rev: f1e96bf4ace090ff8ef9d311268ff068a0a3768e)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-10 08:54:36 +01:00
Chen Qi
68e468b3e9 cmake.bbclass: fix allarch override syntax
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>
2023-08-29 09:41:07 +01:00
Chen Qi
2a97429c16 cmake.bbclass: do not search host paths for find_program()
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>
2023-06-02 14:41:50 +01:00
Pascal Bach
cce022a507 cmake: add CMAKE_SYSROOT to generated toolchain file
This already got fixed in the toolchain file that is used during development
in cb42802f2f

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>
2023-04-27 14:41:31 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
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>
2022-08-12 15:27:17 +01:00