diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 8eb0f69b..f0ee88da 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -20,20 +20,15 @@ import ../checks/config : requires ; local is_unix = [ modules.peek : UNIX ] ; lib atomic ; +lib pthread ; +lib rt ; exe has_atomic_lib : config_info.cpp atomic ; explicit has_atomic_lib ; - -if $(is_unix) -{ - local osname = [ SHELL uname ] ; - - switch $(osname) - { - case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ; - case "*BSD*" : OTHERFLAGS = "-lpthread" ; - } -} +exe has_pthread_lib : config_info.cpp pthread ; +explicit has_pthread_lib ; +exe has_rt_lib : config_info.cpp rt ; +explicit has_rt_lib ; test-suite config : @@ -44,6 +39,8 @@ test-suite config : #requirements multi [ check-target-builds has_atomic_lib : atomic ] + [ check-target-builds has_pthread_lib : pthread ] + [ check-target-builds has_rt_lib : rt ] : config_test_threaded ] [ run config_test.cpp @@ -51,20 +48,18 @@ test-suite config : #input-files : #requirements single msvc:static msvc:static - linux:-lpthread - linux:-lrt - gcc:$(OTHERFLAGS) [ check-target-builds has_atomic_lib : atomic ] + [ check-target-builds has_pthread_lib : pthread ] + [ check-target-builds has_rt_lib : rt ] ] [ run config_test.cpp : #args : #input-files : #requirements off - linux:-lpthread - linux:-lrt - gcc:$(OTHERFLAGS) [ check-target-builds has_atomic_lib : atomic ] + [ check-target-builds has_pthread_lib : pthread ] + [ check-target-builds has_rt_lib : rt ] : config_test_no_rtti ] [ run config_test.cpp @@ -72,10 +67,9 @@ test-suite config : #input-files : #requirements off - linux:-lpthread - linux:-lrt - gcc:$(OTHERFLAGS) [ check-target-builds has_atomic_lib : atomic ] + [ check-target-builds has_pthread_lib : pthread ] + [ check-target-builds has_rt_lib : rt ] : config_test_no_except ] [ run config_info.cpp : : : always_show_run_output single msvc:static msvc:static ]