summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/ref-manual/classes.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 8d8bea4714..26d0e55cb4 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -377,6 +377,35 @@ If you need to install custom CMake toolchain files supplied by the application
377being built, you should install them (during :ref:`ref-tasks-install`) to the 377being built, you should install them (during :ref:`ref-tasks-install`) to the
378preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``. 378preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``.
379 379
380.. _ref-classes-cmake-qemu:
381
382``cmake-qemu``
383==============
384
385The :ref:`ref-classes-cmake-qemu` class might be used instead of the
386:ref:`ref-classes-cmake` class. In addition to the features provided by the
387:ref:`ref-classes-cmake` class, the :ref:`ref-classes-cmake-qemu` class passes
388the ``CMAKE_CROSSCOMPILING_EMULATOR`` setting to ``cmake``. This allows to use
389QEMU user-mode emulation for the execution of cross-compiled binaries on the
390host machine. For more information about ``CMAKE_CROSSCOMPILING_EMULATOR``
391please refer to the `related section of the CMake documentation
392<https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING_EMULATOR.html>`__.
393
394Not all platforms are supported by QEMU. This class only works for machines with
395``qemu-usermode`` in the :ref:`ref-features-machine`. Using QEMU user-mode therefore
396involves a certain risk, which is also the reason why this feature is not part of
397the main :ref:`ref-classes-cmake` class by default.
398
399One use case is the execution of cross-compiled unit tests with CTest on the build
400machine. If ``CMAKE_CROSSCOMPILING_EMULATOR`` is configured::
401
402 cmake --build --target test
403
404works transparently with QEMU user-mode.
405
406If the CMake project is developed with this use case in mind this works very nicely.
407This also applies to an IDE configured to use ``cmake-native`` for cross-compiling.
408
380.. _ref-classes-cml1: 409.. _ref-classes-cml1:
381 410
382``cml1`` 411``cml1``