[CMake] building c code as c++ code
Brandon Van Every
bvanevery at gmail.com
Sun Jun 10 11:11:42 EDT 2007
On 6/10/07, John Pretz <pretz at umdgrb.umd.edu> wrote:
> Yes, if I say: PROJECT(projectname CXX) in the source, then it doesn't
> generate a target for my .c files. The resulting makefiles don't even
> try to compile the .c file.
Hrm, that sucks. I would look in the bug tracker about this. CMake
shouldn't be making draconian assumptions about .c or .C suffixes.
I'll wager a workaround is to use (PROJECT blah CXX C) and pass a
"compile as C++" flag to the compiler somehow. Lotsa stuff in the
mailing list archives about how to pass compiler flags. I guess if
that workaround works, then the issue is not a showstopper, just
significantly annoying. You should still ping bug tracker so that
people realize the issue does affect people.
Cheers,
Brandon Van Every
More information about the CMake
mailing list