spacepotato
spacepotato

Reputation: 183

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.

Upvotes: 9

Views: 636

Answers (1)

plonk
plonk

Reputation: 133

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?.

Upvotes: 1

Related Questions