summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDariqq <dariqq@posteo.net>2025-08-11 06:30:46 +0000
committerAndreas Enge <andreas@enge.fr>2026-02-10 17:33:07 +0100
commita1c5edf0163422c1f0eb56d7778f66a9cb2ec10d (patch)
tree83f5d0fd677caad69401f67ee8a47061123c904b
parent2b4a4295cc644ad01142c7f6749fb56023fc9f51 (diff)
build-system: cmake: cmake-system-name-for-target: Use match.
* guix/build-system/cmake.scm (cmake-system-name-for-target): Use match instead of cond. Change-Id: I57ebd07406693b19c83b6d1d643146adca4f8797 Signed-off-by: Greg Hogan <code@greghogan.com>
-rw-r--r--guix/build-system/cmake.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index faf441b3a7d..0e6cbdcd7f2 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
+;;; Copyright © 2025 Dariqq <dariqq@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build-system cmake)
+ #:use-module (ice-9 match)
#:use-module (guix store)
#:use-module (guix gexp)
#:use-module (guix utils)
@@ -45,11 +47,12 @@
(define* (cmake-system-name-for-target
#:optional (target (or (%current-target-system)
(%current-system))))
- (cond ((target-hurd? target) "GNU")
- ((target-linux? target) "Linux")
- ((target-mingw? target) "Windows")
- ;; For avr, or1k-elf, xtensa-ath9k-elf
- (else "Generic")))
+ (match target
+ ((? target-hurd?) "GNU")
+ ((? target-linux?) "Linux")
+ ((? target-mingw?) "Windows")
+ ;; For avr, or1k-elf, xtensa-ath9k-elf
+ (_ "Generic")))
(define %cmake-build-system-modules
;; Build-side modules imported by default.