Subject: Re: [boost] questions regarding dependency reports(s)
From: John Maddock (boost.regex_at_[hidden])
Date: 2014-09-27 04:36:38
> What would it take to make a version of BCP which, given
> an arbitrary group of source files, returns a list of headers
> and *.cpp files which could be used to build the app?
bcp will do that now with the --scan option, for example:
bcp --list --scan myfile.cpp
Will list the dependent headers and source files of myfile.cpp.
However, note that:
* It finds too much - broken compiler workarounds pull in additional
includes you may not need on *your* compiler - this is the most common
complaint - but of course without this the subset isn't actually
portable. I suspect (with no data to back it up!) that this issue may
reduce as we increasingly support only newer compilers.
* It finds too much (part 2) - if it finds a header from library X, and
library X has some source files associated with it, then those files and
their dependencies get included. Of course there are some libraries
that have "optional" source files - only required if you use some
specific header subset.
* It finds too little - it can't follow obfuscated includes (via
preprocessor defs) - though neither can other dependency scanning tools
as far as I know. There is a mechanism inside bcp to add specific
manual dependencies when required, but as you can imagine, it's always
out of date.
One point worth noting - bcp is not an offline installer - it can only
scan what's on your hard drive. I guess though it could be used to
produce an install list for each library with each release - that would
get us into an endless debate about what such a list should include:
1) Dependencies required to use the library.
2) What about optional dependencies / from bridging/glue headers?
3) What about dependencies required by examples/tests?
I guess that (2) and (3) could be made separate packages?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk