Boost logo

Boost-Build :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-01-24 12:34:49


This is a continuation of a thread on the devel list, but I think it is
more appropriate for this list.

I am trying to write some tests, but the tests need to dynamically load
a shared library.

I have my Jamfile building the shared library, and the test program.
However, I can not figure out how to tell the executable where the
shared library is located. Specifically, I want to take the test that
is compiled, and pass as a parameter the location of the shared library.
For example, a simple Makefile would look like...

tests: libshlib.so dll_test
./dll_test ./libshlib.so

The purpose is to have dll_test load the shared library at runtime.

Two questions.

1. For most libraries, the tests seem to be invoked "magically" without
any arguments, and the Jamfiles are very simple. One notable exception
is the serialization library, but that one too complex to use as an
example. Is there a simple way to pass command line arguments to test
programs?

2. Once I know how to get the test program to run with an argument, how
do I figure out what pathname bjam used to place the final library?

Thanks!

P.S. Is there another document somewhere describing the judicious usage
of grist within bjam? The concept seemed barely noteworthy in all the
JAM documents I read over the weekend. However, it seems to be the
primary tool within BJAM.

 


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