From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH 1/2] cmake-utils.eclass: Make ninja default backend in EAPI >= 7
Date: Thu, 26 Jul 2018 09:21:43 +0200 [thread overview]
Message-ID: <1532589703.730.2.camel@gentoo.org> (raw)
In-Reply-To: <20180726063501.18702-1-soap@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2088 bytes --]
W dniu czw, 26.07.2018 o godzinie 08∶35 +0200, użytkownik
soap@gentoo.org napisał:
> From: David Seifert <soap@gentoo.org>
>
> * Using the ninja backend as a default is the only way to
> massively improve src_compile core utilization, given that
> it seems unlikely that CMake will ever produce non-recursive
> Makefiles.
>
> For a benchmark, see:
> http://www.kaizou.org/2016/09/build-benchmark-large-c-project/
For the record, 'core utilization' or speed in general is a poor
argument. You shouldn't have brought it because it will bring
completely unnecessary bikeshed to this thread. Gentoo developers will
argue about it not because it could benefit Gentoo in any way
but because someone is wrong on the Internet!
The primary reason for using Ninja is making verbose build output
readable, in particular getting a lot of pointless nested verbose echos
out of it.
> ---
> eclass/cmake-utils.eclass | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
> index e64502b3b9b..ed81426ddcc 100644
> --- a/eclass/cmake-utils.eclass
> +++ b/eclass/cmake-utils.eclass
> @@ -53,7 +53,8 @@ _CMAKE_UTILS_ECLASS=1
> # @DESCRIPTION:
> # Specify a makefile generator to be used by cmake.
> # At this point only "emake" and "ninja" are supported.
> -: ${CMAKE_MAKEFILE_GENERATOR:=emake}
> +# In EAPI 7 and above, the default is set to "ninja",
> +# whereas in EAPIs below 7, it is set to "emake".
>
> # @ECLASS-VARIABLE: CMAKE_MIN_VERSION
> # @DESCRIPTION:
> @@ -112,8 +113,13 @@ esac
> inherit toolchain-funcs ninja-utils flag-o-matic multiprocessing xdg-utils
>
> case ${EAPI} in
> - 7) ;;
> - *) inherit eapi7-ver eutils multilib ;;
> + [56])
> + : ${CMAKE_MAKEFILE_GENERATOR:=emake}
> + inherit eapi7-ver eutils multilib
> + ;;
> + *)
> + : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
> + ;;
> esac
>
> EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
next prev parent reply other threads:[~2018-07-26 7:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-26 6:35 [gentoo-dev] [PATCH 1/2] cmake-utils.eclass: Make ninja default backend in EAPI >= 7 soap
2018-07-26 6:35 ` [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: Enable BUILD_SHARED_LIBS by default " soap
2018-09-13 9:55 ` Andreas Sturmlechner
2018-07-26 7:21 ` Michał Górny [this message]
2018-09-13 9:55 ` [gentoo-dev] [PATCH 1/2] cmake-utils.eclass: Make ninja default backend " Andreas Sturmlechner
2018-09-13 14:25 ` Mike Gilbert
2018-09-13 18:55 ` Andreas Sturmlechner
2018-09-13 19:01 ` Michał Górny
2018-09-14 6:59 ` Francesco Riosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532589703.730.2.camel@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=soap@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox