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