• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Boost.Wave: A Standard compliant C++ preprocessor library
2#
3# Boost Wave Library Test Jamfile
4#
5# http://www.boost.org/
6#
7# Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost
8# Software License, Version 1.0. (See accompanying file
9# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10
11
12#
13# These are the sources to compile for the testwave application
14#
15SOURCES_STATIC = testwave testwave_app
16    ;
17
18SOURCES_DYNAMIC = testwave_dll testwave_app_dll
19    ;
20
21SOURCES = $(SOURCE_STATIC) $(SOURCES_DYNAMIC)
22    ;
23
24path-constant TESTWAVE_DIR : $(BOOST_ROOT)/libs/wave/test/testwave/testfiles
25    ;
26
27#
28# This are the arguments for the testwave executable
29#
30TESTWAVE_ARGUMENTS =
31        -d4                              # use -d4 for verbose results
32        --hooks=1                        # test hooks as well
33        -S$(TESTWAVE_DIR)
34        -S$(BOOST_ROOT) -I$(BOOST_ROOT)
35    ;
36
37#
38# These are the names of the different unit tests to run
39#
40TESTWAVE_FILES = test.cfg
41    ;
42
43project wave/test
44    ;
45
46for local source in $(SOURCES)
47{
48    local requirements ;
49    requirements += <toolset-msvc:version>7.1:<rtti>off ; # workaround for compiler bug
50    requirements += <toolset-msvc:version>7.1_stlport4:<rtti>off ;
51    obj $(source) : ../testwave/$(source).cpp : $(requirements) ;
52}
53
54#
55# Wave test suite
56#
57test-suite wave
58    :
59        [
60            run
61            # sources
62                ../testwave/$(SOURCES_DYNAMIC).cpp
63                /boost/wave//boost_wave
64                /boost/program_options//boost_program_options
65                /boost/filesystem//boost_filesystem
66                /boost/system//boost_system
67                /boost/thread//boost_thread
68            :
69            # arguments
70                $(TESTWAVE_ARGUMENTS)
71                --config-file
72            :
73            # input files
74            $(TESTWAVE_DIR)/$(TESTWAVE_FILES)
75            :
76            # requirements
77                <threading>multi
78                <variant>debug
79                <link>shared:<define>BOOST_ALL_DYN_LINK=1
80                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
81                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
82#                <define>BOOST_LIB_DIAGNOSTIC=1
83            :
84            # name
85                testwave_dll
86        ]
87
88        [
89            run
90            # sources
91                ../testwave/$(SOURCES_STATIC).cpp
92                /boost/wave//boost_wave/<link>static
93                /boost/program_options//boost_program_options/<link>static
94                /boost/filesystem//boost_filesystem/<link>static
95                /boost/system//boost_system/<link>static
96                /boost/thread//boost_thread/<link>static
97            :
98            # arguments
99                $(TESTWAVE_ARGUMENTS)
100                --config-file $(TESTWAVE_DIR)/$(TESTWAVE_FILES)
101            :
102            # input files
103            :
104            # requirements
105                <threading>multi
106                <variant>debug
107                <link>static     # Linking to DLL tested by testwave_dll
108                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
109                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
110#                <define>BOOST_LIB_DIAGNOSTIC=1
111            :
112            # name
113                testwave
114        ]
115
116        # test the Slex wave lexing component
117        [
118            run
119            # sources
120                ../testlexers/test_slex_lexer.cpp
121                /boost/wave//boost_wave
122                /boost/program_options//boost_program_options
123                /boost/filesystem//boost_filesystem
124                /boost/thread//boost_thread
125                /boost/system//boost_system
126            :
127            # arguments
128            :
129            # input files
130            :
131            # requirements
132                <threading>multi
133                <variant>debug
134                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
135                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
136            :
137            # name
138                test_slex_lexer
139        ]
140        # test the Re2C wave lexing component
141        [
142            run
143            # sources
144                ../testlexers/test_re2c_lexer.cpp
145                /boost/wave//boost_wave
146                /boost/program_options//boost_program_options
147                /boost/filesystem//boost_filesystem
148                /boost/thread//boost_thread
149                /boost/system//boost_system
150            :
151            # arguments
152            :
153            # input files
154            :
155            # requirements
156                <threading>multi
157                <variant>debug
158                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
159                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
160            :
161            # name
162                test_re2c_lexer
163        ]
164
165        # test the lexertl wave lexing component
166        [
167            run
168            # sources
169                ../testlexers/test_lexertl_lexer.cpp
170                /boost/wave//boost_wave
171                /boost/program_options//boost_program_options
172                /boost/filesystem//boost_filesystem
173                /boost/thread//boost_thread
174                /boost/system//boost_system
175            :
176            # arguments
177            :
178            # input files
179            :
180            # requirements
181                <threading>multi
182                <variant>debug
183                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
184                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
185                # to generate wave_lexertl_tables_next_token.hpp:
186#                <define>BOOST_WAVE_LEXERTL_GENERATE_CPP_CODE=1
187                # to use the resulting static tables:
188#                <define>BOOST_WAVE_LEXERTL_USE_STATIC_TABLES=1
189            :
190            # name
191                test_lexertl_lexer
192        ]
193
194        # test the xlex wave lexing component
195        [
196            run
197            # sources
198                ../testlexers/test_xlex_lexer.cpp
199                /boost/wave//boost_wave
200                /boost/program_options//boost_program_options
201                /boost/filesystem//boost_filesystem
202                /boost/thread//boost_thread
203                /boost/system//boost_system
204            :
205            # arguments
206            :
207            # input files
208            :
209            # requirements
210                <threading>multi
211                <variant>debug
212                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
213                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
214            :
215            # name
216                test_xlex_lexer
217        ]
218
219        [
220            run
221            # sources
222                ../testwave/quick.cpp
223                /boost/wave//boost_wave
224                /boost/thread//boost_thread
225                /boost/filesystem//boost_filesystem
226        ]
227    ;
228
229