[Scons-users] Listing all dependent headers?
Dirk Bächle
tshortik at gmx.de
Sun Oct 20 14:23:54 EDT 2013
Hi Andrew,
On 20.10.2013 19:34, Andrew C. Morrow wrote:
>
> I have a C++ header file that is intended for end user consumption,
> which in turn depends on many other headers. Part of our build process
> is to install this header and its dependencies to an install
> directory. But sometimes the hand-rolled list of dependent headers
> becomes out of date. I'd prefer that this list be auto-generated so it
> can no longer become stale.
>
note that there is also the FindSourceFiles() method, which you could
use to search all source files automatically. If required,
filter out the header files only, and then add the remaining Nodes to
your Install alias. Just as an idea, untested though.
> I'd hoped that I could easily get the first level of required headers
> by saying:
>
> requiredHeaders = SourceFileScanner(env.File("user/facing/thing.h"), env)
>
The call itself should work like this. Maybe something is wrong in the
way you setup CPPPATH?
Please, try a less contrived example first, where all header are on the
same subfolder level for example. Does it work then?
Otherwise, a simple example project would help to track this down...
Best regards,
Dirk
More information about the Scons-users
mailing list