Subject: [PATCH v2 04/65] build-system/cmake: Add generator.

From: Greg Hogan <[email-masked]>
Date: Tue, 22 Oct 2024 18:08:54 +0000

* guix/build/cmake-build-system.scm (configure): Add and use generator
field to configure the build system.

Change-Id: Ie6f439f031c3ba063773e6aa2c9c36c5eda56c0f
---
 guix/build/cmake-build-system.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index 1109b5c7c4..3fab010c85 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -35,7 +35,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"))
@@ -51,6 +51,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.46.1