boostorg/boostdep

Better interrogation of dependencies beyond src and test

Closed this issue · 5 comments

Some libraries have benchmark, example, and tool directories. Currently the python method to scan for dependencies does not look for either. Instead perhaps, could the tool simply scan for all source code files in the entire project directory?

When I added a "tool" directory with program source that uses boost::program_options into Boost.Format, boostdep failed to pick that up.

Ideally if one could ask bjam for a list of all sources within a project, that would be even better.

Yes, in principle. I added example recently in addition to test because many libraries build the examples as a part of the test suite but there should probably be a mechanism for controlling which directories are scanned.

In this specific case however, do you actually need the dependencies of the tool directory when running the tests?

Recently I found the format/benchmark had rotted because it wasn't built regularly, so I want the format/benchmark and format/tools directories to build properly. What I am doing right now is that as part of the CI build I copy the sources from tools into test, so the deps tool picks it up. It works, but it would be nice if the deps tool could ask bjam for a list of source code files in the project?

That's probably not possible in the general case, because the point of depinst.py is to determine what to install, but until everything necessary is installed, b2 test will generally error out due to not finding the not-installed parts.

I should just add an option through which one would pass additional directories to scan.

Or parse the top level Jamfile which is typically just including subdirectories, but yes, allowing for additional directory names would work for me in this case. Thanks!

Added support for -I this -I that in e27e853.