]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/features/threadapi-feature.jam
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / src / tools / features / threadapi-feature.jam
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)
5
6 # TODO: Documentation.
7
8 import property-set ;
9 import feature : feature ;
10
11 if ! [ feature.valid threadapi ]
12 {
13 feature threadapi : win32 pthread : optional propagated ;
14 }
15
16 rule get-default ( property-set )
17 {
18 local api = pthread ;
19 if [ $(property-set).get <target-os> ] = windows { api = win32 ; }
20 return $(api) ;
21 }
22
23 rule detect ( properties * )
24 {
25 local ps = [ property-set.create $(properties) ] ;
26 local api = [ $(ps).get <threadapi> ] ;
27 if ! $(api) { api = [ get-default $(ps) ] ; }
28 return <threadapi>$(api) ;
29 }