Jamfile.v2 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. import feature ;
  11. import testing ;
  12. project
  13. : requirements
  14. <toolset>gcc:<cxxflags>-Wno-deprecated-declarations
  15. ;
  16. import modules ;
  17. import ../checks/config : requires ;
  18. local is_unix = [ modules.peek : UNIX ] ;
  19. lib atomic ;
  20. lib pthread ;
  21. lib rt ;
  22. exe has_atomic_lib : config_info.cpp atomic ;
  23. explicit has_atomic_lib ;
  24. exe has_pthread_lib : config_info.cpp pthread ;
  25. explicit has_pthread_lib ;
  26. exe has_rt_lib : config_info.cpp rt ;
  27. explicit has_rt_lib ;
  28. test-suite config
  29. :
  30. [ compile config_test_c.c ]
  31. [ run config_test.cpp
  32. : #args
  33. : #input-files
  34. : #requirements
  35. <threading>multi
  36. [ check-target-builds has_atomic_lib : <source>atomic ]
  37. [ check-target-builds has_pthread_lib : <source>pthread ]
  38. [ check-target-builds has_rt_lib : <source>rt ]
  39. : config_test_threaded
  40. ]
  41. [ run config_test.cpp
  42. : #args
  43. : #input-files
  44. : #requirements
  45. <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static
  46. [ check-target-builds has_atomic_lib : <source>atomic ]
  47. [ check-target-builds has_pthread_lib : <source>pthread ]
  48. [ check-target-builds has_rt_lib : <source>rt ]
  49. ]
  50. [ run config_test.cpp
  51. : #args
  52. : #input-files
  53. : #requirements
  54. <rtti>off
  55. <toolset>gcc-4.4.7,<cxxstd>0x:<build>no # <memory> does not compile with -fno-rtti
  56. [ check-target-builds has_atomic_lib : <source>atomic ]
  57. [ check-target-builds has_pthread_lib : <source>pthread ]
  58. [ check-target-builds has_rt_lib : <source>rt ]
  59. : config_test_no_rtti
  60. ]
  61. [ run config_test.cpp
  62. : #args
  63. : #input-files
  64. : #requirements
  65. <exception-handling>off
  66. <target-os>vxworks:<build>no # vx requires complete library rebuild to turn off exceptions
  67. [ check-target-builds has_atomic_lib : <source>atomic ]
  68. [ check-target-builds has_pthread_lib : <source>pthread ]
  69. [ check-target-builds has_rt_lib : <source>rt ]
  70. : config_test_no_except
  71. ]
  72. [ 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 ]
  73. [ 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 ]
  74. [ 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 ]
  75. [ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off
  76. <target-os>vxworks:<build>no
  77. : config_info_no_except ]
  78. [ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ]
  79. [ run abi/abi_test.cpp abi/main.cpp ]
  80. [ run limits_test.cpp ]
  81. [ run link/main.cpp link//link_test
  82. : #args
  83. : #input-files
  84. : #requirements
  85. <runtime-link>shared
  86. <define>BOOST_DYN_LINK=1
  87. <define>BOOST_CONFIG_NO_LIB=1
  88. <target-os>vxworks:<link>shared
  89. :
  90. config_link_test
  91. ]
  92. [ compile-fail threads/test_thread_fail1.cpp ]
  93. [ compile-fail threads/test_thread_fail2.cpp ]
  94. [ 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 ] ]
  95. [ compile helper_macro_test.cpp ]
  96. [ run cstdint_test.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
  97. [ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
  98. [ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ]
  99. [ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals cpp_lib_complex_udls cpp_range_based_for_17 ] ]
  100. [ run helper_macros_test.cpp ]
  101. [ compile pragma_message_test.cpp ]
  102. [ compile header_deprecated_test.cpp ]
  103. ;
  104. obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
  105. <toolset>clang:<cxxflags>"-std=c++11 -Wimplicit-fallthrough" <warnings-as-errors>on <warnings>all ;
  106. explicit has_clang_implicit_fallthrough ;
  107. exe config_info_printer : config_info.cpp ;
  108. explicit config_info_printer ;
  109. actions print-run
  110. {
  111. echo With Standard Version $(STANDARD:E=default)
  112. echo =====================================================================
  113. $(>)
  114. }
  115. rule print-run ( target : sources * : properties * )
  116. {
  117. STANDARD on $(target) = [ feature.get-values <cxxstd> : $(properties) ] ;
  118. }
  119. notfile print_config_info : @print-run : config_info_printer ;
  120. explicit print_config_info ;
  121. # Backwards compatibility:
  122. exe config_info_travis : config_info.cpp ;
  123. install config_info_travis_install : config_info_travis : <location>. ;
  124. explicit config_info_travis_install ;