]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/system/test/Jamfile.v2
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / system / test / Jamfile.v2
1 # Boost System Library test Jamfile
2
3 # Copyright Beman Dawes 2003, 2006
4
5 # Distributed under the Boost Software License, Version 1.0.
6 # See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt
7
8 # See library home page at http://www.boost.org/libs/system
9
10 import testing ;
11 import os ;
12
13 project
14 : requirements
15 <library>/boost/system//boost_system
16 <toolset>msvc:<asynch-exceptions>on
17 ;
18
19 lib throw_test
20 : throw_test.cpp
21 : <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
22 <link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
23 ;
24
25 lib single_instance_lib1 : single_instance_1.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
26 lib single_instance_lib2 : single_instance_2.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
27
28 rule cxx03 ( properties * )
29 {
30 local result ;
31
32 if <toolset>gcc in $(properties)
33 {
34 result = <cxxflags>-std=c++98 ; # 4.4 has no 03
35 }
36 else if <toolset>clang in $(properties)
37 {
38 result = <cxxflags>-std=c++03 ;
39 }
40 else
41 {
42 result = <build>no ;
43 }
44
45 return $(result) ;
46 }
47
48 rule cxx11 ( properties * )
49 {
50 local result ;
51
52 if <toolset>gcc in $(properties)
53 {
54 result = <cxxflags>-std=c++0x ; # 4.6 has no 11
55 }
56 else if <toolset>clang in $(properties)
57 {
58 result = <cxxflags>-std=c++11 ;
59 }
60 else
61 {
62 result = <build>no ;
63 }
64
65 return $(result) ;
66 }
67
68 rule system-run- ( sources + )
69 {
70 local result ;
71
72 result += [ run $(sources) : : : <link>static : $(sources[1]:B)_static ] ;
73 result += [ run $(sources) : : : <link>shared : $(sources[1]:B)_shared ] ;
74 result += [ run $(sources) : : : -<library>/boost/system//boost_system <define>BOOST_ERROR_CODE_HEADER_ONLY : $(sources[1]:B)_header ] ;
75
76 return $(result) ;
77 }
78
79 if [ os.environ UBSAN ]
80 {
81 rule system-run ( sources + )
82 {
83 # The 03/11 tests are ODR violations, no point running them under -fsanitize=undefined
84 return [ system-run- $(sources) ] ;
85 }
86 }
87 else
88 {
89 rule system-run ( sources + )
90 {
91 local result = [ system-run- $(sources) ] ;
92
93 # Test a source file built with -std=c++03 linked with a System library built without -std=c++03
94 result += [ run $(sources) : : : <link>static <conditional>@cxx03 : $(sources[1]:B)_static_03 ] ;
95 result += [ run $(sources) : : : <link>shared <conditional>@cxx03 : $(sources[1]:B)_shared_03 ] ;
96
97 # Test a source file built with -std=c++11 linked with a System library built without -std=c++11
98 result += [ run $(sources) : : : <link>static <conditional>@cxx11 : $(sources[1]:B)_static_11 ] ;
99 result += [ run $(sources) : : : <link>shared <conditional>@cxx11 : $(sources[1]:B)_shared_11 ] ;
100
101 return $(result) ;
102 }
103 }
104
105 test-suite "system"
106 : [ system-run error_code_test.cpp ]
107 [ system-run error_code_user_test.cpp ]
108 [ system-run system_error_test.cpp ]
109 [ run dynamic_link_test.cpp throw_test
110 : : : <link>shared : throw_test_shared
111 ]
112 [ system-run initialization_test.cpp ]
113 [ run header_only_test.cpp
114 : : : -<library>/boost/system//boost_system
115 ]
116 [ run header_only_test.cpp
117 : : : -<library>/boost/system//boost_system <define>BOOST_NO_ANSI_APIS : header_only_test_no_ansi
118 ]
119 [ run config_test.cpp
120 : : : <test-info>always_show_run_output
121 ]
122 [ system-run- std_interop_test.cpp ]
123 [ system-run std_mismatch_test.cpp ]
124 [ system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ]
125 [ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>static : single_instance_lib_static ]
126 [ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>shared : single_instance_lib_shared ]
127 [ system-run before_main_test.cpp ]
128 [ run-fail throws_assign_fail.cpp ]
129 ;
130
131 # Quick (CI) test
132 run quick.cpp ;