[Cmake] header files

Phil Pritchett p.pritchett at 2d3.com
Thu Dec 13 06:50:08 EST 2001


That reminds me, it would a good idea to add a CMake variable that indicates
visual c++ usage
as this is often more useful (as it is compiler specific) than WIN32. 
At some point I'll add one called VISUALCXX 


> -----Original Message-----
> From: Ian Scott [mailto:ian.m.scott at stud.man.ac.uk]
> Sent: Thursday, December 13, 2001 11:33 AM
> To: Phil Pritchett
> Cc: Cmake at Public. Kitware. Com (E-mail); Geoff Cross (E-mail)
> Subject: RE: [Cmake] header files
> 
> 
> Phil,
> 
> We have done it for some things in $VXLROOT/mul, where it 
> very usefully
> causes the identifier name, and class member completion to work.
> 
> You can just add the .h files to SOURCE_FILES list. This does 
> the correct
> thing under MSVC.
> Unfortunately under Unix makefiles, this causes the make to attempt to
> compile the .h files. So you simply put a guard around the 
> addition of the
> .h files as in the following example.
> 
> e.g. in $VXLROOT/mul/mbl/CMakeLists.txt
> 
> > ADD_LIBRARY(mbl mbl_sources)
> >
> > SOURCE_FILES(mbl_sources
> > mbl_gamma.cxx
> > mbl_matrix_products.cxx
> ...
> > )
> >
> ...
> >
> > IF (WIN32)
> >   IF (NOT CYGWIN)
> >     INCLUDE( ${allvxl_SOURCE_DIR}/mul/mbl/CMakeListsHeaders.txt )
> >   ENDIF (NOT CYGWIN)
> > ENDIF(WIN32)
> 
> and then in $VXLROOT/mul/mbl/CMakeListsHeaders.txt
> 
> > SOURCE_FILES(mbl_sources
> > mbl_gamma.h
> > mbl_matrix_products.h
> ...
> > )
> 
> 
> You could of course put the contents of CMakeListsHeaders.txt 
> directly into
> the CMakeLists.txt file.
> 
> I guess we should extend this system to the rest of VXL - it has been
> working with no problem for over a month now.
> 
> Regards,
> Ian
> --------------------------------------------------------------
> Ian Scott              	 BT/Royal Commission Industrial Fellow
> Dept. of Imaging Science        	ian.m.scott at stud.man.ac.uk
> Stopford Building				  tel: +44 
> (0)161 275 7357
> University of Manchester		  fax: +44 (0)161 275 5145
>                             http://www.isbe.man.ac.uk/~iscott/
> 
> 
> 
> > -----Original Message-----
> > From: Phil Pritchett [mailto:p.pritchett at 2d3.com]
> > Sent: Thursday, December 13, 2001 11:20 AM
> > To: Cmake Mailing List (E-mail)
> > Subject: [Cmake] header files
> >
> >
> > Is there anything I can do in CMake so that my header files appear
> > in dsp files (preferably under the Header Files folder) ?
> >
> > Cheers,
> > Phil
> >
> > This e-mail, and any attachment, is confidential. If you have
> > received it in
> > error, please delete it from your system, do not use or disclose the
> > information in any way, and notify me immediately.
> > _______________________________________________
> > Cmake mailing list
> > Cmake at public.kitware.com
> > http://public.kitware.com/mailman/listinfo/cmake
> >
> 

This e-mail, and any attachment, is confidential. If you have received it in
error, please delete it from your system, do not use or disclose the
information in any way, and notify me immediately.



More information about the CMake mailing list