• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Boost.Iostreams Library test Jamfile
2
3# (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
4# (C) Copyright 2004-2007 Jonathan Turkanis
5# Distributed under the Boost Software License, Version 1.0. (See accompanying
6# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
7
8# See http://www.boost.org/libs/iostreams for documentation.
9
10import stlport ;
11import modules ;
12import ac ;
13
14local NO_BZIP2 = [ modules.peek : NO_BZIP2 ] ;
15local NO_ZLIB = [ modules.peek : NO_ZLIB ] ;
16local NO_LZMA = [ modules.peek : NO_LZMA ] ;
17local NO_ZSTD = [ modules.peek : NO_ZSTD ] ;
18local LARGE_FILE_TEMP = [ modules.peek : LARGE_FILE_TEMP ] ;
19local LARGE_FILE_KEEP = [ modules.peek : LARGE_FILE_KEEP ] ;
20
21rule test-iostreams ( sources * : requirements * : target-name ? ) {
22    return [
23            run
24                $(sources)
25                /boost/test//boost_unit_test_framework/<link>static
26                /boost/filesystem//boost_filesystem/<link>static
27            : # command
28            : # input files
29            : # build requirements
30                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
31                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
32                <toolset>cw-9.3,<os>darwin:<runtime-link>static
33                <define>BOOST_IOSTREAMS_NO_LIB
34                <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
35                $(requirements)
36            : $(target-name)
37        ] ;
38}
39
40rule compile-fail-iostreams ( sources * : requirements * : target-name ? ) {
41    return [
42            compile-fail
43                $(sources)
44                /boost/test//boost_unit_test_framework/<link>static
45                /boost/filesystem//boost_filesystem/<link>static
46            : # build requirements
47                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
48                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
49                <toolset>cw-9.3,<os>darwin:<runtime-link>static
50                <define>BOOST_IOSTREAMS_NO_LIB
51                <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
52                $(requirements)
53            : $(target-name)
54        ] ;
55}
56
57
58    local all-tests =
59          [ test-iostreams array_test.cpp ]
60          [ test-iostreams auto_close_test.cpp ]
61          [ test-iostreams buffer_size_test.cpp ]
62          [ test-iostreams close_test.cpp ]
63          [ test-iostreams
64                code_converter_test.cpp
65                detail/utf8_codecvt_facet.cpp ]
66          [ test-iostreams combine_test.cpp ]
67          [ test-iostreams compose_test.cpp ]
68          [ test-iostreams component_access_test.cpp ]
69          [ test-iostreams copy_test.cpp ]
70          [ test-iostreams counter_test.cpp ]
71          [ test-iostreams direct_adapter_test.cpp ]
72          [ test-iostreams dual_seekable_test.cpp ]
73          [ test-iostreams example_test.cpp ]
74          [ test-iostreams execute_test.cpp ]
75          [ test-iostreams file_test.cpp ]
76          [ test-iostreams file_descriptor_test.cpp
77                ../build//boost_iostreams ]
78          [ test-iostreams deprecated_file_descriptor_test.cpp
79                ../build//boost_iostreams
80                : <define>BOOST_IOSTREAMS_USE_DEPRECATED ]
81          [ compile-fail-iostreams deprecated_file_descriptor_test.cpp
82                :
83                : deprecated_file_descriptor_fail ]
84          [ test-iostreams filtering_stream_test.cpp ]
85          [ test-iostreams finite_state_filter_test.cpp ]
86          [ test-iostreams flush_test.cpp ]
87          [ test-iostreams
88                grep_test.cpp
89                /boost/regex//boost_regex ]
90          [ test-iostreams invert_test.cpp ]
91          [ test-iostreams line_filter_test.cpp ]
92          [ test-iostreams mapped_file_test.cpp
93                ../build//boost_iostreams ]
94          [ test-iostreams path_test.cpp ]
95          [ test-iostreams newline_test.cpp ]
96          [ test-iostreams null_test.cpp ]
97          [ test-iostreams operation_sequence_test.cpp ]
98          [ test-iostreams pipeline_test.cpp ]
99          [ test-iostreams read_nonblocking_test.cpp ]
100          [ test-iostreams
101                regex_filter_test.cpp
102                /boost/regex//boost_regex ]
103          [ test-iostreams restrict_test.cpp ]
104          [ test-iostreams seekable_file_test.cpp ]
105          [ test-iostreams seekable_filter_test.cpp ]
106          [ test-iostreams sequence_test.cpp ]
107          [ test-iostreams slice_test.cpp ]
108          [ test-iostreams stdio_filter_test.cpp ]
109          [ test-iostreams stream_offset_32bit_test.cpp ]
110          [ test-iostreams stream_offset_64bit_test.cpp ]
111          [ test-iostreams stream_state_test.cpp ]
112          [ test-iostreams symmetric_filter_test.cpp ]
113          [ test-iostreams tee_test.cpp ]
114          [ test-iostreams wide_stream_test.cpp ]
115          [ test-iostreams windows_pipe_test.cpp
116               ../build//boost_iostreams
117               : <build>no <target-os>windows:<build>yes ]
118          ;
119
120      if $(LARGE_FILE_KEEP)
121      {
122          all-tests +=
123              [ test-iostreams
124                    large_file_test.cpp
125                    ../src/file_descriptor.cpp
126                    ../src/mapped_file.cpp
127                  : <define>LARGE_FILE_KEEP=$(LARGE_FILE_KEEP)
128                    <link>static ] ;
129      }
130      if $(LARGE_FILE_TEMP)
131      {
132          all-tests +=
133              [ test-iostreams
134                    large_file_test.cpp
135                    ../src/file_descriptor.cpp
136                    ../src/mapped_file.cpp
137                  : <define>LARGE_FILE_TEMP=$(LARGE_FILE_TEMP)
138                    <link>static ] ;
139      }
140      if ! $(NO_BZIP2)
141      {
142          all-tests += [ test-iostreams
143                    bzip2_test.cpp ../build//boost_iostreams :
144                    [ ac.check-library /bzip2//bzip2 : : <build>no ] ] ;
145      }
146      if ! $(NO_ZLIB)
147      {
148          all-tests +=
149              [ test-iostreams
150                    write_failure_test.cpp ../build//boost_iostreams :
151                    [ ac.check-library /zlib//zlib : : <build>no ] ]
152              [ test-iostreams
153                    gzip_test.cpp ../build//boost_iostreams :
154                    [ ac.check-library /zlib//zlib : : <build>no ] ]
155              [ test-iostreams
156                    zlib_test.cpp ../build//boost_iostreams :
157                    [ ac.check-library /zlib//zlib : : <build>no ] ] ;
158      }
159      if ! $(NO_LZMA)
160      {
161          using lzma : : <build-name>boost_lzma <tag>@tag : : true ;
162          all-tests += [ test-iostreams
163                             lzma_test.cpp ../build//boost_iostreams :
164                             [ ac.check-library /lzma//lzma : : <build>no ] ] ;
165      }
166      if ! $(NO_ZSTD)
167      {
168          using zstd ;
169          all-tests += [ test-iostreams
170                             zstd_test.cpp ../build//boost_iostreams :
171                             [ ac.check-library /zstd//zstd : : <build>no ] ] ;
172      }
173
174    test-suite "iostreams" : $(all-tests) ;
175
176