On 2008-03-24 10:27-0400 Bill Hoffman wrote:
One more warning about adding your own -I flags... I think this will break the dependency scanner of CMake, and the depends will be wrong if you do not use include_directories.
Our use case is we have a directory where our many different device drivers are built with wildly varying compilation flag (both -I and -D) requirements. So it seemed natural to use SET_SOURCE_FILES_PROPERTIES( ... PROPERTIES COMPILE_FLAGS ...) to handle each device driver separately rather than using ADD_DEFINITIONS and INCLUDE_DIRECTORIES. The method appears to work fine, but I haven't tested the case where some external library header has been changed to see if CMake responds properly. I will probably just stick with the present method until CMake adds the feature of per-target ADD_DEFINITIONS and INCLUDE_DIRECTORIES (assuming they do handle the external dependency case correctly). For PLplot headers scattered all over our build tree for our various libraries we do use INCLUDE_DIRECTORIES to find them so all the internal dependencies should be correct. 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