CMake can build and run code at configure time with the try_run() function: https://cmake.org/cmake/help/latest/command/try_run.html Predictably, this fails when cross-compiling. CMake does have support for an emulator (such as qemu) with the CMAKE_CROSSCOMPILING_EMULATOR variable: https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING_EMULATOR.html We should support this in cmake.bbclass.
Would you like to implement it differently than it is implemented by the patch here: https://patchwork.yoctoproject.org/project/oe-core/patch/20230910161850.4032227-3-adrian.freihofer@siemens.com/ ?
Yeah that looks good :)
Bulk move from 4.99 or 0.00 to 5.99
Implementated: - implementation: d7c05e4eed4ed436f2ce961df46f9654af83ffec - tests: 2df986746b4010a24def7369f356b50e52bda50d..85f84b4090f3fc84b377d37a18af7e4cb1b78f69 - docs: f72759de573c97b291717cfe6043305b9797282e