2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-18 01:52:17 +00:00

Fix threadapi detection when the target-os is also affected by a conditional. Refs #352.

This commit is contained in:
Steven Watanabe
2018-10-11 13:03:16 -06:00
parent 141ca1776b
commit a5704a926b

View File

@@ -7,11 +7,11 @@
import property-set ;
import feature : feature ;
import toolset ;
import features/os-feature ;
if ! [ feature.valid threadapi ]
{
feature threadapi : win32 pthread : optional propagated ;
}
feature threadapi : pthread win32 : symmetric propagated ;
toolset.add-defaults <target-os>windows:<threadapi>win32 ;
rule get-default ( property-set )
{
@@ -20,10 +20,12 @@ rule get-default ( property-set )
return $(api) ;
}
# Obsolete rule that didn't quite work. Remove this
# after all references to it have been cleaned up.
rule detect ( properties * )
{
local ps = [ property-set.create $(properties) ] ;
local api = [ $(ps).get <threadapi> ] ;
if ! $(api) { api = [ get-default $(ps) ] ; }
return <threadapi>$(api) <relevant>threadapi:<relevant>target-os ;
# local ps = [ property-set.create $(properties) ] ;
# local api = [ $(ps).get <threadapi> ] ;
# if ! $(api) { api = [ get-default $(ps) ] ; }
# return <threadapi>$(api) <relevant>threadapi:<relevant>target-os ;
}