df61352320893f6db584e041511bf2f5b2f87262
[platform/upstream/boost.git] / libs / config / test / Jamfile.v2
1 #
2 # Copyright John Maddock 2008.
3 # Use, modification and distribution are subject to the 
4 # Boost Software License, Version 1.0. (See accompanying file 
5 # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #
7 # If you need to alter build preferences then set them in
8 # the template defined in options_v2.jam.
9 #
10
11 import modules ;
12
13 local is_unix = [ modules.peek : UNIX ] ;
14
15 if $(is_unix)
16 {
17         local osname = [ SHELL uname ] ;
18
19         switch $(osname)
20         {
21                 case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
22                 case "*BSD*" : OTHERFLAGS = "-lpthread" ;
23         }
24 }
25
26 test-suite config
27   : 
28     [ compile config_test_c.c ]
29     [ run config_test.cpp 
30           : #args
31           : #input-files
32           : #requirements
33           <threading>multi
34           : config_test_threaded
35     ]
36     [ run config_test.cpp 
37           : #args
38           : #input-files
39           : #requirements
40           <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static 
41           <target-os>linux:<linkflags>-lpthread
42           <target-os>linux:<linkflags>-lrt
43           <toolset>gcc:<linkflags>$(OTHERFLAGS)
44     ]
45      [ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ]
46      [ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi : config_info_threaded ]
47      [ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ]
48      [ run abi/abi_test.cpp abi/main.cpp ]
49      [ run limits_test.cpp ../../test/build//boost_test_exec_monitor ]
50      [ run link/main.cpp link//link_test
51           : #args
52           : #input-files
53           : #requirements
54           <runtime-link>shared
55           <define>BOOST_DYN_LINK=1
56           <define>BOOST_CONFIG_NO_LIB=1
57           :
58           config_link_test
59     ]
60     [ compile-fail threads/test_thread_fail1.cpp ]
61     [ compile-fail threads/test_thread_fail2.cpp ]
62   ;