[Haskell-cafe] passing cpp options to c2hs from cabal
Daniel Fischer
daniel.is.fischer at web.de
Sat Feb 27 15:44:15 EST 2010
Am Samstag 27 Februar 2010 21:27:27 schrieb Chris Casinghino:
> Hi all,
>
> I have a question about cpp, c2hs and cabal. The short version:
>
> What can I put in my cabal file to get "-cppopts=-U__BLOCKS__" passed
> as an argument in calls to c2hs?
Maybe
cc-options: -U__BLOCKS__
is worth a try.
>
> Longer story:
>
> I need to set up my cabal file so that c2hs gets this extra option to
> make things build smoothly on some macs. If I run cabal from the
> command line, I can pass it:
>
> cabal install --c2hs-options='--cppopts=-U__BLOCKS__'
>
> And this works great. I need to make my .cabal file do this, but
> c2hs-options doesn't seem to be accepted there. I tried:
>
> cpp-options: "-U__BLOCKS__"
>
> But if I run cabal install -v I can see this isn't being passed on to
> c2hs:
>
> ...
> /home/ccasin/.cabal/bin/c2hs --include=dist/build
> --cppopts=-D__GLASGOW_HASKELL__=610 --cppopts=-Icontrib/libpuz/include
> --output-dir=dist/build --output=Codec/Game/Puz/Internal.hs
> ./Codec/Game/Puz/Internal.chs
> ...
>
> Thanks!
>
> --Chris Casinghino
More information about the Haskell-Cafe
mailing list