From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QI/rMFszBGYIRQAA62LTzQ:P1 (envelope-from ) for ; Wed, 27 Mar 2024 15:55:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QI/rMFszBGYIRQAA62LTzQ (envelope-from ) for ; Wed, 27 Mar 2024 15:55:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=greghogan-com.20230601.gappssmtp.com header.s=20230601 header.b="2wGB/X0w"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711551323; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vb0vFg2svXh/p9E5EcFofdSVCjOhqKfrGXae93JqvJk=; b=T2HIoxKJdFQME8/eFBfdVt/MjI54f4VYT170gdQGfM2tqvuy0Ai4EBTmAM6+OuuK5pEWWO uaVO51BvhAD2xVszoZDJdGoG7/k1ZXjOswPknK93Twb7NFXSycN6DzRmFU6eKeEzzV4wcE x67jjBazJ7NJ3lygpUIgBhbxAdxnIig+7JKLpQ1ksAi4X7X/3oR546jc+zMhPoCbB7cKgR TwzOqRlko234+GSfeaLEBVNyRSccyPrLcN63At7Tnc8vRB9mFGyshItvBfCPD56URaP2BR 7MitwFBfY/HEpd3QWC45CJ+r82V+rtbR1YtW18dLUnW2XoLw+sf0n0cXssRbKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=greghogan-com.20230601.gappssmtp.com header.s=20230601 header.b="2wGB/X0w"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711551323; a=rsa-sha256; cv=none; b=UUkV2/3Ha5K18lc7uWgbz68AcEBCLxrcJTeBUcoHtvXeJZ0jSDm/PBLnIEeHYk4XIBEKxS 1rwx0SQ9bMVm2ikZWBOg7cLtOzEt8oVwPHL4FR7/pb1rw1/ekec/ZWL85ANEK/Qzx6z0zL nBYHiIMYbBYalzpqS3KXSL2FDIA0ybWOoozmTO1PaXRS71HNyDI8NR0oNhPxiia5lph6hc UuaHD1m8LNh6d88+uEcOcPJGkLeKq3z6zQA2vx7ZH1zNgfiHfYUr5yKBnlt3jRlORBaad/ 1ykP2ZN56/QQ0zywsVr5bXExrK773gMezPBOYNAUs9itaiq545LDAcuO8XLtew== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9D8D96EA73 for ; Wed, 27 Mar 2024 15:55:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpUfI-0000zi-A5; Wed, 27 Mar 2024 10:54:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpUfD-0000vZ-Fc for guix-patches@gnu.org; Wed, 27 Mar 2024 10:54:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpUfD-0008JL-6q for guix-patches@gnu.org; Wed, 27 Mar 2024 10:54:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpUfD-0000qZ-BD for guix-patches@gnu.org; Wed, 27 Mar 2024 10:54:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70031] [core-updates PATCH 02/19] build-system/cmake: Parameterize build system generator. Resent-From: Greg Hogan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Mar 2024 14:54:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70031 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70031@debbugs.gnu.org Cc: Greg Hogan Received: via spool by 70031-submit@debbugs.gnu.org id=B70031.17115512053011 (code B ref 70031); Wed, 27 Mar 2024 14:54:03 +0000 Received: (at 70031) by debbugs.gnu.org; 27 Mar 2024 14:53:25 +0000 Received: from localhost ([127.0.0.1]:38100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpUea-0000mE-8b for submit@debbugs.gnu.org; Wed, 27 Mar 2024 10:53:24 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:57450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpUeX-0000lF-FA for 70031@debbugs.gnu.org; Wed, 27 Mar 2024 10:53:22 -0400 Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-43181d3cb7fso2961281cf.2 for <70031@debbugs.gnu.org>; Wed, 27 Mar 2024 07:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20230601.gappssmtp.com; s=20230601; t=1711551195; x=1712155995; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vb0vFg2svXh/p9E5EcFofdSVCjOhqKfrGXae93JqvJk=; b=2wGB/X0w5wVM6eTRzHHbqBoWuWjtEg863hJEN4KiLBz0P4RxzJhigCEc9qROM98igq jMj+d8vGSsbZ+AcF9OM22JSCA3qoqDzlhkTIqltL6ZtD6L557xB0JmSo8aLyct6JqS11 gmgXJTqK/cECRur6LpceUS+Z60y548wwBB2g3V4Fe8meh5drMSttqrMAgUqG7kwR1RwO D9DTelGXUirKymY+Qm8LW9Fg174d1FJLx/Xmly4w/axizckdQV3kT+s9nVoqNPgYNBQM H/JARbdO2jaNYJLWHaIbjmy1DufGM0c2NgPGWX01vlKvrllQWhZwTrSNcxe3C+ehtEzz ba4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711551195; x=1712155995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vb0vFg2svXh/p9E5EcFofdSVCjOhqKfrGXae93JqvJk=; b=R0S55F3IiYetucUXrKiJysPg8MPXhV5QnDS/DFhK1pdsShZ4LOUE5Wg+5yzO+5lv02 tNnoSAaHH865SoLsSYrXYxrIwXb4WgBGxQ1mo50bV330xKOjYcnwpq7r1Ur4MJi7Zkr/ WKX5ZLATjJXIqDleFR8xxZF9tOXdSrjpwHJjBUSgy9BuU8UaZrw42VZHmGfbB2g3nvia xWlSMa1XmQziIaKDyaba6eG8sCvN/4EK1PKzBLeB3evRkYPH1jhIojeeHaG1/VgJukT1 OkZR/hZCbXHfVkoIFuJG816NLsjeVTV2UYO4LiAeQWkR4y107enmkXEr1AEx09m/yTfQ XclQ== X-Gm-Message-State: AOJu0YxH7Lbihg+2E6XNTpbPaZ++b6GhRxQwoTi4S2pxFZhCN1VWxoE+ Rfwjy1W616TPP9LA3S9JBXZQ0xRVBx+fW6ZBGrWL08cNz/Sggrp0GMtPKIr1lIheIdoH+pyy1FR c X-Google-Smtp-Source: AGHT+IGaqPELLUlxBlbt05dx6u1OXf5xoQIrB9gB6BDNkj075eF1xJZHr9K9ltGiZ6MX62w1Dt46jQ== X-Received: by 2002:ac8:5e0f:0:b0:431:62dc:f781 with SMTP id h15-20020ac85e0f000000b0043162dcf781mr1784266qtx.13.1711551195534; Wed, 27 Mar 2024 07:53:15 -0700 (PDT) Received: from ip-10-114-89-186.evoforge.org (ec2-52-70-167-183.compute-1.amazonaws.com. [52.70.167.183]) by smtp.gmail.com with ESMTPSA id fk23-20020a05622a559700b00430c8b87b46sm4882915qtb.6.2024.03.27.07.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 07:53:15 -0700 (PDT) From: Greg Hogan Date: Wed, 27 Mar 2024 14:52:27 +0000 Message-ID: <928c4ed06ed4eb8adc84d4926d2f6640b3ff52ec.1711549374.git.code@greghogan.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 9D8D96EA73 X-Spam-Score: -3.85 X-Migadu-Spam-Score: -3.85 X-Migadu-Scanner: mx11.migadu.com X-TUID: gKhxckvkU7w3 * guix/build-system/cmake.scm (cmake-build): Add generator parameter defaulted to the default CMake build system generator. * guix/build/cmake-build-system.scm (configure): Add and use generator parameter to configure the build system. * doc/guix.texi (Build Systems): Document #:generator for cmake-build-system. --- doc/guix.texi | 4 ++++ guix/build-system/cmake.scm | 4 ++++ guix/build/cmake-build-system.scm | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index ddd98a5fd46..782893b4f23 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9623,6 +9623,10 @@ Build Systems it defaults to @code{"RelWithDebInfo"} (short for ``release mode with debugging information''), which roughly means that code is compiled with @code{-O2 -g}, as is the case for Autoconf-based packages by default. +The @code{#:generator} parameter configures the native build system; it +defaults to @code{"Unix Makefiles"} and can be changed to an alternative +such as @code{Ninja} (the alternative generator must be available as +both a module and native input). @end defvar @defvar composer-build-system diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index aa187c9844b..a4d69276748 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -101,6 +101,7 @@ (define* (cmake-build name inputs (search-paths '()) (make-flags ''()) (out-of-source? #t) + (generator "Unix Makefiles") (build-type "RelWithDebInfo") (tests? #t) (test-target "test") @@ -140,6 +141,7 @@ (define* (cmake-build name inputs configure-flags) #:make-flags #$make-flags #:out-of-source? #$out-of-source? + #:generator #$generator #:build-type #$build-type #:tests? #$tests? #:test-target #$test-target @@ -177,6 +179,7 @@ (define* (cmake-cross-build name (native-search-paths '()) (make-flags ''()) (out-of-source? #t) + (generator "Unix Makefiles") (build-type "RelWithDebInfo") (tests? #f) ; nothing can be done (test-target "test") @@ -231,6 +234,7 @@ (define* (cmake-cross-build name #:configure-flags #$configure-flags #:make-flags #$make-flags #:out-of-source? #$out-of-source? + #:generator #$generator #:build-type #$build-type #:tests? #$tests? #:test-target #$test-target diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index ea342ff2ac9..1775f7a7509 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -34,7 +34,7 @@ (define-module (guix build cmake-build-system) ;; Code: (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) - build-type target + build-type target generator #:allow-other-keys) "Configure the given package." (let* ((out (assoc-ref outputs "out")) @@ -50,6 +50,9 @@ (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t) (format #t "build directory: ~s~%" (getcwd)) (let ((args `(,srcdir + ,@(if generator + (list (string-append "-G" generator)) + '()) ,@(if build-type (list (string-append "-DCMAKE_BUILD_TYPE=" build-type)) -- 2.44.0