|
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:
/Jamroot
/a/Jamfile.v2
/b/Jamfile.v2
/a/a1/Jamfile.v2
/a/a1/a2/Jamfile.v2
then
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?
[1] http://www.boost.org/boost-build2/doc/html/bbv2/overview/builtins/features.html
>> 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, http://mateusz.loskot.net
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