[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70031] [PATCH v2 05/65] build-system/cmake: Add build.
From: |
Greg Hogan |
Subject: |
[bug#70031] [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
- [bug#70031] [PATCH v2 00/65] Use CMake in build-system/cmake., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 01/65] build-system/cmake: Parallelize tests using ctest., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 02/65] build-system/cmake: Add generator fields., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 03/65] build-system/qt: Add generator fields., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 08/65] build-system/qt: Add test-exclude fields., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 09/65] build-system/cmake: Add test exclusion., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 05/65] build-system/cmake: Add build.,
Greg Hogan <=
- [bug#70031] [PATCH v2 07/65] build-system/cmake: Add test-exclude fields., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 06/65] build-system/cmake: Add install., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 11/65] build-system/cmake: Include ninja., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 12/65] build-system/qt: Include ninja., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 14/65] gnu: rdma-core: Remove custom phases., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 16/65] gnu: igraph: Fix tests., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 19/65] gnu: kirigami: Fix tests., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 13/65] gnu: astroid: Remove custom phases., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 18/65] gnu: inkscape/stable: Fix tests., Greg Hogan, 2024/10/22
- [bug#70031] [PATCH v2 22/65] gnu: cpp-httplib: Disable parallel tests., Greg Hogan, 2024/10/22