[Haskell-cafe] Building examples with Cabal
Heinrich Apfelmus
apfelmus at quantentunnel.de
Wed Oct 16 12:49:19 UTC 2013
Sven Panne wrote:
> Is there a way to build examples in a Haskell package with Cabal
> without actually running them? "cabal test" and "cabal benchmark"
> don't really do what I want, I just want to check if e.g. all GLUT
> examples in https://github.com/haskell-opengl/GLUT/tree/master/examples
> still build after some API changes. Another requirement would be
> parallel builds, I want to actually use the 32 cores I have under my
> desk. ;-) Currently I use a recursive "make" infrastructure
> (https://github.com/haskell-opengl/GLUT/blob/master/examples/Makefile),
> which works OK, but it is quite a hack, is partly incorrect and, well,
> needs "make".
I usually declare an "Executable" for each example and add a flag
"buildExamples" that controls whether the examples are built or not.
Here an example .cabal file.
http://hackage.haskell.org/package/threepenny-gui-0.3.0.0/threepenny-gui.cabal
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
More information about the Haskell-Cafe
mailing list