From patchwork Wed Feb 15 10:59:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 19576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A382AC636D4 for ; Wed, 15 Feb 2023 10:59:16 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by mx.groups.io with SMTP id smtpd.web11.12349.1676458752367124694 for ; Wed, 15 Feb 2023 02:59:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nH3UCrVY; spf=pass (domain: bootlin.com, ip: 217.70.183.198, mailfrom: michael.opdenacker@bootlin.com) Received: (Authenticated sender: michael.opdenacker@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 52533C0008; Wed, 15 Feb 2023 10:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676458750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=kY5zXKBKSPWPv0k9FfPXIKorH63NAMGXzvD6KZqUuJw=; b=nH3UCrVYG1s4ppUUbJVgBgms1mYefSzr+r1aORfYdmuyRrRpbxBQrRVbzIwNInfQ4US+ct n1wcZq0PMI3caXZske3qlii+AILRV4hcJg0859RarVk/FEpi8++8jyPOvdh0rbQvraCmlK 3vKlQg3hBvswbOc1rp5mFFUATIf0wYidqywvObUgsRoOBdronXLmvgKpFLyvG4V1JY7cZI UO5i6kjV0xRVlQ9iCzlDaUBfff5zgft7wmtuH+RQ6mlnBXKsXD9sGYqe9BO0y42ns0cSbI sAqpCXOI+/yUYbRE9ntPUvEuZhKaUV5DDsHxxAI6Wq2yEekvNM2Z1PrsqONJJQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [PATCH] ref-manual: classes.rst: improvements to cmake class documentation Date: Wed, 15 Feb 2023 11:59:07 +0100 Message-Id: <20230215105907.114700-1-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 15 Feb 2023 10:59:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3689 From: Michael Opdenacker - Fix quoting for path to cmake modules - Document OECMAKE_GENERATOR variable - Style simplifications Signed-off-by: Michael Opdenacker Reviewed-by: Quentin Schulz --- documentation/ref-manual/classes.rst | 25 ++++++++++++++----------- 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 b5443c0d0a..3beccb4855 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 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: 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.