GNU bug report logs - #70031
[core-updates PATCH 00/19] Use CMake in build-system/cmake.

Previous Next

Package: guix-patches;

Reported by: Greg Hogan <code <at> greghogan.com>

Date: Wed, 27 Mar 2024 14:50:01 UTC

Severity: normal

Tags: patch

Full log


Message #80 received at 70031 <at> debbugs.gnu.org (full text, mbox):

From: Greg Hogan <code <at> greghogan.com>
To: 70031 <at> debbugs.gnu.org
Cc: Greg Hogan <code <at> greghogan.com>
Subject: [PATCH v2 05/65] build-system/cmake: Add build.
Date: Tue, 22 Oct 2024 18:08:55 +0000
* guix/build/cmake-build-system.scm (build): New function to replace
the make build with the cmake build command.
---
 guix/build/cmake-build-system.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index 3fab010c85..d827be1806 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -82,6 +82,15 @@ (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t)
       (format #t "running 'cmake' with arguments ~s~%" args)
       (apply invoke "cmake" args))))
 
+(define* (build #:key (parallel-build? #t) #:allow-other-keys)
+  (apply invoke "cmake"
+         `("--build"
+           "."
+           ,@(if parallel-build?
+                 `("-j" ,(number->string (parallel-job-count)))
+                 ;; When unset CMake defers to the build system.
+                 '("-j" "1")))))
+
 (define %test-suite-log-regexp
   ;; Name of test suite log files as commonly found in CMake.
   "^LastTest\\.log$")
@@ -104,10 +113,9 @@ (define* (check #:key (tests? #t) (parallel-tests? #t)
       (format #t "test suite not run~%")))
 
 (define %standard-phases
-  ;; Everything is as with the GNU Build System except for the `configure'
-  ;; and 'check' phases.
   (modify-phases gnu:%standard-phases
     (delete 'bootstrap)
+    (replace 'build build)
     (replace 'check check)
     (replace 'configure configure)))
 
-- 
2.46.1





This bug report was last modified 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.