|
Boost-Build : |
Subject: Re: [Boost-build] several small question
From: Vladimir Prus (ghost_at_[hidden])
Date: 2012-03-21 01:05:00
George,
On 21/03/12 06:52, George Georgiev wrote:
> Hi,
>
> I have a few questions that I can not find in the documentation.
>
> 1. How to list all available targets, say b2 list
There is no such way presently.
> 2. How to create a custom group of targets, say unit-test,
> integration-test and performance-test. When I create a test project I
> want to make something like:
>
> DEPENDS unit-tests : testa ;
>
> then when I run b2 .... unit-tests it to compile and execute all unit
> tests, etc with integration-test and performance-test
You need to use the 'alias' metatarget. E.g.
alias unit-tests : testa testb ;
Note that metatarget names are local to Jamfile, so
b2 unit-tests
from a different directory will not find it, unless that one directory
also has a metatarget called 'unit-tests'.
>
> 3. May I prioritize targets (group of targets). I have relatively big
> project - usually I build with -q. Unfortunately if I break a test
> even for a very low level library its test could be executed after
> most of the dependent projects are already compiled and linked - which
> is pointless. I would like to set the unit-tests targets to be with
> priority.
> Note I do not want to make fake dependencies to accomplish this. Fake
> dependencies may result in building things that I do not care about if
> I specify a single target.
I don't think there's a way to do this. By default, targets are built in
the reverse order of modification time -- that is, most recently modified
sources are built first (see make0sort in make.c).
> 4. How to dump a whole object with all the data it has. echo $(object)
> outputs just its name.
There's no way, each object has to implement printing by itself.
> 5. How to make force only targets. I would like my integration-test
> and performance-test to be compiled and executed only if I specify
> this explicitly. Can I make if I run the build without target
> arguments some of the targets to be omitted.
Does 'explicit' (explained in docs) help here?
HTH,
Volodya
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