Boost logo

Boost-Build :

From: Matthew Herrmann (matthew.herrmann_at_[hidden])
Date: 2006-02-27 16:59:49

Sorry all, please ignore the previous message, it was incomplete.

> > Well, don't put 'pre_test.configure_check' to sources:
> >
> >   lib my_library
> >  
> >      : [ glob *.cpp ]
> >      : <dependency>pre_test.configure_check
> >      ;
> >
> > Assuming your configure check does not puts files into source directory,
> > but only to build directory, this will have the right effect.
> >
> > In fact, is there any reason why your configure check creates .o files?
> > I'm not 100% understand the approach you took.

Hi Volodya,

Thanks for your help.

I am using OBJ as an output as it is a valid source for a library, and this
was how I could 'wedge' in the test script execution to the compilation
dependency model. If I move the .check file to being a dependency requirement
instead of a source, bjam doesn't call my script. With the current approach I
am using, the script is being called, but unfortunately does not prevent
other sources such as the CPP files from being compiled on failure, although
at least the overall build is marked as a fail, which is still very useful.

Here's the script I am currently using:

import type ;
type.register CHECK_SCRIPT : check ;
import generators ;
generators.register-standard check.run_script : CHECK_SCRIPT : OBJ ;
actions run_script
    echo Running checking script...
    rm -f $(<)
    $SHELL $(>)
    if test $? -eq 0 ; then
        touch $(<)
        exit 0
        exit 1

import check ;

lib mylib
    : # sources
    [ glob *.cpp ]

Many thanks again,

Matthew Herrmann
Vice President, Software Architecture
Zomojo Pty Ltd

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