Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-01-22 21:41:52


I'm trying to detect in a rule definition whether or not the current target is
being built as variant=debug or variant=release. I know about conditional
properties, but they won't assist here, as I don't simply want to supply
different parameters to the compiler, I want to branch the whole behaviour.

I've tried simply reading _any_ feature specified at the command line into a
variable, and can't seem to do so:

Running the attached test.jam module from the command-line with

    bjam thing=hello

I'd expect to see hello assigned to thing, but isn't happening. This must be
something simple.


# Contents of test.jam

import feature ;
import toolset ;
feature.feature thing : : free ;
toolset.flags test.test THING : <thing> ;

rule test ( )
        ECHO $(THING) ;

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