[Cmake] ADD_EXECUTABLE -- include hfiles in srclists?

Mark Foskey mark_foskey at unc.edu
Mon Mar 10 13:56:58 EST 2003


Should I include .h files in the source list(s) for an ADD_EXECUTABLE 
function?  By analogy with a makefile, one might think not, since the 
surce list is typically (or at least often) used to generate the .o 
files.  But, I have seen CMakeLists.txt files that had the .h files 
included, and perhaps they are used to acquire dependencies.

I ask this because I am using some code that (nonstandardly) has ".hpp" 
files, which seem to trigger the request for a .o file in the generated 
Makefile.  I am in a position to rename the files to .h files if 
necessary, but I'd like to know if it even belongs in the srclist.

-- 
Mark Foskey    (919) 843-5436   Computer-Aided Diagnosis and Display Lab
mark_foskey at unc.edu             Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey   Chapel Hill, NC  27599-7515




More information about the CMake mailing list