On 2007-05-19 13:40-0700 Alan W. Irwin wrote:
So what is the correct way to set up source-file dependencies on files in another directory?
Answering my own question this is one way (the only way?) to do it: set( ionize.f_INCLUDE ${CMAKE_SOURCE_DIR}/include/aux_scale.h ${CMAKE_SOURCE_DIR}/include/constants.h ${CMAKE_SOURCE_DIR}/include/nuvar.h ${CMAKE_SOURCE_DIR}/include/statistical_weights.h ) set_source_files_properties( ionize.f PROPERTIES OBJECT_DEPENDS "${ionize.f_INCLUDE}" ) where ionize.f includes the files aux_scale.h, constants.h, nuvar.h, and statistical_weights.h. I have written a python script (see http://freeeos.svn.sourceforge.net/viewvc/freeeos/trunk/src/include_depends.py?view=log) to parse my fortran source files and generate the appropriate pattern similar to above for each of them. This script is quite specific to my own fortran coding style so it would take some work to generalize it, but it is a start on correctly dealing with fortran include file dependencies. 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 __________________________ _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake