diff mbox series

[bug#69476,7/8] guix: cmake-build-system: Handle unknown systems.

Message ID 4d426a20ba51e666b481324ff6300ad2af98a5f3.1709219325.git.jean@foundationdevices.com
State New
Headers show
Series guix: Add xtensa-ath9k-elf platform. | expand

Commit Message

Jean-Pierre De Jesus DIAZ Feb. 29, 2024, 3:20 p.m. UTC
* guix/build/cmake-build-system.scm (configure): Use Generic as the
  system name if the system is unknown.

Change-Id: Ifd4a618ef67eb420b02d48f05291571aea44e46e
---
 guix/build/cmake-build-system.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index d1ff5071be..0774124c95 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -69,9 +69,13 @@  (define* (configure #:key outputs (configure-flags '()) (out-of-source? #t)
                                              target "-gcc")
                               (string-append "-DCMAKE_CXX_COMPILER="
                                              target "-g++")
-                              (if (string-contains target "mingw")
-                                  "-DCMAKE_SYSTEM_NAME=Windows"
-                                  "-DCMAKE_SYSTEM_NAME=Linux"))
+                              (cond
+                                ((string-contains target "mingw")
+                                 "-DCMAKE_SYSTEM_NAME=Windows")
+                                ((string-contains target "linux")
+                                 "-DCMAKE_SYSTEM_NAME=Linux")
+                                (else
+                                 "-DCMAKE_SYSTEM_NAME=Generic")))
                         '())
                   ,@configure-flags)))
       (format #t "running 'cmake' with arguments ~s~%" args)