Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-02-19 10:10:57


"Hartmut Kaiser" <hartmut.kaiser_at_[hidden]> writes:

>
> Nat Goodspeed wrote:
>
>> > >> Unfortunately bcp isn't smart enough to not look into optional
>> > >> dependencies that are guarded by #ifdef.
>> >
>> > we need a better system. It would be
>> > a lot of work, but maybe it would be the first real use of
>> Wave as a
>> > library rather than just as a preprocessor. We could use the graph
>> > library to do a real search with some knowledge of compiler and
>> > configuration #defines.
>>
>> [Nat] That was my reaction as soon as I first saw John's post
>> "bcp isn't smart enough...": wow, he could use Wave!
>>
>> But I'm confused as to why you'd need the graph library?
>> Wouldn't it work just to point bcp to the compiler of
>> interest -- by giving it the name of one of a set of small
>> prepackaged files that #defines the vendor-specific
>> compiler-predefined macros that Boost cares about -- and let
>> bcp operate on post-Wave, fully-preprocessed source code? Ah:
>> that would actually discard the identities of all the
>> #included files! Sigh.
>
> Some minor comments:
>
> a) Wave can be used to get all the names of the included files directly.
> b) It's probably better to use configuration files containing the defines,
> these are treated as command line arguments then.
> c) As Dave said, there are macros defined in the Jamfile which are difficult
> to extract properly without support for Wave in the build system.

And there are other macros that will be in system headers potentially
not available where bcp is being run, etc. That's why I think it's
probably not possible to do a deterministic preprocessing run and
capture everything you need.

> But generally I like the idea of putting Wave into something useful for
> Boost itself and will happily help to make that happen.

To be perfectly honest, I can't drive this effort. I can offer
algorithmic input and maybe even write some graph search code if it's
needed, but someone else will have to take the lead. I hope that's
you, Hartmut.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net