1 # Copyright 2017 Alexander Karzhenkov
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE_1_0.txt or copy at
4 # http://www.boost.org/LICENSE_1_0.txt)
9 import feature : feature ;
11 if ! [ feature.valid threadapi ]
13 feature threadapi : win32 pthread : optional propagated ;
16 rule get-default ( property-set )
19 if [ $(property-set).get <target-os> ] = windows { api = win32 ; }
23 rule detect ( properties * )
25 local ps = [ property-set.create $(properties) ] ;
26 local api = [ $(ps).get <threadapi> ] ;
27 if ! $(api) { api = [ get-default $(ps) ] ; }
28 return <threadapi>$(api) ;