Boost logo

Boost-Build :

Subject: Re: [Boost-build] defining build variants
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-08-12 21:39:53


On 08/12/2015 05:18 AM, Stefan Seefeld wrote:
> I'd like to define a build "variant" (for lack of a better term) that
> allows me to set some properties differently while executing the same tasks.
> Specifically, I'm running 'b2' in python/doc to regenerate (HTML)
> documentation. I'd like to be able to define build parameters (xsl:param
> in my case) differently via command-line options.
> Is it possible to have `b2 something` and `b2 somethingelse` execute the
> same tasks, but with different values of these parameters ?

You can use the same mechanism that works for debug/release.

import feature ;
feature.feature myfeature : something somethingelse :
  implicit composite propagated ;

feature.compose <myfeature>something : /the properties for something/ ;

- implicit allows the use of "something" instead of
  "myfeature=something" on the command line.
- composite indicates that the feature is shorthand
  for a list of other properties.
- You may also need to add "optional" to the feature
  attributes to prevent conflicts in unrelated projects.

In Christ,
Steven Watanabe

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