Boost logo

Boost-Build :

Subject: Re: [Boost-build] Reporting include paths for a project
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-11-15 04:50:49

On 15 November 2013 04:29, foster brereton <fosterb+boost_at_[hidden]> wrote:
> This will tend to vary file-to-file, especially with projects that
> have multiple dependencies.

I don't quite understand.

If I have a project tree like this:



cd /
b2 --show-include-paths

would be able to list all includes determined from use of Boost.Build
features [1] like 'use' and 'include', etc.
IOW, b2 knows what to pass to compiler as value of -I option,
so why it couldn't simply output list of those paths?


>> One thing you can do is pass the -d2 flag to b2 during the build. This
>> will echo the command used to compile a given translation unit, which
>> will include the paths passed:
>> b2 -d2

That could serve as a little prosthesis for a solution I'm looking for.

I don't want to actually build, just inspect some build setup.
So, I'd have to do sort of a dry-run, I guess, with:

b2 -d2 -n

However, I'd have to implement compiler-specific parsing, meaning,
I'd have to do the job Boost.Build already does, doesn't it?

Alternative solution is to create Jamfile parser on my own,
but that's scary overkill that would repeat the job already done.

Shortly, if Boost.Build knows what to pass to compiler, why it couldn't
echo it out in an easily consumable form.

Best regards,

Mateusz  Loskot,

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at