[CMake] -DCMAKE_C_COMPILER:string="g++"

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Aug 8 22:14:03 EDT 2007


On 2007-08-08 21:52-0400 Bill Hoffman wrote:

>> one of the c files includes a c++ file that is why I need to compile my c 
>> files with g++ and not gcc. One of the solution would be to rename my c 
>> file cpp or cxx
>> thanks,
>> Marie
>> 
> You can also set the language for that .c file to CXX.
> set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)

Bill, the LANGUAGE property for set_source_files_properties is not
documented.  Please fix!

However, I am very glad that you mentioned this PROPERTY is recognized by
CMake since it should work to solve an Ada language support issue that has
just arisen.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list