On Mon, 2023-11-20 at 15:46 +0100, Adrian Freihofer wrote: > Provide an easy way to enable cmake-qemu e.g. on distro level for all > recipes inheriting the cmake.bbclass. > > Therefore a new variable is introduced: OECMAKE_EXEWRAPPER_QEMU. > > If set to "1" all recipes built with CMake can use qemu to execute > cross-compiled binaries on the build machine. > One use case is the execution of cross-compiled unit tests or ptests, > e.g. in an SDK context. Therefore, a variable that activates Qemu for > all CMake recipes is much more useful than just providing the optional > cmake-qemu.bbclass. > Further information can be found in the CMake documentation in the > CMAKE_CROSSCOMPILING_EMULATOR section. > > There are some use cases for qemu-user, but users should not be > encouraged to use it as an alternative for clean cross-compilation. > Since the core does not need it either it is optional. > > Signed-off-by: Adrian Freihofer <[email protected]> > --- > meta/classes-recipe/cmake.bbclass | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/classes-recipe/cmake.bbclass > b/meta/classes-recipe/cmake.bbclass > index d978b88944..4d8e2a206f 100644 > --- a/meta/classes-recipe/cmake.bbclass > +++ b/meta/classes-recipe/cmake.bbclass > @@ -14,6 +14,10 @@ B = "${WORKDIR}/build" > # The supported options are "Unix Makefiles" or "Ninja". > OECMAKE_GENERATOR ?= "Ninja" > > +# qemu-user can be used for special use cases, but not by default > +OECMAKE_EXEWRAPPER_QEMU ??= "0" > +inherit ${@'cmake-qemu' if d.getVar('OECMAKE_EXEWRAPPER_QEMU') else ''} > +
I don't really see why this is needed. If a recipe is using things which need this, wouldn't they just inherit cmake-qemu? You could make cmake-qemu inherit cmake? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#191161): https://lists.openembedded.org/g/openembedded-core/message/191161 Mute This Topic: https://lists.openembedded.org/mt/102708283/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
