Overriding CPP preprocessor on OSX

I'm having some problems[0] with the derive-storable package on OSX I don't have on Ubuntu. I would like to use g++ rather than clang to preprocess CPP code. Is there a way to do this with cabal? Thanks! 0: https://github.com/mkloczko/derive-storable/issues/1

Cody Goodman writes:
I'm having some problems[0] with the derive-storable package on OSX I don't have on Ubuntu. I would like to use g++ rather than clang to preprocess CPP code. Is there a way to do this with cabal?
Thanks!
You can go a step further and avoid depending on cpp from any of the big C compilers! Add `hpp` to your `build-depends`, and add this to your .cabal file, ``` ghc-options: -pgmPhpp ``` Then if the preprocessor does something untoward, we can actually fix it! Or you can use the same style of `ghc-options` flag to call gcc's cpp. Anthony
participants (2)
-
Anthony Cowley
-
Cody Goodman