Boost logo

Boost-Build :

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:
> Hi!
> 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, david.abrahams at, gregod at, cpdaniel at, john at