Boost logo

Boost :

Subject: Re: [boost] [build] Tests automatically create header links, but library builds do not
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-01-05 11:33:44

On Mon, Jan 5, 2015 at 4:01 PM, Peter Dimov <lists_at_[hidden]> wrote:
> Andrey Semashev wrote:
>> Yes, IIRC, Peter suggested to add fake #includes to the code and I didn't
>> like it.
> My suggestion still stands. We had this problem with Boost.Config, John
> added the includes in an #if 0 section instead of not liking it for weeks,
> and we haven't had a problem since.
> Sure, you could sweep the problem under the carpet by always generating all
> links, but the fact that any dependency scanners (such as boostdep and build
> systems) will not be aware of your dependencies will still remain.

My opinion is that any tool that intends to parse C++ should do it
right, Boost.Build included. Otherwise I cannot rely on the tool and,
I don't want to mangle the code to make it happy. The situation is
similar to Doxygen - it works most of the time, but it takes a lot of
effort to make it work right with real code, and ironically this often
makes the code less readable.

There's another point: you'll have a problem when we want to
differentiate dependencies based on some criteria (OS, compiler, C++
version, build configuraion, etc.) Code mangling doesn't help here,
not until Boost.Build gets a proper C++ preprocessor.

Actually I'd say that the ability of Boost.Build to parse C++ is a
misfeature since a build system should typically be as language
neutral as possible. I understand that Boost.Build is primarily
targeted for Boost, which is C++, but still I think this is one point
where it does more than it should.

Boost list run by bdawes at, gregod at, cpdaniel at, john at