|
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> gmail.com> 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:
-DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1
-DBOOST_CHRONO_THREAD_DISABLED -DBOOST_SYSTEM_DYN_LINK=1
-DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TIMER_DYN_LINK=1
>> 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.
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
<library>/boost/test//boost_unit_test_framework/<link>static
and
<library>/boost/timer//boost_timer
in the requirements fixed the issue.
And I was forced to modify only the top-most Jamfile so it was't a big
change.
Btw on MSVC12 defining:
<library>/boost/test//boost_unit_test_framework/
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
'under_debugger'
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>shared,<toolset>msvc:<cxxflags>-wd4275
<link>/boost/timer//boost_timer have non-free properties
<link>/boost/timer//boost_timer
[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
Jamfile<[BOOST_ROOT]\libs\test\build>
I think that to get this you should probably have a clean setup (e.g.
bin.v2 directory removed).
Regards,
Adam
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk