Boost logo

Boost :

Subject: Re: [boost] [Test][Thread] Regression since 9 December?
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2015-01-12 19:27:11


Adam Wulkiewicz <adam.wulkiewicz <at> gmail.com> writes:

>
> Hi Raffi,
>
> <snip>
>
> In Boost.Geometry we doesn't use Thread or dynamically linked Test. In
> most of the tests only the following headers are included:
> # include <boost/test/floating_point_comparison.hpp>
> # include <boost/test/included/test_exec_monitor.hpp>
> # include <boost/test/impl/execution_monitor.ipp>
> plus test_main() defined. AFAIU it's not required to link against Test
> in this case.

Then I would say the only thing you need is to add boost.timer as a
dependency, but this should be done by boost.test in fact (see below). The
problem of boost.thread was mainly caused by building against both shared
and static boost.test with the same sources.
In geometry apparently you are using the execution monitor (eg.
geometry/test/algorithms/append.cpp) and the header-only variant of
boost.test (eg. geometry/test/algorithms/distance/distance_areal_areal.cpp).
So the problem looks like being the link against boost.timer only.

>
> To be honest I'm not sure why this was ok in the past.
> Is Test static lib automatically built by bjam if e.g. import testing ;
> is found in a Jamfile?

I am very very far from being an expert of Jamfile. If you use the
boost.test with static link, I think
"<library>/boost/test//boost_unit_test_framework/<link>static" in the
requirements is enough for building it. I do not know if this is done
by "import testing".

> And in the past Timer was built automatically with Test but this commit
> have changed it
>
https://github.com/boostorg/test/commit/fa6f4f34bed04e938b4020df51918c776b77402a

> ?

Right, I rolled it back. I erroneously thought boost.timer being a header
only library. Apparently this worked fine on darwin.

>
> Anyway, how do you suggest libraries authors should modify the tests?
> What should be the best practice for tests using minimal/header-only Test.
> Should we just specify <library>/boost/timer//boost_timer or is there
> some more preferable way?

For symbols of boost.timer missing, I would say "do nothing" as it should be
handled by boost.test. Please bug me (offline if you prefer) once you have
the test results.

>
> Regards,
> Adam
>

Best,
Raffi


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