Boost logo

Boost-Build :

Subject: Re: [Boost-build] Creating own features without changing the compilation path
From: Vladimir Prus (ghost_at_[hidden])
Date: 2013-11-18 13:28:57


On 18.11.2013 21:15, Max Moorkamp wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have several parts of my libraries and programs that I only want to
> compile under certain conditions. From searching the web and the boost
> build documentation, user defined features seem to be the right thing
> to achieve this. In fact, having something like
>
> feature.feature gpu : off on : composite ;
> feature.compose <gpu>on : <define>HAVEGPU ;
>
> feature.feature lapack : off on : composite ;
> feature.compose <lapack>on : <define>HAVELAPACK ;
>
>
> and some conditional requirements do the job. However, each of these
> features results in an addition to the output path, e.g.
>
> MT/bin/gcc-4.6/release/gpu-on/lapack-on/threading-multi/MTCovar_test
>
> Now, I should have a few more of these features to enable/disable some
> non-essential but desirable parts of the code on certain machines by
> which time the path will become very convoluted. I understand the idea
> behind the paths, but in my case on a given machine compilation will
> happen with the same set of features, so it is perfectly acceptable to
> me to recompile everything if I change the value of a feature.
>
> Is there a way to switch this behavior off? Is there an alternative
> that does what I want?

Try making these features 'incidental', e.g.:

        feature.feature gpu : off on : composite incidental ;

- 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