forked from boostorg/pfr
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Jamfile.v2
174 lines (141 loc) · 13 KB
/
Jamfile.v2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Copyright (C) 2016-2018, Antony Polukhin.
#
# Use, modification and distribution is subject to the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
import testing ;
project
: source-location .
: requirements
<toolset>msvc:<cxxflags>"/std:c++latest"
<toolset>msvc:<define>BOOST_PFR_USE_CPP17=1
<define>BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING=1
;
local DISABLE_ON_MSVC = <toolset>msvc:<build>no ;
local LOOPHOLE_FLAT_DEF = <define>BOOST_PFR_TEST_FLAT <define>BOOST_PFR_USE_LOOPHOLE=1 $(DISABLE_ON_MSVC) ;
local CLASSIC_FLAT_DEF = <define>BOOST_PFR_TEST_FLAT <define>BOOST_PFR_USE_LOOPHOLE=0 $(DISABLE_ON_MSVC) ;
local LOOPHOLE_PREC_DEF = <define>BOOST_PFR_TEST_PRECISE <define>BOOST_PFR_USE_LOOPHOLE=1 $(DISABLE_ON_MSVC) ;
local CLASSIC_PREC_DEF = <define>BOOST_PFR_TEST_PRECISE <define>BOOST_PFR_USE_LOOPHOLE=0 ;
test-suite pfr
:
##### Common tests
[ run common/ops.cpp : : : $(CLASSIC_FLAT_DEF) : flat_ops ]
[ run common/ops.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_ops ]
[ run common/ops.cpp : : : $(CLASSIC_PREC_DEF) : precise_ops ]
[ run common/ops.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_ops ]
[ run common/global_ops.cpp : : : $(CLASSIC_FLAT_DEF) : flat_global_ops ]
[ run common/global_ops.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_global_ops ]
[ run common/global_ops.cpp : : : $(CLASSIC_PREC_DEF) : precise_global_ops ]
[ run common/global_ops.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_global_ops ]
[ run common/functions_for.cpp : : : $(CLASSIC_FLAT_DEF) : flat_function_for ]
[ run common/functions_for.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_function_for ]
[ run common/functions_for.cpp : : : $(CLASSIC_PREC_DEF) : precise_function_for ]
[ run common/functions_for.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_function_for ]
[ run common/read_write.cpp : : : $(CLASSIC_FLAT_DEF) : flat_read_write ]
[ run common/read_write.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_read_write ]
[ run common/read_write.cpp : : : $(CLASSIC_PREC_DEF) : precise_read_write ]
[ run common/read_write.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_read_write ]
[ run common/std_interactions.cpp : : : $(CLASSIC_FLAT_DEF) : flat_std_interactions ]
[ run common/std_interactions.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_std_interactions ]
[ run common/std_interactions.cpp : : : $(CLASSIC_PREC_DEF) : precise_std_interactions ]
[ run common/std_interactions.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_std_interactions ]
[ compile-fail common/movable_and_lvalue_references.cpp : $(CLASSIC_FLAT_DEF) : flat_movable_and_lvalue_references ]
[ compile-fail common/movable_and_lvalue_references.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_movable_and_lvalue_references ]
[ compile-fail common/movable_and_lvalue_references.cpp : $(CLASSIC_PREC_DEF) : precise_movable_and_lvalue_references ]
[ compile-fail common/movable_and_lvalue_references.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_movable_and_lvalue_references ]
[ compile-fail common/private_fields.cpp : $(CLASSIC_FLAT_DEF) : flat_private_fields ]
[ compile-fail common/private_fields.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_private_fields ]
[ compile-fail common/private_fields.cpp : $(CLASSIC_PREC_DEF) : precise_private_fields ]
[ compile-fail common/private_fields.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_private_fields ]
[ compile-fail common/protected_fields.cpp : $(CLASSIC_FLAT_DEF) : flat_protected_fields ]
[ compile-fail common/protected_fields.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_protected_fields ]
[ compile-fail common/protected_fields.cpp : $(CLASSIC_PREC_DEF) : precise_protected_fields ]
[ compile-fail common/protected_fields.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_protected_fields ]
[ compile-fail common/virtual_functions.cpp : $(CLASSIC_FLAT_DEF) : flat_virtual_functions ]
[ compile-fail common/virtual_functions.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_virtual_functions ]
[ compile-fail common/virtual_functions.cpp : $(CLASSIC_PREC_DEF) : precise_virtual_functions ]
[ compile-fail common/virtual_functions.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_virtual_functions ]
[ compile-fail common/ops_on_union.cpp : $(CLASSIC_FLAT_DEF) : flat_on_union ]
[ compile-fail common/ops_on_union.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_on_union ]
[ compile-fail common/ops_on_union.cpp : $(CLASSIC_PREC_DEF) : precise_on_union ]
[ compile-fail common/ops_on_union.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_on_union ]
[ compile-fail common/ops_unions.cpp : $(CLASSIC_FLAT_DEF) : flat_unions ]
[ compile-fail common/ops_unions.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_unions ]
[ compile-fail common/ops_unions.cpp : $(CLASSIC_PREC_DEF) : precise_unions ]
[ compile-fail common/ops_unions.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_unions ]
[ compile-fail common/ops_unrestricted_unions.cpp : $(CLASSIC_FLAT_DEF) : flat_unrestricted_unions ]
[ compile-fail common/ops_unrestricted_unions.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_unrestricted_unions ]
[ compile-fail common/ops_unrestricted_unions.cpp : $(CLASSIC_PREC_DEF) : precise_unrestricted_unions ]
[ compile-fail common/ops_unrestricted_unions.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_unrestricted_unions ]
[ compile-fail common/non_std_layout.cpp : $(CLASSIC_FLAT_DEF) : flat_non_standard_layout ]
[ compile-fail common/non_std_layout.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_non_standard_layout ]
[ run common/non_std_layout.cpp : : : $(CLASSIC_PREC_DEF) : precise_non_standard_layout ]
[ run common/non_std_layout.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_non_standard_layout ]
[ compile-fail common/non_default_constructible.cpp : $(CLASSIC_FLAT_DEF) : flat_non_default_constructible ]
[ compile-fail common/non_default_constructible.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_non_sdefault_constructible ]
[ run common/non_default_constructible.cpp : : : $(CLASSIC_PREC_DEF) : precise_non_default_constructible ]
[ run common/non_default_constructible.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_non_default_constructible ]
[ compile-fail common/non_copyable_but_movable.cpp : $(CLASSIC_FLAT_DEF) : flat_non_copyable_but_movable ]
[ run common/non_copyable_but_movable.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_non_copyable_but_movable ]
[ run common/non_copyable_but_movable.cpp : : : $(CLASSIC_PREC_DEF) : precise_non_copyable_but_movable ]
[ run common/non_copyable_but_movable.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_non_copyable_but_movable ]
[ compile-fail common/non_default_constructible_non_copyable_but_movable.cpp : $(CLASSIC_FLAT_DEF) : flat_non_dc_non_cop_but_mov ]
[ run common/non_default_constructible_non_copyable_but_movable.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_non_dc_non_cop_but_mov ]
[ run common/non_default_constructible_non_copyable_but_movable.cpp : : : $(CLASSIC_PREC_DEF) : precise_non_dc_non_cop_but_mov ]
[ run common/non_default_constructible_non_copyable_but_movable.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_non_dc_non_cop_but_mov ]
[ compile-fail common/fields_count_on_reference.cpp ]
[ run common/fields_count_on_const.cpp ]
##### Flat tuple sizes
[ run common/test_tuple_sizes_on.cpp : : : $(DISABLE_ON_MSVC) <define>BOOST_PFR_RUN_TEST_ON=char : test_tuple_sizes_on_chars ]
[ run common/test_tuple_sizes_on.cpp : : : $(DISABLE_ON_MSVC) <define>BOOST_PFR_RUN_TEST_ON=int : test_tuple_sizes_on_ints ]
[ run common/test_tuple_sizes_on.cpp : : : $(DISABLE_ON_MSVC) <define>BOOST_PFR_RUN_TEST_ON=short : test_tuple_sizes_on_shorts ]
[ run common/test_tuple_sizes_on.cpp : : : $(DISABLE_ON_MSVC) <define>BOOST_PFR_RUN_TEST_ON=void* : test_tuple_sizes_on_voidptrs ]
[ run common/test_tuple_sizes_on.cpp : : : $(DISABLE_ON_MSVC) <define>BOOST_PFR_RUN_TEST_ON="std::size_t" : test_tuple_sizes_on_size_ts ]
#[ run common/test_tuple_sizes_on.cpp $(DISABLE_ON_MSVC)<define>BOOST_PFR_RUN_TEST_ON=char <define>BOOST_PFR_RUN_HUGE_TESTS : test_tuple_sizes_on_chars_huge ]
##### Flat specific tests
[ run flat/core.cpp : : : $(CLASSIC_FLAT_DEF) ]
[ run flat/flat_tuple_size.cpp : : : $(CLASSIC_FLAT_DEF) ]
[ run flat/flat_motivating_example.cpp : : : $(CLASSIC_FLAT_DEF) ]
[ run flat/flat_for_each_field.cpp : : : $(CLASSIC_FLAT_DEF) ]
[ run flat/destructuring_tie.cpp : : : $(CLASSIC_FLAT_DEF) ]
[ compile-fail flat/flat_tuple_size_on_non_aggregate.cpp : $(CLASSIC_FLAT_DEF) ]
[ compile-fail flat/flat_tuple_size_on_bitfields.cpp : $(CLASSIC_FLAT_DEF) ]
##### Precise specific tests
[ run precise/tuple_size.cpp : : : $(CLASSIC_PREC_DEF) : precise_tuple_size ]
[ run precise/bitfields.cpp : : : $(CLASSIC_PREC_DEF) : precise_tuple_size_on_bitfields ]
[ run precise/for_each_field.cpp : : : $(CLASSIC_PREC_DEF) : precise_for_each_field ]
[ run precise/motivating_example0.cpp : : : $(CLASSIC_PREC_DEF) : precise_motivating_example0 ]
[ run precise/motivating_example.cpp : : : $(CLASSIC_PREC_DEF) : precise_motivating_example ]
[ run precise/motivating_example2.cpp : : : $(CLASSIC_PREC_DEF) : precise_motivating_example2 ]
[ run precise/optional_like.cpp : : : $(CLASSIC_PREC_DEF) : precise_optional_like ]
[ run precise/get_non_default_constructible.cpp : : : $(CLASSIC_PREC_DEF) : precise_get_non_default_constructible ]
[ run precise/destructuring_tie.cpp : : : $(CLASSIC_PREC_DEF) : precise_destructuring_tie ]
[ run precise/error_pfr_c1202.cpp : : : $(CLASSIC_PREC_DEF) : precise_c1202_issue21 ]
[ compile-fail precise/non_aggregate.cpp : $(CLASSIC_PREC_DEF) : precise_non_aggregate ]
# The following tests may compile of fail depending on C++ Standard version.
#[ compile-fail precise/issue30.cpp : $(CLASSIC_PREC_DEF) : precise_issue30 ]
#[ compile-fail precise/issue33.cpp : $(CLASSIC_PREC_DEF) : precise_issue33 ]
##### Loophole tests running precise and flat specific tests
[ run flat/core.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_core ]
[ run flat/flat_tuple_size.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_tuple_size ]
[ run flat/flat_motivating_example.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_motivating_example ]
[ run flat/flat_for_each_field.cpp : : : $(LOOPHOLE_FLAT_DEF) : flat_lh_for_each_field ]
[ compile-fail flat/flat_tuple_size_on_non_aggregate.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_tuple_size_on_non_aggregate ]
[ compile-fail flat/flat_tuple_size_on_bitfields.cpp : $(LOOPHOLE_FLAT_DEF) : flat_lh_tuple_size_on_bitfields ]
[ run precise/tuple_size.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_tuple_size ]
[ run precise/bitfields.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_tuple_size_on_bitfields ]
[ run precise/for_each_field.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_for_each_field ]
[ run precise/motivating_example0.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_motivating_example0 ]
[ run precise/motivating_example.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_motivating_example ]
[ run precise/motivating_example2.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_motivating_example2 ]
[ run precise/optional_like.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_optional_like ]
[ run precise/get_non_default_constructible.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_get_non_default_constructible ]
[ run precise/error_pfr_c1202.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_c1202_issue21 ]
[ run precise/issue30.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_issue30 ]
[ run precise/issue33.cpp : : : $(LOOPHOLE_PREC_DEF) : precise_lh_issue33 ]
[ compile-fail precise/non_aggregate.cpp : $(LOOPHOLE_PREC_DEF) : precise_lh_non_aggregate ]
# Examples from docs
[ run ../example/examples.cpp : : : $(DISABLE_ON_MSVC) ]
[ run ../example/quick_examples.cpp : : : $(DISABLE_ON_MSVC) ]
;