From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BAF16138334 for ; Thu, 26 Jul 2018 06:35:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69840E0856; Thu, 26 Jul 2018 06:35:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02EDBE0844 for ; Thu, 26 Jul 2018 06:35:35 +0000 (UTC) Received: from thinkpad.fritz.box (cable-static-238-109.teleport.ch [213.188.238.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: soap) by smtp.gentoo.org (Postfix) with ESMTPSA id D887F335C8D; Thu, 26 Jul 2018 06:35:32 +0000 (UTC) From: soap@gentoo.org To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 1/2] cmake-utils.eclass: Make ninja default backend in EAPI >= 7 Date: Thu, 26 Jul 2018 08:35:00 +0200 Message-Id: <20180726063501.18702-1-soap@gentoo.org> X-Mailer: git-send-email 2.18.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: c6990de4-f7bc-40d4-994a-c73f5bb8060e X-Archives-Hash: 71c7de39a5052f5d3996f831c263d515 From: David Seifert * 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/ --- 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 -- 2.18.0