Ticket #3393: threadapi2.diff

File threadapi2.diff, 1.1 KB (added by viboes, 10 years ago)

Please could someone check this patch?

  • libs/thread/build/Jamfile.v2

    diff --git a/libs/thread/build/Jamfile.v2 b/libs/thread/build/Jamfile.v2
    index eeed31d..7bec70e 100644
    a b import feature ;  
    3737import indirect ;
    3838import path ;
    3939
     40feature.feature threadapi : pthread win32 : propagated ;
     41
     42rule set_build_threadapi ( properties * )
     43{
     44    local api ;
     45
     46    if <target-os>windows in $(properties) { api = win32 ; }
     47    if <target-os>linux in $(properties) { api = pthread ; }
     48
     49    return <threadapi>$(api) ;
     50}
     51
    4052project boost/thread
    4153    : source-location ../src
    4254    : requirements <threading>multi
    project boost/thread  
    106118        <toolset>intel:<cxxflags>-wd1418
    107119        <toolset>intel:<cxxflags>-wd2415
    108120
     121        <conditional>@set_build_threadapi
    109122
    110123    # : default-build <threading>multi
    111124    : usage-requirements  # pass these requirement to dependents (i.e. users)
    local rule default_threadapi ( )  
    125138    return $(api) ;
    126139}
    127140
    128 feature.feature threadapi : pthread win32 : propagated ;
    129141feature.set-default threadapi : [ default_threadapi ] ;
    130142
    131143rule tag ( name : type ? : property-set )