Boost logo

Boost-Build :

From: Mark Elston (m.elston_at_[hidden])
Date: 2004-06-21 14:57:52


Ok. Now I am beyond the simple issues of properly running (command
line parameters, etc).

I now have a couple of questions about project setup that I cannot
find in the docs anywhere. I tried making use of the examples
directory but nothing there seemed similar to what I am trying
to do.

Let me adapt the 'libraries' example to illustrate what I am trying
to accomplish and, hopefully, someone can tell me how best to proceed.
This will be greatly simplified since we actually have many dozens of
libraries, a couple of dozen include directories, and several exes.

If we have a project setup like so:

root
|
+----exe1
|
+----exe2
|
+----lib1
|
+----lib2
|
+----lib3
|
+----inc1
|
+----inc2

Further, exe1 depends on lib1 and lib2, while exe2 depends on lib2
and lib3.

Is it possible to put the include directories in a top-level
Jamfile (or project-root.jam) along with <cxxflags> settings
so that all projects get them?

Is it possible to specify, at the top-level, variant-specific
settings and make variant-specific variable assignments? If so,
how do we do it. I have tried to put 'VAR = value ;' in
root/Jamfile and root/project-root.jam and refer to it in lower
level Jamfile(s) without success. How do you do this? Also,
how do you set a variable to one value for one build variant
and set it to another value in another variant? How do you
do this in one place for all sub-projects?

One reason for doing this is that we will build and distribute
both debug and release versions of our libraries for use with
debug and release versions of our exes. Since they are all
put in the same place ( .../lib and .../bin) we need to name
them differently. So our libraries get a '_D' appended to the
library name (prior to the .dll or .so suffix) in debug builds.

We have this already using GNU Makefiles and I would like to show
how to do this with bjam. My suspicion is that it will be *much*
simpler and more readable in the long-run.

I may not have explained what I need to do well enough yet but
I hope I got the basic idea out. I have read the v1 and v2 docs
and looked at the examples but cannot find anything that refers
to this kind of project setup. I may have missed it entirely,
though, so if I did please point me in the right direction.

Thanks.

Mark

---------------------------------------------------------------
Mark Elston
melston_at_[hidden]
---------------------------------------------------------------

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk