[Haskell-cafe] Building examples with Cabal
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
> 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.
More information about the Haskell-Cafe