Subject: Re: [Boost-build] Rebuild c++ source when header file is removed (orrenamed)
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2010-01-12 10:22:03
Anatoli Sakhnik wrote:
> Thereâs one annoying thing, I canât help it. Sometimes we rename our
> header files, and when we try to build the project, the source files,
> which included those headers arenât rebuilt. This leads either to
> linker errors or even to incorrect binaries in the worst case.
This is an "old" issue: see e.g.
> Is this behaviour indentional? Should the source file with missing
> includes be declared as outdated?
That would probably be the ideal thing, but in the perhaps not-so-uncommon
case where you use headers from some implicitly used header directories
(that aren't known to Boost.Build) this would likely lead to constant
recompilation, when the included headers can't be located.
What would be needed in order to "fix" this problem more cleanly is some
kind of state saved in between bjam invocations (e.g. "this header was found
last time we build with this timestamp, but now it's no longer found"), but
I guess that's quite a lot of work to implement.
Regards / Johan
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