From 340a8a3e6591f37e5e6ba4e714354bbf57c7c15d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 12 Apr 2009 15:49:08 +0000 Subject: [PATCH] Try and set the right linker options on BSD and Sun platforms. [SVN r52353] --- test/Jamfile.v2 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 59a88359..f4c47af0 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -7,6 +7,22 @@ # If you need to alter build preferences then set them in # the template defined in options_v2.jam. # + +import modules ; + +local is_unix = [ modules.peek : UNIX ] ; + +if $(is_unix) +{ + local osname = [ SHELL uname ] ; + + switch $(osname) + { + case "Sun*" : OTHERFLAGS = "-lpthread" ; + case "*BSD*" : OTHERFLAGS = "-lpthread" ; + } +} + test-suite config : [ run config_test.cpp @@ -23,8 +39,7 @@ test-suite config single msvc:static msvc:static linux:-lpthread linux:-lrt - freebsd:-lpthread - bsd:-lpthread + gcc:$(OTHERFLAGS) ] [ run config_info.cpp : : : always_show_run_output single msvc:static msvc:static ] [ run config_info.cpp : : : always_show_run_output multi : config_info_threaded ]