diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-02-15 11:37:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-24 15:43:25 +0000 |
commit | 2b621b21bc9d11f38e65a79994ba8c3d36325e90 (patch) | |
tree | e07f51a59b284f8b506cfdb3a2866b01764e0b8e /documentation | |
parent | 1e14e7cc7999e924d7fb6d32844a95579534251e (diff) | |
download | poky-2b621b21bc9d11f38e65a79994ba8c3d36325e90.tar.gz |
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 <michael.opdenacker@bootlin.com>
Reviewed-by: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/ref-manual/classes.rst | 25 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 10 |
2 files changed, 24 insertions, 11 deletions
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. | |||
346 | ``cmake`` | 346 | ``cmake`` |
347 | ========= | 347 | ========= |
348 | 348 | ||
349 | The ref:`ref-classes-cmake` class allows for recipes that need to build software using | 349 | The :ref:`ref-classes-cmake` class allows recipes to build software using the |
350 | the `CMake <https://cmake.org/overview/>`__ build system. You can use | 350 | `CMake <https://cmake.org/overview/>`__ build system. You can use the |
351 | the :term:`EXTRA_OECMAKE` variable to specify | 351 | :term:`EXTRA_OECMAKE` variable to specify additional configuration options to |
352 | additional configuration options to be passed using the ``cmake`` | 352 | pass to the ``cmake`` command line. |
353 | command line. | 353 | |
354 | 354 | By default, the :ref:`ref-classes-cmake` class uses | |
355 | On the occasion that you would be installing custom CMake toolchain | 355 | `Ninja <https://ninja-build.org/>`__ instead of GNU make for building, which |
356 | files supplied by the application being built, you should install them | 356 | offers better build performance. If a recipe is broken with Ninja, then the |
357 | to the preferred CMake Module directory: ``${D}${datadir}/cmake/`` | 357 | recipe can set the :term:`OECMAKE_GENERATOR` variable to ``Unix Makefiles`` to |
358 | Modules during | 358 | use GNU make instead. |
359 | :ref:`ref-tasks-install`. | 359 | |
360 | If you need to install custom CMake toolchain files supplied by the application | ||
361 | being built, you should install them (during :ref:`ref-tasks-install`) to the | ||
362 | preferred CMake Module directory: ``${D}${datadir}/cmake/modules/``. | ||
360 | 363 | ||
361 | .. _ref-classes-cml1: | 364 | .. _ref-classes-cml1: |
362 | 365 | ||
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. | |||
5399 | :term:`Source Directory` for details on how this class | 5399 | :term:`Source Directory` for details on how this class |
5400 | applies these additional sed command arguments. | 5400 | applies these additional sed command arguments. |
5401 | 5401 | ||
5402 | :term:`OECMAKE_GENERATOR` | ||
5403 | A variable for the :ref:`ref-classes-cmake` class, allowing to choose | ||
5404 | which back-end will be generated by CMake to build an application. | ||
5405 | |||
5406 | By default, this variable is set to ``Ninja``, which is faster than GNU | ||
5407 | make, but if building is broken with Ninja, a recipe can use this | ||
5408 | variable to use GNU make instead:: | ||
5409 | |||
5410 | OECMAKE_GENERATOR = "Unix Makefiles" | ||
5411 | |||
5402 | :term:`OE_IMPORTS` | 5412 | :term:`OE_IMPORTS` |
5403 | An internal variable used to tell the OpenEmbedded build system what | 5413 | An internal variable used to tell the OpenEmbedded build system what |
5404 | Python modules to import for every Python function run by the system. | 5414 | Python modules to import for every Python function run by the system. |