[CMake] building c code as c++ code
kitts
kitts.mailinglists at gmail.com
Sun Jun 10 11:18:56 EDT 2007
On Sunday 10 Jun 2007 8:41:42 pm Brandon Van Every wrote:
> 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.
Solving this might even solve the case of assembly files. At least with GCC
where GCC *can* assemble the file but its not passed as a file to the
compiler.
Is there a cmake variable to set/get the file extentions supported by the
compiler?
--
Cheers!
kitts
More information about the CMake
mailing list