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 ;
12
13local NO_BZIP2 = [ modules.peek : NO_BZIP2 ] ;
14local NO_ZLIB = [ modules.peek : NO_ZLIB ] ;
15local LARGE_FILE_TEMP = [ modules.peek : LARGE_FILE_TEMP ] ;
16local LARGE_FILE_KEEP = [ modules.peek : LARGE_FILE_KEEP ] ;
17
18rule test-iostreams ( sources * : requirements * : target-name ? ) {
19    return [
20            run
21                $(sources)
22                /boost/test//boost_unit_test_framework/<link>static
23                /boost/filesystem//boost_filesystem/<link>static
24            : # command
25            : # input files
26            : # build requirements
27                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
28                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
29                <toolset>cw-9.3,<os>darwin:<runtime-link>static
30                <define>BOOST_IOSTREAMS_NO_LIB
31                <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
32                $(requirements)
33            : $(target-name)
34        ] ;
35}
36
37rule compile-fail-iostreams ( sources * : requirements * : target-name ? ) {
38    return [
39            compile-fail
40                $(sources)
41                /boost/test//boost_unit_test_framework/<link>static
42                /boost/filesystem//boost_filesystem/<link>static
43            : # build requirements
44                <toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
45                <toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
46                <toolset>cw-9.3,<os>darwin:<runtime-link>static
47                <define>BOOST_IOSTREAMS_NO_LIB
48                <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
49                $(requirements)
50            : $(target-name)
51        ] ;
52}
53
54
55    local all-tests =
56          [ test-iostreams array_test.cpp ]
57          [ test-iostreams auto_close_test.cpp ]
58          [ test-iostreams buffer_size_test.cpp ]
59          [ test-iostreams close_test.cpp ]
60          [ test-iostreams
61                code_converter_test.cpp
62                detail/utf8_codecvt_facet.cpp ]
63          [ test-iostreams combine_test.cpp ]
64          [ test-iostreams compose_test.cpp ]
65          [ test-iostreams component_access_test.cpp ]
66          [ test-iostreams copy_test.cpp ]
67          [ test-iostreams counter_test.cpp ]
68          [ test-iostreams direct_adapter_test.cpp ]
69          [ test-iostreams example_test.cpp ]
70          [ test-iostreams execute_test.cpp ]
71          [ test-iostreams file_test.cpp ]
72          [ test-iostreams file_descriptor_test.cpp
73                ../build//boost_iostreams ]
74          [ test-iostreams deprecated_file_descriptor_test.cpp
75                ../build//boost_iostreams
76                : <define>BOOST_IOSTREAMS_USE_DEPRECATED ]
77          [ compile-fail-iostreams deprecated_file_descriptor_test.cpp
78                :
79                : deprecated_file_descriptor_fail ]
80          [ test-iostreams filtering_stream_test.cpp ]
81          [ test-iostreams finite_state_filter_test.cpp ]
82          [ test-iostreams flush_test.cpp ]
83          [ test-iostreams
84                grep_test.cpp
85                /boost/regex//boost_regex ]
86          [ test-iostreams invert_test.cpp ]
87          [ test-iostreams line_filter_test.cpp ]
88          [ test-iostreams mapped_file_test.cpp
89                ../build//boost_iostreams ]
90          [ test-iostreams path_test.cpp ]
91          [ test-iostreams newline_test.cpp ]
92          [ test-iostreams null_test.cpp ]
93          [ test-iostreams operation_sequence_test.cpp ]
94          [ test-iostreams pipeline_test.cpp ]
95          [ test-iostreams
96                regex_filter_test.cpp
97                /boost/regex//boost_regex ]
98          [ test-iostreams restrict_test.cpp ]
99          [ test-iostreams seekable_file_test.cpp ]
100          [ test-iostreams seekable_filter_test.cpp ]
101          [ test-iostreams sequence_test.cpp ]
102          [ test-iostreams slice_test.cpp ]
103          [ test-iostreams stdio_filter_test.cpp ]
104          [ test-iostreams stream_offset_32bit_test.cpp ]
105          [ test-iostreams stream_offset_64bit_test.cpp ]
106          #[ test-iostreams stream_state_test.cpp ]
107          [ test-iostreams symmetric_filter_test.cpp ]
108          [ test-iostreams tee_test.cpp ]
109          [ test-iostreams wide_stream_test.cpp ]
110          [ test-iostreams windows_pipe_test.cpp
111               ../build//boost_iostreams
112               : <build>no <target-os>windows:<build>yes ]
113          ;
114
115      if $(LARGE_FILE_KEEP)
116      {
117          all-tests +=
118              [ test-iostreams
119                    large_file_test.cpp
120                    ../src/file_descriptor.cpp
121                    ../src/mapped_file.cpp
122                  : <define>LARGE_FILE_KEEP=$(LARGE_FILE_KEEP)
123                    <link>static ] ;
124      }
125      if $(LARGE_FILE_TEMP)
126      {
127          all-tests +=
128              [ test-iostreams
129                    large_file_test.cpp
130                    ../src/file_descriptor.cpp
131                    ../src/mapped_file.cpp
132                  : <define>LARGE_FILE_TEMP=$(LARGE_FILE_TEMP)
133                    <link>static ] ;
134      }
135      if ! $(NO_BZIP2)
136      {
137          all-tests += [ test-iostreams
138                    bzip2_test.cpp ../build//boost_iostreams ] ;
139      }
140      if ! $(NO_ZLIB)
141      {
142          all-tests +=
143              [ test-iostreams
144                    gzip_test.cpp ../build//boost_iostreams ]
145              [ test-iostreams
146                    zlib_test.cpp ../build//boost_iostreams ] ;
147      }
148
149    test-suite "iostreams" : $(all-tests) ;
150
151