Boost logo

Boost-Build :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2007-04-24 05:03:11


This is probably not possible (or perhaps not even desirable to resolve),
but I just need to get some comments on this issue:

1. Suppose that file a.cpp depends on a.hpp and a_util.hpp (included from
a.cpp).
2. Suppose that running bjam in the project folder happily produces the exe
"a".
3. Then, I delete a_util.hpp and rerun bjam (without the -a flag).
4. Nothing happens, as the change isn't detected.

This can't be the desired result. Intuitively, I'd expect an attempt for
recompilation of a.cpp with a failure due to the missing header. I've been
bitten by this a couple of times and now most often remember to do bjam -a
after deleting or moving headers. However, my automated build servers(*)
does not "remember" this ... so I need to log on to those machines and
initiate a rebuild manually.

I realize why the recompilation shouldn't happen in the general case, as
this would otherwise cause constant rebuilds whenever bjam couldn't locate
an included header file. Implementation-wise I guess (or I might even have
checked the code at some point in time) that the modification time of not
found headers are set to '0', which in practice means that they will never
cause a rebuild of the dependent target.

The question is - would it be possible to implement this behaviour for
headers located within one's own projects? What could a possible solution
be - signature/crc-based dependency checking? Keeping an on-disk cache of
the found header files (IIRC this already exists via some bjam command-line
argument)?

Comments?

/ Johan

(*) One could of course argue that a build server should always run clean
builds, but the turnaround times quickly becomes too long if we do that.
Instead, I prefer a nightly clean build and running incremental builds
during the rest of the time.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk