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>gcc:<cxxflags>"-Wno-non-virtual-dtor -Wno-ctor-dtor-privacy"
38 <toolset>borland:<cxxflags>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066"
39 <toolset>gcc:<warnings>all # ?
40 <toolset>gcc:<cxxflags>"-Wno-long-long"
41 <toolset>msvc:<warnings>all # == /W4
42 <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
43 <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
44 <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
45 <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
46 <toolset>msvc:<cxxflags>"-wd4996"
47 # toolset optimizations
48 <toolset>gcc:<cxxflags>"-ftemplate-depth-255"
49 <toolset>clang:<cxxflags>"-ftemplate-depth-255"
50 <toolset>clang-darwin:<cxxflags>"-ftemplate-depth-255"
51 <toolset>darwin:<cxxflags>"-ftemplate-depth-255"
52 <toolset>msvc:<cxxflags>"-Gy"
59 # Given a name of test, return the 'save' test that must be run
60 # before the named test, or empty string if there's no such test.
61 rule dependency-save-test ( test )
63 local m = [ MATCH (.*)load(.*) : $(test) ] ;
66 return $(m[1])save$(m[2]) ;
70 # each of the following tests is run with each type of archive
71 rule run-invoke ( test-name : sources * : requirements * )
73 local save-test = [ dependency-save-test $(test-name) ] ;
77 run-template $(test-name)
80 ../build//boost_serialization
83 <define>BOOST_LIB_DIAGNOSTIC=1
84 <dependency>$(save-test)
89 # each of the following tests is run with each type of archive
90 rule run-winvoke ( test-name : sources * : requirements * )
92 local save-test = [ dependency-save-test $(test-name) ] ;
96 run-template $(test-name)
99 ../build//boost_serialization
100 ../build//boost_wserialization
103 <define>BOOST_LIB_DIAGNOSTIC=1
104 # both stlport and msvc6 define iswspace
105 <toolset>msvc,<stdlib>stlport:<linkflags>"-force:multiple"
106 <dependency>$(save-test)
107 <dependency>../../config/test/all//BOOST_NO_STD_WSTREAMBUF
112 # for tests which don't use library code - usually just headers
113 rule test-bsl-run-no-lib ( test-name : sources * : requirements * )
117 run-template $(test-name)
119 $(test-name).cpp $(sources).cpp
126 # for tests which are run just once rather than for every archive
127 rule test-bsl-run ( test-name : sources * : libs * : requirements * )
131 run-invoke $(test-name)
133 $(test-name).cpp $(sources).cpp $(libs)
140 rule test-bsl-run_archive ( test-name : archive-name : sources * : libs * : requirements * ) {
142 switch $(archive-name) {
145 run-winvoke $(test-name)_$(archive-name)
147 $(sources).cpp $(libs)
149 <define>BOOST_ARCHIVE_TEST=$(archive-name).hpp
154 run-invoke $(test-name)_$(archive-name)
156 $(sources).cpp $(libs)
158 <define>BOOST_ARCHIVE_TEST=$(archive-name).hpp
165 rule test-bsl-run_files ( test-name : sources * : libs * : requirements * ) {
167 for local defn in $(BOOST_ARCHIVE_LIST) {
169 test-bsl-run_archive $(test-name)
171 : $(test-name) $(sources)
179 rule test-bsl-run_polymorphic_archive ( test-name : sources * ) {
181 for local defn in $(BOOST_ARCHIVE_LIST) {
183 test-bsl-run_archive $(test-name)
184 : polymorphic_$(defn:LB)
185 : $(test-name) $(sources)