]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
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 ; | |
92f5a8d4 TL |
10 | import toolset ; |
11 | import features/os-feature ; | |
b32b8144 | 12 | |
92f5a8d4 TL |
13 | feature threadapi : pthread win32 : symmetric propagated ; |
14 | toolset.add-defaults <target-os>windows:<threadapi>win32 ; | |
b32b8144 FG |
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 | ||
92f5a8d4 TL |
23 | # Obsolete rule that didn't quite work. Remove this |
24 | # after all references to it have been cleaned up. | |
b32b8144 FG |
25 | rule detect ( properties * ) |
26 | { | |
92f5a8d4 TL |
27 | # local ps = [ property-set.create $(properties) ] ; |
28 | # local api = [ $(ps).get <threadapi> ] ; | |
29 | # if ! $(api) { api = [ get-default $(ps) ] ; } | |
30 | # return <threadapi>$(api) <relevant>threadapi:<relevant>target-os ; | |
b32b8144 | 31 | } |