Subject: Re: [boost] [build] adding a rquirement for Cygwin only?
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2015-03-05 11:51:52
On Thu, Mar 5, 2015 at 10:37 AM, Peter Dimov <lists_at_[hidden]> wrote:
> Steven Watanabe wrote:
>> The correct <target-os> for Cygwin should be cygwin, not windows. The
>> problem is that target-os is not auto-detected and defaults to being the
>> same as host-os.
> Thanks, but this doesn't solve my problem. What I think you're saying is
> that I should pass target-os=cygwin. But I can't do that in my use case,
> which is going into a library's test directory and typing
> b2 toolset=clang,clang-cxx11,gcc,gcc-cxx11,msvc-8.0,msvc-10.0,
> When a test depends on Boost.Thread, it tries to build it, and that fails
> on Cygwin.
> I could split the above into two lines, but it would've been nice for
> Cygwin to work out of the box with Boost.Thread. This is why I've been
> trying to come up with a way to change Boost.Thread's Jamfile to use
> <threadapi>pthread on Cygwin and the default <threadapi> on MinGW.
Use the Predef configure support perhaps <http://tinyurl.com/q8yjzmo> ?
: check require
: predef-check predef-require ;
exe my_special_exe : source.cpp
: [ predef-check BOOST_OS_CYGWIN : <threadapi>pthread ] ;
-- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail