diff --git a/libs/thread/build/Jamfile.v2 b/libs/thread/build/Jamfile.v2 index eeed31d..58aac28 100644 --- a/libs/thread/build/Jamfile.v2 +++ b/libs/thread/build/Jamfile.v2 @@ -37,6 +37,24 @@ import feature ; import indirect ; import path ; +feature.feature threadapi : pthread win32 : propagated ; + +rule set_build_threadapi ( properties * ) +{ + local api ; + + if windows in $(properties) + { + api = win32 ; + } + else + { + api = pthread ; + } + + return $(api) ; +} + project boost/thread : source-location ../src : requirements multi @@ -106,6 +124,7 @@ project boost/thread intel:-wd1418 intel:-wd2415 + @set_build_threadapi # : default-build multi : usage-requirements # pass these requirement to dependents (i.e. users) @@ -125,7 +144,6 @@ local rule default_threadapi ( ) return $(api) ; } -feature.feature threadapi : pthread win32 : propagated ; feature.set-default threadapi : [ default_threadapi ] ; rule tag ( name : type ? : property-set )