mirror of
https://github.com/boostorg/thread.git
synced 2026-01-27 07:22:11 +00:00
20 lines
457 B
Plaintext
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) ;
|
|
}
|