Jamfile.v2 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright (C) 2001-2003 Douglas Gregor
  2. # Copyright (C) 2011-2017 Antony Polukhin
  3. #
  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. #
  7. import testing ;
  8. import feature ;
  9. project
  10. : requirements
  11. <library>/boost/test//boost_unit_test_framework
  12. <link>static
  13. <toolset>gcc-4.7:<cxxflags>-ftrapv
  14. <toolset>gcc-4.6:<cxxflags>-ftrapv
  15. <toolset>clang:<cxxflags>-ftrapv
  16. # default to all warnings on:
  17. <warnings>all
  18. # set warnings as errors for those compilers we know we get warning free:
  19. <toolset>gcc:<cxxflags>-Wextra
  20. # Not a lexical_cast related warning: boost/preprocessor/variadic/elem.hpp:29:46: warning: variadic macros are a C99 feature
  21. <toolset>clang:<cxxflags>-Wno-variadic-macros
  22. <toolset>gcc:<cxxflags>-Wno-variadic-macros
  23. # Not a lexical_cast related warning: boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp:78:1: warning: empty macro arguments are a C99 feature [-Wc99-extensions]
  24. # boost/mpl/iter_fold.hpp:45:1: warning: empty macro arguments are a C99 feature [-Wc99-extensions]
  25. <toolset>clang:<cxxflags>-Wno-c99-extensions
  26. ;
  27. # Thanks to Steven Watanabe for helping with <nowchar> feature
  28. feature.feature nowchar : on :
  29. composite optional propagated link-incompatible ;
  30. feature.compose <nowchar>on : <cxxflags>"/Zc:wchar_t-" ;
  31. test-suite conversion
  32. : [ run lexical_cast_test.cpp ]
  33. [ run lexical_cast_loopback_test.cpp ]
  34. [ run lexical_cast_abstract_test.cpp ]
  35. [ run lexical_cast_noncopyable_test.cpp ]
  36. [ run lexical_cast_vc8_bug_test.cpp ]
  37. [ run lexical_cast_wchars_test.cpp ]
  38. [ run lexical_cast_float_types_test.cpp ]
  39. [ run lexical_cast_inf_nan_test.cpp ]
  40. [ run lexical_cast_containers_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-long-long <toolset>clang:<cxxflags>-Wno-long-long ]
  41. [ run lexical_cast_empty_input_test.cpp ]
  42. [ run lexical_cast_pointers_test.cpp ]
  43. [ compile lexical_cast_typedefed_wchar_test.cpp : <toolset>msvc:<nowchar>on ]
  44. [ run lexical_cast_typedefed_wchar_test_runtime.cpp : : : <toolset>msvc:<nowchar>on <toolset>msvc,<stdlib>stlport:<build>no ]
  45. [ run lexical_cast_no_locale_test.cpp : : : <define>BOOST_NO_STD_LOCALE <define>BOOST_LEXICAL_CAST_ASSUME_C_LOCALE ]
  46. [ run lexical_cast_no_exceptions_test.cpp : : : <define>BOOST_NO_EXCEPTIONS
  47. <toolset>gcc-4.3:<cxxflags>-fno-exceptions
  48. <toolset>gcc-4.4:<cxxflags>-fno-exceptions
  49. <toolset>gcc-4.5:<cxxflags>-fno-exceptions
  50. <toolset>gcc-4.6:<cxxflags>-fno-exceptions
  51. <toolset>gcc-4.7:<cxxflags>-fno-exceptions
  52. <toolset>gcc-4.8:<cxxflags>-fno-exceptions
  53. <toolset>clang:<cxxflags>-fno-exceptions
  54. ]
  55. [ run lexical_cast_iterator_range_test.cpp ]
  56. [ run lexical_cast_arrays_test.cpp : : :
  57. <toolset>msvc:<cxxflags>/wd4512 # assignment operator could not be generated
  58. ]
  59. [ run lexical_cast_integral_types_test.cpp ]
  60. [ run lexical_cast_stream_detection_test.cpp ]
  61. [ run lexical_cast_stream_traits_test.cpp ]
  62. [ compile-fail lexical_cast_to_pointer_test.cpp ]
  63. [ run lexical_cast_filesystem_test.cpp ../../filesystem/build//boost_filesystem/<link>static ]
  64. [ run lexical_cast_try_lexical_convert.cpp ]
  65. [ run lexical_cast_no_comp_time_prcision.cpp : : :
  66. <toolset>msvc:<cxxflags>/wd4127 # conditional expression is constant
  67. ]
  68. ;
  69. # Assuring that examples compile and run. Adding sources from `example` directory to the `conversion` test suite.
  70. for local p in [ glob ../example/*.cpp ]
  71. {
  72. conversion += [ run $(p) ] ;
  73. }