|
Boost : |
From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-10-24 05:41:04
Juergen Hunold <juergen.hunold_at_[hidden]> writes:
> The latest change to Boost.Thread:
> URL: http://svn.boost.org/trac/boost/changeset/40348
>
> introduced
> "feature.feature thrd-api"
> as "symmetric" feature, adding "thrd-api-pthread" to the build paths on
> linux. I'd like to have it asymmetric, so build paths will be as short
> as possible. The problem with the "symmetric" property is that you
> can't use "feature.set-default" to change the default value so the path
> element will disappear.
OK. I've committed that change.
> The other thing I noticed is the usage of "os.name" to distinguish
> between nt/unix/cygwin. I think this should use "target-os" in order to
> enable cross-compilation, but I don't know how to code this.
> Therefore cross-post to Boost.Build list in order to get some pointer on
> how to change
> if [ os.name ] = NT
>
> to
> if target-os = windows
>
> or something similar.
I agree that it's less than ideal. Any pointers on how to do this are much
appreciated.
The idea is to detect when targetting plain Windows vs Cygwin vs Unix. On
plain Windows we default to win32 thread API, and have pthread as an option if
and only if the pthread-win32 library is installed. On Cygwin we default to
pthread and have win32 as an option. On unix we only have pthread as an
option.
Anthony
-- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk