From 2b621b21bc9d11f38e65a79994ba8c3d36325e90 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Wed, 15 Feb 2023 11:37:56 +0100 Subject: ref-manual: classes.rst: improvements to cmake class documentation - Fix quoting for path to cmake modules - Document OECMAKE_GENERATOR variable - Style simplifications (From yocto-docs rev: ecdc1775e27717ec87442575f65b1f24ca2b0348) Signed-off-by: Michael Opdenacker Reviewed-by: Quentin Schulz Signed-off-by: Richard Purdie --- documentation/ref-manual/classes.rst | 25 ++++++++++++++----------- documentation/ref-manual/variables.rst | 10 ++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) (limited to 'documentation') diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 4fdc4c583e..b9b49981e1 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -346,17 +346,20 @@ in order to make them relocatable. ``cmake`` ========= -The ref:`ref-classes-cmake` class allows for recipes that need to build software using -the `CMake `__ build system. You can use -the :term:`EXTRA_OECMAKE` variable to specify -additional configuration options to be passed using the ``cmake`` -command line. - -On the occasion that you would be installing custom CMake toolchain -files supplied by the application being built, you should install them -to the preferred CMake Module directory: ``${D}${datadir}/cmake/`` -Modules during -:ref:`ref-tasks-install`. +The :ref:`ref-classes-cmake` class allows recipes to build software using the +`CMake `__ build system. You can use the +:term:`EXTRA_OECMAKE` variable to specify additional configuration options to +pass to the ``cmake`` command line. + +By default, the :ref:`ref-classes-cmake` class uses +`Ninja `__ instead of GNU make for building, which +offers better build performance. If a recipe is broken with Ninja, then the +recipe can set the :term:`OECMAKE_GENERATOR` variable to ``Unix Makefiles`` to +use GNU make instead. + +If you need to install custom CMake toolchain files supplied by the application +being built, you should install them (during :ref:`ref-tasks-install`) to the +preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``. .. _ref-classes-cml1: diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 62176f7ee8..c204f49aac 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -5399,6 +5399,16 @@ system and gives an overview of their function and contents. :term:`Source Directory` for details on how this class applies these additional sed command arguments. + :term:`OECMAKE_GENERATOR` + A variable for the :ref:`ref-classes-cmake` class, allowing to choose + which back-end will be generated by CMake to build an application. + + By default, this variable is set to ``Ninja``, which is faster than GNU + make, but if building is broken with Ninja, a recipe can use this + variable to use GNU make instead:: + + OECMAKE_GENERATOR = "Unix Makefiles" + :term:`OE_IMPORTS` An internal variable used to tell the OpenEmbedded build system what Python modules to import for every Python function run by the system. -- cgit v1.2.3-54-g00ecf