Boost logo

Boost :

Subject: Re: [boost] [Test][Thread] Regression since 9 December?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2015-01-12 20:18:39

Raffi Enficiaud wrote:
> Adam Wulkiewicz <adam.wulkiewicz <at>> writes:
>> 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".

FYI, on my machine when I run the tests bjam passes the following
parameters into the compiler:


>> And in the past Timer was built automatically with Test but this commit
>> have changed it
>> ?
> Right, I rolled it back. I erroneously thought boost.timer being a header
> only library. Apparently this worked fine on darwin.
I already fixed it by linking Timer manually.
But ok, if it was possible to find a solution which works without
forcing the maintainers to modify the tests it should probably be prefered.

>> 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.
(below [BOOST_ROOT] is a path to Boost)

In the previous version (<use>/boost/timer//boost_timer) both
in the requirements fixed the issue.
And I was forced to modify only the top-most Jamfile so it was't a big

Btw on MSVC12 defining:
without <link>static caused a lot warnings like:
[BOOST_ROOT]\boost/test/impl/debug.ipp(634) : warning C4273:
'boost::debug::under_debugger' : inconsistent dll linkage
[BOOST_ROOT]\boost/test/debug.hpp(54) : see previous definition of
and errors similar to:
[BOOST_ROOT]\boost/test/impl/test_tools.ipp(394) : error C2491:
'boost::test_tools::tt_detail::prod_report_format' : definition of
dllimport function not allowed

So after your switch in Test's build/Jamfile to
<link>/boost/timer//boost_timer testing doesn't work anymore. Bjam fails
with the following error:

[BOOST_ROOT]/tools/build/src/build\project.jam:711: in
class_at_project-attributes.set from module object(project-attributes)@1762
error: usage-requirements <define>BOOST_TEST_NO_AUTO_LINK=1
<link>/boost/timer//boost_timer have non-free properties
[BOOST_ROOT]/tools/build/src/build\project.jam:1054: in project from
module project-rules
..\..\libs\test\build\Jamfile.v2:33: in modules.load from module

I think that to get this you should probably have a clean setup (e.g.
bin.v2 directory removed).


Boost list run by bdawes at, gregod at, cpdaniel at, john at