[CMake] How to switch off dependencies in special cases?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Jan 16 16:48:36 EST 2007


On 2007-01-16 16:06-0500 Philip Lowman wrote:

> Jorrit Schaap wrote:
>> Is it possible to tell cmake to igore the changed timestamp of a 
>> particular
>> file when it scans for dependencies?
>
> I don't know the answer to your question but just in case you haven't thought 
> of this workaround to your problem, you should check out the manpage for the 
> touch program.  Using it you can set the modified timestamp of a file to be 
> what it was prior to editing it.  If one had to do it enough I'm sure you 
> could wrap the editing with a simple shell script.

Or the man page for GNU make (if that is what you are using).  The -t option
to that version of make touches files instead of running commands so it
is particularly useful for the problem you describe.

>
> Be advised though that this is very dangerous if you start making changes 
> that aren't simply comments. :)

I fully agree with this warning.  So the pattern should be run "make" to get
everything up to date, edit (only!) comments , then run "make -t" to get
everything up to date again without actually compiling anything.

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 Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list