different cpp-flags to build library?

5 views
Skip to first unread message

Baojun Wang

unread,
May 16, 2017, 3:54:48 PM5/16/17
to haskell-stack
Hi list,

My stack project builds a default library-A (Simple build type), it has an A-exe which uses library A, this works perfectly; however, test suit A-test expects library-A compiled with a different cpp-flags (-DTEST), thus it fails to build if only library-A is added into its dependencies. For now I'm adding the entire library-A modules as ``other-modules`` in test suit A-test, this is quit cumbersome and library-A dependencies have to be added to test-A again. Instead of modify cpp-flags at first place (for library-A), is there a better approach for this particular case?

Thanks & Regards
baojun

Michael Snoyman

unread,
May 17, 2017, 9:34:49 AM5/17/17
to Baojun Wang, haskell-stack

Unfortunately, I'm not aware of a better solution, I've had to set things up similarly in Warp, for example.


--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/5b0b8798-8485-4c55-b0c3-6820dd6852fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baojun Wang

unread,
May 17, 2017, 12:50:13 PM5/17/17
to Michael Snoyman, haskell-stack
Thanks for your reply, make sense, build library with a different cpp-flags could actually build a different library after all.
Reply all
Reply to author
Forward
0 new messages