1 # Boost serialization Library utility test Jamfile
3 # (C) Copyright Robert Ramey 2002-2004.
4 # Use, modification, and distribution are subject to the
5 # Boost Software License, Version 1.0. (See accompanying file
6 # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 # the file contains Jam rules which are used in both the normal
10 # boost test, as well as the performance test and comprehensive
13 BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
15 # these are used to shorten testing while in development. It permits
16 # testing to be applied to just a particular type of archive
17 if ! $(BOOST_ARCHIVE_LIST) {
25 # enable the tests which don't depend on a particular archive
26 BOOST_SERIALIZATION_TEST = true ;
29 rule run-template ( test-name : sources * : requirements * ) {
37 <toolset>borland:<cxxflags>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066"
38 #<toolset>gcc:<warnings>all # ?
39 <toolset>gcc:<cxxflags>"-Wno-unused-variable -Wno-long-long"
40 # <toolset>gcc:<variant>debug><define>_STLP_DEBUG
41 # <toolset>gcc:<variant>debug><define>_GLIBCXX_DEBUG
42 <toolset>darwin:<cxxflags>"-Wno-unused-variable -Wno-long-long"
43 <toolset>msvc:<warnings>all # == /W4
44 <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
45 <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
46 <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
47 <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
48 <toolset>msvc:<cxxflags>"-wd4996"
49 <toolset>clang:<variant>debug:<cxxflags>"-fsanitize=memory"
50 # toolset optimizations
51 <toolset>gcc:<cxxflags>"-ftemplate-depth-255"
52 <toolset>clang:<cxxflags>"-ftemplate-depth-255"
53 <toolset>darwin:<cxxflags>"-ftemplate-depth-255"
54 <toolset>msvc:<cxxflags>"-Gy"
56 <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
57 <link>shared:<define>BOOST_WSERIALIZATION_DYN_LINK=1
64 # Given a name of test, return the 'save' test that must be run
65 # before the named test, or empty string if there's no such test.
66 rule dependency-save-test ( test )
68 local m = [ MATCH (.*)load(.*) : $(test) ] ;
71 return $(m[1])save$(m[2]) ;
75 # each of the following tests is run with each type of archive
76 rule run-invoke ( test-name : sources * : requirements * )
78 local save-test = [ dependency-save-test $(test-name) ] ;
82 run-template $(test-name)
85 ../build//boost_serialization
88 <define>BOOST_LIB_DIAGNOSTIC=1
89 <dependency>$(save-test)
94 # each of the following tests is run with each type of archive
95 rule run-winvoke ( test-name : sources * : requirements * )
97 local save-test = [ dependency-save-test $(test-name) ] ;
101 run-template $(test-name)
104 ../build//boost_serialization
105 ../build//boost_wserialization
108 <define>BOOST_LIB_DIAGNOSTIC=1
109 # both stlport and msvc6 define iswspace
110 <toolset>msvc,<stdlib>stlport:<linkflags>"-force:multiple"
111 <dependency>$(save-test)
112 <dependency>../../config/test/all//BOOST_NO_STD_WSTREAMBUF
117 # for tests which don't use library code - usually just headers
118 rule test-bsl-run-no-lib ( test-name : sources * : requirements * )
122 run-template $(test-name)
124 $(test-name).cpp $(sources).cpp
131 # for tests which are run just once rather than for every archive
132 rule test-bsl-run ( test-name : sources * : libs * : requirements * )
136 run-invoke $(test-name)
138 $(test-name).cpp $(sources).cpp $(libs)
145 rule test-bsl-run_archive ( test-name : archive-name : sources * : libs * : requirements * ) {
147 switch $(archive-name) {
150 run-winvoke $(test-name)_$(archive-name)
152 $(sources).cpp $(libs)
154 <define>BOOST_ARCHIVE_TEST=$(archive-name).hpp
159 run-invoke $(test-name)_$(archive-name)
161 $(sources).cpp $(libs)
163 <define>BOOST_ARCHIVE_TEST=$(archive-name).hpp
170 rule test-bsl-run_files ( test-name : sources * : libs * : requirements * ) {
172 for local defn in $(BOOST_ARCHIVE_LIST) {
174 test-bsl-run_archive $(test-name)
176 : $(test-name) $(sources)
184 rule test-bsl-run_polymorphic_archive ( test-name : sources * : requirements * ) {
186 for local defn in $(BOOST_ARCHIVE_LIST) {
188 test-bsl-run_archive $(test-name)
189 : polymorphic_$(defn:LB)
190 : $(test-name) $(sources) $(requirements)