Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-02-13 09:14:41

"Joel de Guzman" <joel_at_[hidden]> writes:

> Hi Dave,
> When compiling Spirit on some platforms, I have a problem with the
> default command line parameters issued by bjam. For example, in
> Borland, -Vx : Zero-length empty class member functions

What's a "zero-length member function" anyway?

Oh, I see the comments in our toolset say:

# -Vx zero sized empty members, this option is on in the IDE by default
# and effects binary compatibility.

So it really refers to data members, and since it is a non-conforming
extension to C++ I *really* think it should be disabled by default.

> and -Ve Zero-length empty base classes

Does this break things by itself, or only in combination with the
above setting?

> messes up its code generation and the compiler ICEs. How can I
> override the default bjam settings for Spirit?

Well, if these options cause the compiler to misbehave, they ought to
be turned off by default in the borland toolset (sound right, John?).

If you have additional command-line requirements that are specific to
a toolset you can add them to your requirements section with:


So you might write:

"<borland><*><cxxflags>-Vx- -Ve-"

in your target requirements to turn off these options in all variants
of the borland build.

> And since we're on bjamming, I have another question: Spirit has a
> test suit that is built on asserts (I'm planning to switch to
> boost.test later), then there are examples and small to moderately
> sized applications. The trivial examples are built around an
> interactive cin, cout cmd line interface. I would like to drive some
> of the trivial examples with pre- canned test inputs so I can expand
> the regression tests while maintaining the easy to follow
> tutorial-like coding style. Is that possible with bjam? I'm quite
> sure it is, so the question should perhaps be: how can I do that
> with bjam?

Using the "run" rule from testing.jam you can make the last element of
the second argument be a "<". Since the input-files come after the
args on the command-line, everything should work out ;-)

rule run ( sources + : args * : input-files * : requirements * : name ? : default-build * )


Dave Abrahams
Boost Consulting

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