summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/serialization/test/Jamfile.v2
blob: cce152167be337d979e98cdbf4d1de65eef8f5f5 (plain)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# Boost serialization Library test Jamfile

#  (C) Copyright Robert Ramey 2002-2004.
#  Use, modification, and distribution are 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)
#

project libs/serialization/test
    : id serialization_test
    : requirements <library>/boost/filesystem
    ;

# import rules for testing conditional on config file variables
import ../../config/checks/config : requires ;

# import rules from the boost serialization test
import ../util/test :
    run-template
    run-invoke
    run-winvoke
    test-bsl-run-no-lib
    test-bsl-run
    test-bsl-run_archive
    test-bsl-run_files
    test-bsl-run_polymorphic_files
;

BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
    
lib dll_a
    : 
        dll_a.cpp
        ../build//boost_serialization
    :
        <link>shared
    ;

lib dll_polymorphic_base
    :
        dll_polymorphic_base.cpp 
        ../build//boost_serialization
    :
        <link>shared
    ;

lib dll_polymorphic_derived2
    :
        dll_polymorphic_derived2.cpp
        dll_polymorphic_base
        ../build//boost_serialization
    :
        <link>shared
    ;

test-suite "serialization" :
     [ test-bsl-run_files test_array : A : :  [ requires cxx11_hdr_array ] ] # BOOST_NO_CXX11_HDR_ARRAY
     [ test-bsl-run_files test_boost_array : A ]
     [ test-bsl-run_files test_native_array : A ]
     [ test-bsl-run_files test_binary ]
     [ test-bsl-run_files test_class_info_save ]
     [ test-bsl-run_files test_class_info_load ]
     [ test-bsl-run_files test_bitset ]
     [ test-bsl-run_files test_complex ]
     [ test-bsl-run_files test_contained_class : A ]
     [ test-bsl-run_files test_cyclic_ptrs : A ]
     [ test-bsl-run_files test_delete_pointer ]
     [ test-bsl-run_files test_deque : A ]
     [ test-bsl-run_files test_derived ]
     [ test-bsl-run_files test_derived_class : A ]
     [ test-bsl-run_files test_derived_class_ptr : A ]
     [ test-bsl-run_files test_diamond ]
     [ test-bsl-run_files test_diamond_complex ]
     [ test-bsl-run_files test_forward_list : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
     [ test-bsl-run_files test_forward_list_ptrs : A  : :  [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST
     [ test-bsl-run_files test_helper_support ]
     [ test-bsl-run_files test_interrupts ]
     [ test-bsl-run_files test_list : A ]
     [ test-bsl-run_files test_list_ptrs : A ]
     [ test-bsl-run_files test_map : A ]
     [ test-bsl-run_files test_map_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
     [ test-bsl-run_files test_map_unordered : A : :  [ requires cxx11_hdr_unordered_map ] ] # BOOST_NO_CXX11_HDR_UNORDERED_MAP
     [ test-bsl-run_files test_map_boost_unordered : A ]
     [ test-bsl-run_files test_mi ]
     [ test-bsl-run_files test_multiple_ptrs : A ]
     [ test-bsl-run_files test_multiple_inheritance ]
     [ test-bsl-run_files test_non_intrusive ]
     [ test-bsl-run_files test_non_default_ctor ]
     [ test-bsl-run_files test_non_default_ctor2 ]
     [ test-bsl-run_files test_null_ptr ]
     [ test-bsl-run_files test_nvp : A ]
     [ test-bsl-run_files test_object ]
     [ test-bsl-run_files test_primitive ]
     [ test-bsl-run_files test_priority_queue : A ]
     [ test-bsl-run_files test_queue : A ]
     [ test-bsl-run_files test_recursion : A ]
     [ test-bsl-run_files test_registered ]
     [ test-bsl-run_files test_set : A ]
     [ test-bsl-run_files test_set_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH
     [ test-bsl-run_files test_set_unordered : A : :  [ requires cxx11_hdr_unordered_set ] ] # BOOST_NO_CXX11_HDR_UNORDERED_SET
     [ test-bsl-run_files test_set_boost_unordered : A ]
     [ test-bsl-run_files test_simple_class : A ]
     [ test-bsl-run_files test_simple_class_ptr : A ]
     [ test-bsl-run_files test_slist : A : : [ requires slist ] ] # BOOST_HAS_SLIST ]
     [ test-bsl-run_files test_slist_ptrs : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] ]
     [ test-bsl-run_files test_split ]
     [ test-bsl-run_files test_stack : A ]
     [ test-bsl-run_files test_tracking ]
     [ test-bsl-run_files test_unregistered ]
     [ test-bsl-run_files test_unique_ptr ]
     [ test-bsl-run_files test_valarray ]
     [ test-bsl-run_files test_variant : A ]
     [ test-bsl-run_files test_vector : A ]
     [ test-bsl-run_files test_new_operator : A ]
     [ test-bsl-run_files test_optional ]
     [ test-bsl-run_files test_shared_ptr ]
     [ test-bsl-run_files test_shared_ptr_multi_base ]
     [ test-bsl-run_files test_shared_ptr_132 : : : [ requires auto_ptr  ] ] # BOOST_NO_AUTO_PTR

     [ test-bsl-run_polymorphic_files test_polymorphic : test_polymorphic_A A ]
     [ test-bsl-run_polymorphic_files test_polymorphic2 : test_polymorphic2imp ]
     [ test-bsl-run_polymorphic_files test_p_helper ]

     # this test should pass with both shared and static linking.  But B2 get's mixed up with static linking
     # so we'll just run the shared version of the test, which is the one that we're most interested
     # in anyway.
     [ test-bsl-run_polymorphic_files test_dll_exported : polymorphic_derived1 :  dll_polymorphic_base dll_polymorphic_derived2  : <link>static:<build>no ]

     [ test-bsl-run_polymorphic_files test_no_rtti : polymorphic_base polymorphic_derived1 polymorphic_derived2 ]
     [ test-bsl-run_polymorphic_files test_exported : polymorphic_base polymorphic_derived1 polymorphic_derived2 ]

     # should compile
     [ compile test_strong_typedef.cpp ]
    ;

if ! $(BOOST_ARCHIVE_LIST) {
    test-suite "serialization2" : 
        [ test-bsl-run test_inclusion ]
        [ test-bsl-run test_inclusion2 ]
        # boost build has the feature that the building if libraries vs dll is automatic
        # in that dependent libraries are built the same way - shared/static - that
        # the application is.  On some platforms (e.g windows) this is required to avoid
        # problems of linking incompatible versions of the runtime library.  So
        # we suppress tests of our dlls when using static libraries

        [ test-bsl-run test_dll_simple   : : dll_a :  <link>static:<build>no ]
        # [ test-bsl-run test_dll_plugin : : dll_derived2 : <link>static:<build>no <target-os>linux:<linkflags>-ldl ]

        [ test-bsl-run test_private_ctor ]
        [ test-bsl-run test_reset_object_address : A ]
        [ test-bsl-run test_void_cast ]
        [ test-bsl-run test_mult_archive_types ]
        [ test-bsl-run test_iterators ]
        [ test-bsl-run test_iterators_base64 ]
        [ test-bsl-run test_smart_cast ]
        [ test-bsl-run test_codecvt_null ]
        [ test-bsl-run test_singleton ]
        [ test-bsl-run test_singleton_inherited ]
        [ test-bsl-run test_singleton_plain ]

        # [ test-bsl-run test_z ]

        # should fail compilation
        [ compile-fail test_not_serializable.cpp ]
        [ compile-fail test_traits_fail.cpp ]
        [ compile-fail test_const_load_fail1.cpp ]
        [ compile-fail test_const_load_fail2.cpp ]
        [ compile-fail test_const_load_fail3.cpp ]
        [ compile-fail test_const_load_fail1_nvp.cpp ]
        [ compile-fail test_const_load_fail2_nvp.cpp ]
        [ compile-fail test_const_load_fail3_nvp.cpp ]
        [ compile-fail test_check.cpp ]

        # should compile with a warning message
        [ compile test_static_warning.cpp ]
        [ compile test_const_save_warn1.cpp ]
        [ compile test_const_save_warn2.cpp ]
        [ compile test_const_save_warn3.cpp ]

        # note - library unable to detect these errors for now
        #[ compile test_const_save_warn1_nvp.cpp ]
        #[ compile test_const_save_warn2_nvp.cpp ]
        #[ compile test_const_save_warn3_nvp.cpp ]
        
        # should compile
        [ compile test_traits_pass.cpp ]
        [ compile test_const_pass.cpp ]
    ;
}