2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-27 07:22:11 +00:00
Files
thread/build/threadapi.jam
2017-09-28 20:18:43 +05:00

20 lines
457 B
Plaintext

import property-set ;
import feature : feature ;
feature threadapi : win32 pthread : optional propagated ;
rule get-default ( property-set )
{
local api = pthread ;
if [ $(property-set).get <target-os> ] = windows { api = win32 ; }
return $(api) ;
}
rule detect ( properties * )
{
local ps = [ property-set.create $(properties) ] ;
local api = [ $(ps).get <threadapi> ] ;
if ! $(api) { api = [ get-default $(ps) ] ; }
return <threadapi>$(api) ;
}