Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-12 19:02:56


----- Original Message -----
From: "Beman Dawes" <bdawes_at_[hidden]>

> I'm trying to review the Test library. One of the activities I tried was
> to build the library using Boost.Jam.
>
> To do so, I added a Jamfile (adapted from regex) to libs/test/build:
>
> subproject libs/test/build ;
>
> SOURCES = execution_monitor.cpp test_tools.cpp unit_test_config.cpp
> unit_test_log.cpp unit_test_main.cpp unit_test_monitor.cpp
> unit_test_result.cpp unit_test_suite.cpp ;
>
> lib libboost_test$(SUFLIB) : ../src/$(SOURCES)
> :
> <include>$(BOOST_ROOT)
> :
> debug release
> ;
>
>
> dll libboost_test$(SUFDLL[1]) : ../src/$(SOURCES)
> :
> <include>$(BOOST_ROOT)
> :
> debug release
> ;
>
> I also added "subinclude libs/test/build ;" to the main Jamfile.
>
> First, is this the correct approach? (It sort of worked, but there are
> code porting issues confusing things. I've sent those to Gennadiy.)

It's a correct approach. If you want to build both dynamic and static
libraries with (roughly) the same name, then it's a reasonable way to go. If
we are going to do this a lot, we should probably wrap it up into a new
rule.

rule lib-and-dll ( base-name : sources * : requirements * : default-build
* )
{
    lib $(base-name)$(SUFLIB) : $(sources) : $(requirements) :
$(default-build) ;
    lib $(base-name)$(SUFDLL[1]) : $(sources) : $(requirements) :
$(default-build) ;
}

> Minor point: shouldn't the "/" characters be $(SLASH) so they work on a
> wider variety of operating systems, for example.

I'm committed to the idea that any operating system we build on will work
with forward slashes, and I'm willing to do whatever is needed to make that
work. That may mean translating them to some other string behind-the-scenes.

> Second, I think we need a rule that library submissions requiring builds
> should always be accompanied by appropriate Jamfiles. Without a
known-good
> Jamfile, it is very hard to quickly check for code portability.

The regex Jamfile is "known good", I think.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk