|
Boost-Build : |
From: Konstantin Litvinenko (Konstantin.Litvinenko_at_[hidden])
Date: 2007-04-04 02:23:00
Hello, Eric!
You wrote on Tue, 03 Apr 2007 12:13:26 -0700:
EN> Sorry for the newbie-ish question, but I couldn't find the answer in
EN> the docs or by playing with BBv2, so ....
EN> I have a situation like this:
EN> project
EN> : requirements
EN> <library>/boost/test//boost_unit_test_framework
EN> <link>static
EN> # MSVC-8's iterator debugging causes some tests to run forever.
EN> <toolset>msvc-8.0:<define>_HAS_ITERATOR_DEBUGGING=0
EN> ;
EN> test-suite "accumulators"
EN> : [ run count.cpp ]
EN> [ run covariance.cpp ]
EN> ...
EN> ;
EN> This causes all of my tests to crash, because the tests are built with
EN> _HAS_ITERATOR_DEBUGGING=0, and the unit test framework is not. What I
EN> really need to do is build my *own* version of the unit test framework
EN> with this define, and link to that. But I don't know how to get the
EN> <define> requirement to propagate to the library.
EN> Can anybody tell me the magic incantation?
Try this
import feature ;
feature.feature iterator_debugging : on off : composite propagated optional
;
feature.compose <iterator_debugging>off : <define>_HAS_ITERATOR_DEBUGGING=0
;
project
: requirements
<library>/boost/test//boost_unit_test_framework
<link>static
# MSVC-8's iterator debugging causes some tests to run forever.
<toolset>msvc-8.0:<iterator_debugging>off
;
test-suite "accumulators"
: [ run count.cpp ]
[ run covariance.cpp ]
...
;
With best regards, Konstantin Litvinenko.
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