Boost logo

Boost-Build :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-11-30 02:38:19

HERMIER Christophe wrote:
> When I want to build a project (except for very simple ones),
> I need to get the relevant versions of various modules from my source
> control,
> for example version 2.00 of some in-house library
> plus version 3.45 of another library
> and maybe the in-house library uses another one
> behind the scenes that I need to...

I'm facing the same requirements (as I guess most users do).

What I've done in my current project, is to write some scripts to fetch the
correct versions of the dependencies and some scripts that build/install the
dependencies (if needed) to known location within the project.

Some dependencies are external and located at e.g. and some are
internal (stored in our Perforce server).

I then created a very simplistic Jamfile that wraps this functionality using
the bjam SHELL rule. It's not optimal, but updating/building the
dependencies is most often only performed once per workspace. I can then
invoke e.g. "bjam deps --update" or "bjam deps --build" from the project
root to perform the desired actions.

A simpler alternative, but more disk-consuming at the server, is to branch
the needed projects at their correct versions into the project itself (for
internal dependencies). Similarly, you could simply add the needed external
libraries to your own version control system together with your project.

There are numerous alternatives, and I guess what is best for you depends on
your specific requirements and your tools (especially regarding your version
control system).

This is my current project layout (with regards to dependency management).

    deps (dependencies)
        build (scripts for getting/building + wrapper Jamfile)
        lib (libs, per-dependency subdir)
        include (include, per-dependency subdir)
        src (source, per-dependency subdir)

> I see nothing in the documentation of Boost Build concerning Version
> Control...
> Does it mean you consider this out of scope ? or
> maybe it's in the plans but I did not see ?

I'm not really sure - perhaps better to leave that out (at least for the
moment) and get "finished" with the current scope.

> More generally it is not totally clear to me what Boost Build is (or
> not) :
> - a program to build executables from C++ sources
> - a program to build "anything" from all sorts of source ?

I'd say the latter (which of course implies the other alternative as well).



Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at