From: Mark Evans (evans_mark_at_[hidden])
Date: 2007-05-02 14:34:31
I would like for a Jamfile to conditionally run a unit test only if the
toolset is gcc. My naive attempt was the following.
rule conditional-unittest ( targets * : sources * : properties * )
if <toolset>gcc in $(properties)
run testing/foo.c libFOO ;
make unittest : : conditional-unittest ;
but this fails with:
object(project-target)@66.add-alternative from module
error: add-alternative called when main targets are already created.
Is there a way to test the toolset property in a Jamfile with something like
if [ get-toolkit ] = gcc
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