Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-02-06 10:06:30


Thorsten Ottosen wrote:
> Hi All,
>
> I'm trying to make a test run for vc71 only.
>
> My Jamfile looks as follows:
>
> subproject libs/range/test ;
>
> import testing ;
>
> rule range-test ( name )
> {
> return [
> run $(name).cpp
> # <include>$(VC71_ROOT)/atlmfc/include
> <lib>../../test/build/boost_unit_test_framework
> : : : <include>$(BOOST_ROOT)
> ] ;
> }

First thing is that that include in in the wrong place. It should be in
the requirements section, where the other <include> is.

> test-suite range :
> [ range-test array ]
> [ range-test iterator_pair ]
> [ range-test std_container ]
> [ range-test string ]
> [ range-test iterator_range ]
> [ range-test sub_range ]
> [ range-test partial_workaround ]
> [ range-test algorithm_example ]
> [ range-test reversible_range ]
> [ range-test const_ranges ]
> [ range-test mfc ]
> ;
>
> The line I have commented out don't work. Ideally I jsu need to
> make the include for the test of mfc.cpp. Can anybody help.

If you want to more control for individual tests you should pass along
all the various arguments "run" can take...

rule range-test ( name sources * : args * : input-files * : requirements
* : test-name ? : default-build * : args2 * )
{
return [
run $(name).cpp $(sources)
<lib>../../test/build/boost_unit_test_framework
: $(args)
: $(input-files)
: <include>$(BOOST_ROOT)
$(requirements)
: $(test-name)
: $(default-build)
; $(args2)
] ;
}

Then you can add the include for only that test to the requirements...

test-suite range :
[ range-test array ]
[ range-test iterator_pair ]
[ range-test std_container ]
[ range-test string ]
[ range-test iterator_range ]
[ range-test sub_range ]
[ range-test partial_workaround ]
[ range-test algorithm_example ]
[ range-test reversible_range ]
[ range-test const_ranges ]
[ range-test mfc : : : <include>$(VC71_ROOT)/atlmfc/include ]
;

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
 

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