[CMake] Making a library with no *.cpp files.

Andrew Maclean andrew.amaclean at gmail.com
Sun Jun 25 20:59:36 EDT 2006


If I use Cmake to make a library where the source files are exclusively
header files (*.h) then I get a message saying it cannot determine the
language to use  - which is correct.
The way I get around this is to have a dummy cpp file. This then tells CMake
what language to use because it sees the .cpp extension and assumes the
commpiler is a c++ compiler..

Is there another way to tell CMake that the library should be linked as C++?
I am wondering if there is a SET_SOURCE_FILES_PROPERTIES() or something like
that I can use.

I suspect I can use .hpp as the extension but I don't really want to ebcause
too much other code depends upon the header files.


Andrew


-- 

___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.cas.edu.au/
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060626/1c4762d3/attachment.htm


More information about the CMake mailing list