Boost logo

Threads-Devel :

From: Anthony Williams (anthony_at_[hidden])
Date: 2007-11-05 05:21:13

Roland Schwarz <roland.schwarz_at_[hidden]> writes:

> Anthony, I would be glad if you could do some testing and possibly
> comment on the solution before I commit.

I finally got round to testing builds for pthread-on-windows, and it doesn't
work. Firstly, the "composite" nature of the threadapi feature got dropped, so
BOOST_THREAD_POSIX is not defined for builds of stuff other than the thread
library (e.g. the thread library tests). The include and library properties
are also not added to the build properties (for the same reason), so I have to
add the pthread-win32 include dir to my global compiler include path to get it
to compile: it still won't link, though.

So, the problem is: how to add the appropriate <include> and <library> tags to
all builds with threadapi=pthread on windows?

I had this sort-of working with my BOOST_PTHREAD_OPTS variable, but that
didn't correctly detect the target os, so didn't work with cygwin unless you
were building on cygwin, and didn't work for linux-windows cross-compiling

I like your auto-detection of the required library filename based on the
compiler: it means you can specify the directory path, and the correct library
is found.

I've added the composite stuff back in, but I don't know how to do the
BOOST_PTHREAD_OPTS stuff with the framework you've added. Any ideas?


Anthony Williams
Just Software Solutions Ltd -
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at