Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build system for project that uses C and Haskell

I am working on a project that uses C and Haskell. Currently, I am using CMake to build a C shared library and cabal to build a Haskell executable. Is there a more unified way to do this? Can I invoke cabal from the Makefile generated by CMake or is there a way to build the C library directly from Cabal? Thanks.

like image 893
spacepotato Avatar asked Jul 25 '14 15:07

spacepotato


1 Answers

CMake could also do what you want. It does however duplicate lots of the functionality of cabal. So you could call cabal from whatever build tool you choose to use (for cmake, using a custom command, for makefiles, it's pretty self-explanatory), build binaries directly (see cabal build -v).

See Is it possible to use cmake for Haskell projects?.

like image 171
plonk Avatar answered Oct 30 '22 09:10

plonk