1# 2# Copyright John Maddock 2008. 3# Use, modification and distribution are subject to the 4# Boost Software License, Version 1.0. (See accompanying file 5# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6# 7# If you need to alter build preferences then set them in 8# the template defined in options_v2.jam. 9# 10 11import feature ; 12import testing ; 13 14project 15 : requirements 16 <toolset>gcc:<cxxflags>-Wno-deprecated-declarations 17; 18 19 20import modules ; 21import ../checks/config : requires ; 22 23local is_unix = [ modules.peek : UNIX ] ; 24 25lib atomic ; 26lib pthread ; 27lib rt ; 28 29exe has_atomic_lib : config_info.cpp atomic ; 30explicit has_atomic_lib ; 31exe has_pthread_lib : config_info.cpp pthread ; 32explicit has_pthread_lib ; 33exe has_rt_lib : config_info.cpp rt ; 34explicit has_rt_lib ; 35 36test-suite config 37 : 38 [ compile config_test_c.c ] 39 [ run config_test.cpp 40 : #args 41 : #input-files 42 : #requirements 43 <threading>multi 44 [ check-target-builds has_atomic_lib : <source>atomic ] 45 [ check-target-builds has_pthread_lib : <source>pthread ] 46 [ check-target-builds has_rt_lib : <source>rt ] 47 : config_test_threaded 48 ] 49 [ run config_test.cpp 50 : #args 51 : #input-files 52 : #requirements 53 <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static 54 [ check-target-builds has_atomic_lib : <source>atomic ] 55 [ check-target-builds has_pthread_lib : <source>pthread ] 56 [ check-target-builds has_rt_lib : <source>rt ] 57 ] 58 [ run config_test.cpp 59 : #args 60 : #input-files 61 : #requirements 62 <rtti>off 63 <toolset>gcc-4.4.7,<cxxstd>0x:<build>no # <memory> does not compile with -fno-rtti 64 <toolset>embarcadero:<build>no # <memory> does not compile with -fno-rtti 65 [ check-target-builds has_atomic_lib : <source>atomic ] 66 [ check-target-builds has_pthread_lib : <source>pthread ] 67 [ check-target-builds has_rt_lib : <source>rt ] 68 : config_test_no_rtti 69 ] 70 [ run config_test.cpp 71 : #args 72 : #input-files 73 : #requirements 74 <exception-handling>off 75 <target-os>vxworks:<build>no # vx requires complete library rebuild to turn off exceptions 76 [ check-target-builds has_atomic_lib : <source>atomic ] 77 [ check-target-builds has_pthread_lib : <source>pthread ] 78 [ check-target-builds has_rt_lib : <source>rt ] 79 : config_test_no_except 80 ] 81 [ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on ] 82 [ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on : config_info_threaded ] 83 [ run config_info.cpp : : : <test-info>always_show_run_output <rtti>off <toolset>msvc:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on : config_info_no_rtti ] 84 [ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off 85 <target-os>vxworks:<build>no 86 : config_info_no_except ] 87 [ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ] 88 [ run abi/abi_test.cpp abi/main.cpp ] 89 [ run limits_test.cpp ] 90 [ run link/main.cpp link//link_test 91 : #args 92 : #input-files 93 : #requirements 94 <runtime-link>shared 95 <threading>single 96 <define>BOOST_DYN_LINK=1 97 <define>BOOST_CONFIG_NO_LIB=1 98 <target-os>vxworks:<link>shared 99 : 100 config_link_test 101 ] 102 [ compile-fail threads/test_thread_fail1.cpp ] 103 [ compile-fail threads/test_thread_fail2.cpp ] 104 [ compile boost_fallthrough_test.cpp : [ check-target-builds has_clang_implicit_fallthrough "Clang implicit fallthrough" : <toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ] ] 105 [ compile helper_macro_test.cpp ] 106 [ run cstdint_test.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ] 107 [ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ] 108 [ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ] 109 [ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals cpp_lib_complex_udls cpp_range_based_for_17 ] ] 110 [ run helper_macros_test.cpp ] 111 [ compile pragma_message_test.cpp ] 112 [ compile header_deprecated_test.cpp ] 113 [ compile boost_override_test.cpp ] 114 ; 115 116obj has_clang_implicit_fallthrough : cmd_line_check.cpp : 117 <toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ; 118 119explicit has_clang_implicit_fallthrough ; 120 121exe config_info_printer : config_info.cpp ; 122explicit config_info_printer ; 123exe math_info_printer : math_info.cpp ; 124explicit math_info_printer ; 125 126actions print-run 127{ 128 echo With Standard Version $(STANDARD:E=default) 129 echo ===================================================================== 130 $(>) 131} 132 133rule print-run ( target : sources * : properties * ) 134{ 135 STANDARD on $(target) = [ feature.get-values <cxxstd> : $(properties) ] ; 136} 137 138notfile print_config_info : @print-run : config_info_printer ; 139explicit print_config_info ; 140notfile print_math_info : @print-run : math_info_printer ; 141explicit print_math_info ; 142 143# Backwards compatibility: 144exe config_info_travis : config_info.cpp ; 145install config_info_travis_install : config_info_travis : <location>. ; 146explicit config_info_travis_install ; 147 148