[CMake] compiling foo.c as a c++ file for visual studio projects

Jon W knowdat at gmail.com
Fri Jun 15 12:45:07 EDT 2007


I'm using cmake to generate solutions for Visual Studio 2003.  With
several of the projects I need to compile the *.c files as c++ code.

I'm trying to get the /TP flag to override the /TC flag that is
automatically generated by cmake, but not having much luck.  I've read
the mailing archive, and the only good workaround seemed to be
renaming foo.c to FOO.C or foo.cpp.  The problem is that I have
hundreds of files such as this from vendor libraries that I build, and
it would be a continual task to rename files every time there is an
update.

Was the COMPILE_LANGUAGE property ever incorporated into cmake?
  http://www.mail-archive.com/cmake@cmake.org/msg01326.html

Any other solutions that people have gotten to work with Visual Studio?

Thank you,
Jon


More information about the CMake mailing list