summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-10-04 22:59:38 +0200
committerLudovic Courtès <ludo@gnu.org>2014-10-04 22:59:38 +0200
commit9849cfc12cada96759af779a105f6999d6cc04c8 (patch)
tree64c1b60ffebda7015affa3d6119358622d966116 /guix/build
parent3dcd78109c62b6837c4397ea60087d13e5f8814d (diff)
build-system/cmake: Add #:build-type parameter, default to "RelWithDebInfo".
* guix/build-system/cmake.scm (cmake-build): Add #:build-type. Pass it in BUILDER. * guix/build/cmake-build-system.scm (configure): Add #:build-type parameter and honor it. * doc/guix.texi (Build Systems): Document #:configure-flags and #:build-type for CMake.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/cmake-build-system.scm7
1 files changed, 6 insertions, 1 deletions
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"