ref-manual: classes.rst: improvements to cmake class documentation
PATCH 1/1 ref-manual: classes.rst: improvements to cmake class documentation
From: Michael Opdenacker <[email protected]>
- Fix quoting for path to cmake modules
- Document OECMAKE_GENERATOR variable
- Style simplifications
--- documentation/ref-manual/classes.rst | 25 ++++++++++++++----------- documentation/ref-manual/variables.rst | 10 ++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-)
documentation/ref-manual/classes.rst +14 -11
@@ -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 <https://cmake.org/overview/>`__ 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 <https://cmake.org/overview/>`__ 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 <https://ninja-build.org/>`__ 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 instal 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:
documentation/ref-manual/variables.rst +10 -0
@@ -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.
Signature · 1 line
2.37.2
Hi Michael,
Quoted 33 lines · Michael Opdenacker via lists.yoctoproject.org
From: Michael Opdenacker <[email protected]>
- Fix quoting for path to cmake modules
- DocumentOECMAKE_GENERATORvariable
- Style simplificationsSigned-off-by Michael Opdenacker <[email protected]>--- documentation/ref-manual/classes.rst | 25 ++++++++++++++----------- documentation/ref-manual/variables.rst | 10 ++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-)documentation/ref-manual/classes.rst +2
-11@@ -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 <https://urldefense.com/v3/__https://cmake.org/overview/__;!!OOPJP91ZZw!iNA2vN8toaxYO2TbPOrNnBcNXS6SmFZYJDid21JEAzDilDFda1et7uKBF9xjIdOmh6u-9K0NW4WLqOXZPtlcj7xyFOiYeZ0ClIsmkLl9Ecg3LmpEaTDt$ >`__ 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 <https://urldefense.com/v3/__https://cmake.org/overview/__;!!OOPJP91ZZw!iNA2vN8toaxYO2TbPOrNnBcNXS6SmFZYJDid21JEAzDilDFda1et7uKBF9xjIdOmh6u-9K0NW4WLqOXZPtlcj7xyFOiYeZ0ClIsmkLl9Ecg3LmpEaTDt$ >`__ build system. You can use the
documentation/ref-manual/classes.rst in order to make them relocatable. · line 360
Quoted 10 lines
documentation/ref-manual/classes.rst +10
-0+: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 <https://urldefense.com/v3/__https://ninja-build.org/__;!!OOPJP91ZZw!iNA2vN8toaxYO2TbPOrNnBcNXS6SmFZYJDid21JEAzDilDFda1et7uKBF9xjIdOmh6u-9K0NW4WLqOXZPtlcj7xyFOiYeZ0ClIsmkLl9Ecg3LqOSrdIo$ >`__ 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 instal custom CMake toolchain files supplied by the application
s/instal/install/
Rest is fine, so
Thanks,
Quentin
Hi Quentin,
Quoted 59 lines · Quentin Schulz via lists.yoctoproject.org
Hi Michael,
Quoted 52 lines · Michael Opdenacker via lists.yoctoproject.org
From: Michael Opdenacker <[email protected]>
- Fix quoting for path to cmake modules
- DocumentOECMAKE_GENERATORvariable
- Style simplificationsSigned-off-by Michael Opdenacker <[email protected]>---
documentation/ref-manual/classes.rst | 25 ++++++++++++++-----------documentation/ref-manual/variables.rst| 10 ++++++++++2 files changed, 24 insertions(+), 11 deletions(-)documentation/ref-manual/classes.rst +0
-0@@ -346,17 +346,20 @@ in order to make them relocatable.``cmake``
=========
-The ref:ref-classes-cmakeclass allows for recipes that need to build software using -the `CMake
<https://urldefense.com/v3/__https://cmake.org/overview/__;!!OOPJP91ZZw!iNA2vN8toaxYO2TbPOrNnBcNXS6SmFZYJDid21JEAzDilDFda1et7uKBF9xjIdOmh6u-9K0NW4WLqOXZPtlcj7xyFOiYeZ0ClIsmkLl9Ecg3LmpEaTDt$Quoted 1 line
`__ build system. You can use
documentation/ref-manual/classes.rst +1
-9-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 softwareQuoted 1 line
`__ build system. You can use the
+:term:
EXTRA_OECMAKEvariable to specify additional configuration options todocumentation/ref-manual/classes.rst +4
-0+pass to the ``cmake`` command line. + +By default, the :ref:`ref-classes-cmake` class uses +`NinjaQuoted 1 line
`__ 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_GENERATORvariable to ``Unix Makefiles`` todocumentation/ref-manual/classes.rst +3
-0+use GNU make instead. + +If you need to instal custom CMake toolchain files supplied by theQuoted 1 line
application
s/instal/install/
Quoted 2 lines
Rest is fine, so
Reviewed-by Quentin Schulz <[email protected]>
Thanks for the review. Fixed.
Cheers
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com