|
Boost-Build : |
Subject: Re: [Boost-build] undefined reference to pthread
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-09-07 17:08:29
On 07-Sep-15 11:45 PM, Mathieu Champlon wrote:
> Hello,
>
> My project uses Boost.Build, here is what my unit tests jamfile (partly) looks like
>
>
> rule run-test ( name )
> {
> run $(name) /boost//unit_test_framework /boost//thread : : : <define>BOOST_THREAD_USES_MOVE : $(name)_thread_safe ;
> }
>
> rule run-tests
> {
> for name in [ glob test_*.cpp detail/test_*.cpp ] { run-test $(name) ; }
> }
>
..
> It looks like -pthread is missing from the command line, but isn't Boost.Build supposed to take care of this ?
> The system is a linux, probably ubuntu but not sure, it's run by travis-ci, see https://travis-ci.org/mat007/turtle
>
> Any clue what is going wrong and how I can fix it ?
Mat,
if you add
<threading>multi
to requirements on 'run' targets - alongside <define>, does it help? That's what is supposed to add -pthread
automatically.
(The question of why you see different behaviour in 1.59 is reasonable, but let's first get your tests to
work)
- Volodya
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