summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/cmake.scm2
-rw-r--r--guix/build/cmake-build-system.scm7
2 files changed, 8 insertions, 1 deletions
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index 0fc7b62c1b..5673ad5aeb 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -49,6 +49,7 @@
(make-flags ''())
(cmake (default-cmake))
(out-of-source? #t)
+ (build-type "RelWithDebInfo")
(tests? #t)
(test-target "test")
(parallel-build? #t) (parallel-tests? #f)
@@ -83,6 +84,7 @@ provides a 'CMakeLists.txt' file as its build system."
#:configure-flags ,configure-flags
#:make-flags ,make-flags
#:out-of-source? ,out-of-source?
+ #:build-type ,build-type
#:tests? ,tests?
#:test-target ,test-target
#:parallel-build? ,parallel-build?
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index 7d60ab7aa9..74b4f01425 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;;
@@ -32,6 +32,7 @@
;; Code:
(define* (configure #:key outputs (configure-flags '()) (out-of-source? #t)
+ build-type
#:allow-other-keys)
"Configure the given package."
(let* ((out (assoc-ref outputs "out"))
@@ -47,6 +48,10 @@
(format #t "build directory: ~s~%" (getcwd))
(let ((args `(,srcdir
+ ,@(if build-type
+ (list (string-append "-DCMAKE_BUILD_TYPE="
+ build-type))
+ '())
,(string-append "-DCMAKE_INSTALL_PREFIX=" out)
;; add input libraries to rpath
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"