Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-11-01 14:57:16

Rene Rivera wrote:
> Yea, this works better:
> local config-test-pass = [ stage config : [ GLOB
> $(BOOST_ROOT)/libs/config/test : has_tr1*pass.cpp ] ] ;
> for local filec in $(config-test-pass)
> {
> all_rules += [ compile $(filec:G=) ] ;
> DEPENDS [ target-id-of $(filec:G=) ] : $(filec) ;
> SEARCH on [ target-id-of $(filec:G=) ] = $(gLOCATE($(filec))) ;
> }
> But... the whole copy the test source files approach has one problem.
> When I run those test I get this error:
> C:\DevRoots\Boost\build\libs\tr1\test\config\has_tr1_array_pass.cpp(22)
> : fatal error C1083: Cannot open include file: 'test.hpp': No such file
> or directory
> And that is because the tests use relative includes, #include "test.hpp"
> in this case. That file lives in the original libs/config/test directory
> so it can't find it as that directory is not added with a -I option. And
> I haven't yet figure out how to make BBv1 add that dir into the include :-(

OK, I think I have a mostly ideal solution...

for local filec in [ GLOB $(BOOST_ROOT)/libs/config/test :
has_tr1*pass.cpp ]
all_rules += [ compile $(filec:D=) ] ;
SEARCH on [ target-id-of $(filec:D=) ] =
$(BOOST_ROOT)/libs/config/test ;

That solution has the same benefit of the current Jamfile in that it
uses the source files directly, i.e. no copies involved. But also has
the benefit that it correctly sets the library on the results, for
example '<test-log library="tr1" test-name="has_tr1_array_pass"...'. The

* It causes the processing to issue warnings like: ****Warning - missing
test path: boost-test(COMPILE) "tr1/has_tr1_array_pass" : (Usually
occurs when bjam doesn't know how to make a target)

* And that's because the testing BB code doesn't output the path to the
source files. This also happens to be why it works, since it doesn't
have the source file which has the "libs/config" in the path, it assigns
the test to the tr1 lib instead.

* I'm not sure how the XSLT report processing is going to handle the
effect that some of the properties in the XML result files are empty,
for example: 'test-type="" test-program="" ...'.

WARNING: The SEARCH assignment must be after the "[ compile... ]".

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. -
-- rrivera/ - grafik/
-- 102708583/icq - grafikrobot/aim - Grafik/

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