|
Boost-Build : |
From: Robert Ramey (Ramey_at_[hidden])
Date: 2004-12-08 14:27:11
My current Jamfile for serialization testing includes:
...
run
$(sources)
<lib>../../test/build/boost_test_exec_monitor
<lib>../build/boost_serialization
: # args
...
This implies that all tests will be run using the the static library version
of the serialization library.
What I would like is:
local libtype ;
if ! $(LIBTYPE) { #if LIBTYPE not defined
if ??? { # if build-variant is <runtime-link>dynamic
LIBTYPE = dll ;
}
else {
LIBTYPE = lib ;
}
}
so I could replace the above with:
run
$(sources)
<$(LIBTYPE)>../../test/build/boost_test_exec_monitor
<$(LIBTYPE)>../>../build/boost_serialization
: # args
...
This would make use the dll for builds where the C++ runtime dll is expected
use the dll version of the serialization library. Where the C++ runtime
static library is being used, the static library version of the
serialization library would probably be used. I believe that this is
consistent with what most users would expect and that the auto-link system
implements.
By explicitly defineing LIBTYPE I could still force a test with a particular
version of the serialization library with either type of C++ runtime - which
should still work.
I notice the regex library test Jamfile has separate sections for lib an dll
testing so it would seem that it tests the dll and lib with each individual
test. I could do this. But the serialization library already takes forever
to test.
I suspect there is a somewhat more elegant way to address/acomplish this. I
appreciate any suggestions anyone wants to make.
Robert Ramey
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