05d27df8b63998c654631143ebbfb3863acbc18a
[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 project
12     : requirements
13       <toolset>gcc:<cxxflags>-Wno-deprecated-declarations
14 ;
15
16
17 import modules ;
18 import ../checks/config : requires ;
19
20 local is_unix = [ modules.peek : UNIX ] ;
21
22 if $(is_unix)
23 {
24         local osname = [ SHELL uname ] ;
25
26         switch $(osname)
27         {
28                 case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
29                 case "*BSD*" : OTHERFLAGS = "-lpthread" ;
30         }
31 }
32
33 test-suite config
34   :
35     [ compile config_test_c.c ]
36     [ run config_test.cpp
37           : #args
38           : #input-files
39           : #requirements
40           <threading>multi
41           : config_test_threaded
42     ]
43     [ run config_test.cpp
44           : #args
45           : #input-files
46           : #requirements
47           <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
48           <target-os>linux:<linkflags>-lpthread
49           <target-os>linux:<linkflags>-lrt
50           <toolset>gcc:<linkflags>$(OTHERFLAGS)
51     ]
52     [ run config_test.cpp
53           : #args
54           : #input-files
55           : #requirements
56           <rtti>off
57           <target-os>linux:<linkflags>-lpthread
58           <target-os>linux:<linkflags>-lrt
59           <toolset>gcc:<linkflags>$(OTHERFLAGS)
60           : config_test_no_rtti
61     ]
62     [ run config_test.cpp
63           : #args
64           : #input-files
65           : #requirements
66           <exception-handling>off
67           <target-os>linux:<linkflags>-lpthread
68           <target-os>linux:<linkflags>-lrt
69           <toolset>gcc:<linkflags>$(OTHERFLAGS)
70           : config_test_no_except
71     ]
72      [ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ]
73      [ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi : config_info_threaded ]
74      [ run config_info.cpp : : : <test-info>always_show_run_output <rtti>off : config_info_no_rtti ]
75      [ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off : config_info_no_except ]
76      [ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ]
77      [ run abi/abi_test.cpp abi/main.cpp ]
78      [ run limits_test.cpp ../../test/build//boost_test_exec_monitor ]
79      [ run link/main.cpp link//link_test
80           : #args
81           : #input-files
82           : #requirements
83           <runtime-link>shared
84           <define>BOOST_DYN_LINK=1
85           <define>BOOST_CONFIG_NO_LIB=1
86           :
87           config_link_test
88     ]
89     [ compile-fail threads/test_thread_fail1.cpp ]
90     [ compile-fail threads/test_thread_fail2.cpp ]
91     [ compile boost_fallthrough_test.cpp : [ check-target-builds has_clang_implicit_fallthrough "Clang implicit fallthrough" : <toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ] ]
92     [ compile helper_macro_test.cpp ]
93     [ run cstdint_test.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
94     [ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
95     [ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ]
96     [ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals ] ]
97   ;
98
99 obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
100                 <toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ;
101
102 explicit has_clang_implicit_fallthrough ;
103