• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# copyright John Maddock 2003
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or copy at
4# http://www.boost.org/LICENSE_1_0.txt.
5
6project
7    : requirements
8      <threading>multi
9      <link>shared:<define>BOOST_REGEX_DYN_LINK=1
10      <toolset>msvc-7.1:<define>TEST_MFC=1
11      <toolset>msvc-7.0:<define>TEST_MFC=1
12      <toolset>msvc:<asynch-exceptions>on
13      # There are unidentified linker problems on these platforms:
14      <toolset>mipspro-7.4:<link>static
15      <toolset>sun-5.9:<link>static
16      <warnings>all
17      <toolset>gcc:<cxxflags>-Wextra
18      <toolset>gcc:<cxxflags>-Wshadow
19      <define>U_USING_ICU_NAMESPACE=0
20      #<toolset>gcc-mw:<link>static
21      #<toolset>gcc-mingw:<link>static
22      #<toolset>gcc-cygwin:<link>static
23      <toolset>sun:<link>static
24    ;
25
26#
27# rule for simple regex test programs:
28#
29rule regex-test ( name : sources + : requirements * : input-files * )
30{
31    return [ run $(sources) ../build//boost_regex
32               :
33               : $(input-files)
34               : $(requirements)
35               : $(name) ] ;
36}
37
38R_SOURCE =
39basic_tests.cpp
40main.cpp
41test_alt.cpp
42test_anchors.cpp
43test_asserts.cpp
44test_backrefs.cpp
45test_deprecated.cpp
46test_emacs.cpp
47test_escapes.cpp
48test_grep.cpp
49test_locale.cpp
50test_mfc.cpp
51test_non_greedy_repeats.cpp
52test_perl_ex.cpp
53test_replace.cpp
54test_sets.cpp
55test_simple_repeats.cpp
56test_tricky_cases.cpp
57test_icu.cpp
58test_unicode.cpp
59test_overloads.cpp
60test_operators.cpp
61;
62
63lib boost_regex_recursive :
64   ../src/c_regex_traits.cpp
65   ../src/cpp_regex_traits.cpp
66   ../src/cregex.cpp
67   ../src/fileiter.cpp
68   ../src/icu.cpp
69   ../src/instances.cpp
70   ../src/posix_api.cpp
71   ../src/regex.cpp
72   ../src/regex_debug.cpp
73   ../src/regex_raw_buffer.cpp
74   ../src/regex_traits_defaults.cpp
75   ../src/static_mutex.cpp
76   ../src/w32_regex_traits.cpp
77   ../src/wc_regex_traits.cpp
78   ../src/wide_posix_api.cpp
79   ../src/winstances.cpp
80   ../src/usinstances.cpp
81   ../build//icu_options
82    :
83        <define>BOOST_REGEX_RECURSIVE=1
84	     <link>shared:<define>BOOST_REGEX_DYN_LINK=1
85    :
86    ;
87
88local regress-sources = regress/$(R_SOURCE) ;
89
90test-suite regex
91      :
92      [ run regress/$(R_SOURCE) ../build//boost_regex ../build//icu_options
93        : # command line
94        : # input files
95        : # requirements
96        : regex_regress ]
97
98      [ run regress/$(R_SOURCE) ../build//boost_regex
99                                ../../thread/build//boost_thread ../build//icu_options
100        : # command line
101        : # input files
102        : # requirements
103        <define>TEST_THREADS
104        : regex_regress_threaded ]
105
106      [ regex-test posix_api_check : c_compiler_checks/posix_api_check.c ]
107
108      [ compile c_compiler_checks/wide_posix_api_check.c
109        : : wide_posix_api_check_c ]
110
111      [ regex-test posix_api_check_cpp : c_compiler_checks/posix_api_check.cpp ]
112
113      [ regex-test wide_posix_api_check_cpp
114          : c_compiler_checks/wide_posix_api_check.cpp ]
115
116      [ run pathology/bad_expression_test.cpp
117            ../build//boost_regex
118      ]
119
120      [ run pathology/recursion_test.cpp
121            ../build//boost_regex
122      ]
123
124      [ run named_subexpressions/named_subexpressions_test.cpp
125            ../build//boost_regex
126      ]
127
128      [ run unicode/unicode_iterator_test.cpp ../build//boost_regex : : : release <define>TEST_UTF8 : unicode_iterator_test_utf8 ]
129      [ run unicode/unicode_iterator_test.cpp ../build//boost_regex : : : release <define>TEST_UTF16 : unicode_iterator_test_utf16 ]
130      [ run static_mutex/static_mutex_test.cpp
131            ../../thread/build//boost_thread ../build//boost_regex
132      ]
133      [ run object_cache/object_cache_test.cpp ../build//boost_regex
134      ]
135
136      [ run config_info/regex_config_info.cpp
137         ../build//boost_regex/<link>static
138         : # command line
139         : # input files
140         : <test-info>always_show_run_output
141      ]
142      [ run config_info/regex_config_info.cpp ../build//boost_regex
143        : # command line
144        : # input files
145        : <test-info>always_show_run_output
146        : regex_dll_config_info
147      ]
148
149      [ run collate_info/collate_info.cpp ../build//boost_regex
150      : : : <test-info>always_show_run_output : test_collate_info ]
151
152
153      [ link concepts/concept_check.cpp ../build//boost_regex ]
154      [ link concepts/icu_concept_check.cpp ../build//boost_regex ]
155      [ link concepts/range_concept_check.cpp ../build//boost_regex ]
156      [ run concepts/test_bug_11988.cpp ../build//boost_regex ]
157
158     [ run
159    # sources
160    captures/captures_test.cpp
161    captures//boost_regex_extra ../build//icu_options
162 :  # additional args
163 :  # test-files
164 :  # requirements
165    <threading>multi
166    <define>BOOST_REGEX_MATCH_EXTRA=1
167    <define>BOOST_REGEX_NO_LIB=1
168 :  # test name
169    captures_test
170 ]
171
172[ run regress/$(R_SOURCE) .//boost_regex_recursive
173                          ../build//icu_options
174  : # command line
175  : # input files
176  : # requirements
177    <define>BOOST_REGEX_RECURSIVE=1
178  : regex_regress_recursive ]
179
180[ run regress/$(R_SOURCE) ./noeh_test//boost_regex_noeh
181                          ../build//icu_options
182  : # command line
183  : # input files
184  : # requirements
185    <define>BOOST_NO_EXCEPTIONS=1
186    <exception-handling>off
187    <link>static
188    <runtime-link>shared
189  : regex_regress_noeh ]
190
191;
192
193compile test_consolidated.cpp ;
194
195build-project ../example ;
196
197# `quick` target (for CI)
198run quick.cpp ../build//boost_regex ;
199
200compile test_warnings.cpp
201   :     <toolset>msvc:<warnings>all <toolset>msvc:<warnings-as-errors>on
202         <toolset>gcc:<warnings>all <toolset>gcc:<warnings-as-errors>on
203         <toolset>clang:<warnings>all <toolset>clang:<warnings-as-errors>on ;
204