Jamfile.v2 6.9 KB

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