haskell / haskell/cabal

Need a way to specify C options only for c-sources

Open
#1,405 4 comments 0 reactions 0 assignees View on GitHub
Cabal: file format Cabal: other old-milestone: ⊥ type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Right now, if you use `cc-options: -std=c++11`, this option gets passed to hsc2hs as well as whatever compiler you're using to build your c-sources. Which does not work if your c-sources are C++ (and you want to use C++11), and hsc2hs is compiling a C file.

In brief, cc-options should only apply to files listed in c-sources. Even better would be to have cxx-options and cxx-sources, along with a way to specify which compiler to use for C++ code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.