[Cmake] dependencies

Brad King brad . king at kitware . com
Mon, 12 Nov 2001 15:52:24 -0500 (EST)


Franck,

After Bill sent you the AddCMakeDependFile solution, we realized that it
will cause problems with .DSP files in windows reloading during every
build.  It would probably work okay for unix, but the annoyance in windows
means it should not be used.

I have just checked in a change that should allow a "dependency hint"
mechanism to solve your proplem.  In your command, add to the cmSourceFile
instance the full path to the header in its depends member.  For example:

cmSourceFile file;
// ... setup source file ...
// Add dependency hint to missing file.
file.GetDepends().push_back(pathToDrawingDotH);

This will cause the UNIX dependency generator to add the proper path even
though the file doesn't exist.  If the .h does exist when the dependency
generator is run, the hint will not hurt anything, and the full set of
dependencies should be generated.

I have not tested this, other than a quick check that the change I checked
in doesn't break anything else.  There may yet be something we haven't
considered.  Please let us know what happens.

-Brad