mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
build-system: cmake: Rework cross compilation.
Move the extra configure flags for cross building out from the build side code and instead prepend them to the configure-flags. Use new procedure cmake-system-name-for-target to add support for hurd and bare-metal targets. * guix/build/cmake-build-system.scm (configure): Move cross build flags from here ... * guix/build-system/cmake.scm (cmake-cross-build): ... to here. (cmake-system-name-for-target): New procedure. Change-Id: Ic68acc246e543491ed147e53d47cec5de46b82cb Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
f5fa65b3e9
commit
ad672d80d7
2 changed files with 18 additions and 12 deletions
|
@ -62,17 +62,6 @@
|
|||
,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib")
|
||||
;; enable verbose output from builds
|
||||
"-DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
|
||||
;; Cross-build
|
||||
,@(if target
|
||||
(list (string-append "-DCMAKE_C_COMPILER="
|
||||
target "-gcc")
|
||||
(string-append "-DCMAKE_CXX_COMPILER="
|
||||
target "-g++")
|
||||
(if (string-contains target "mingw")
|
||||
"-DCMAKE_SYSTEM_NAME=Windows"
|
||||
"-DCMAKE_SYSTEM_NAME=Linux"))
|
||||
'())
|
||||
,@configure-flags)))
|
||||
(format #t "running 'cmake' with arguments ~s~%" args)
|
||||
(apply invoke "cmake" args))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue