Jamfile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #
  2. # Copyright (c) 2019 Vinnie Falco (vinnie dot falco at gmail dot com)
  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. # Official repository: https://github.com/boostorg/beast
  8. #
  9. import ac ;
  10. import os ;
  11. import feature ;
  12. import boost ;
  13. import modules ;
  14. import testing ;
  15. import ../../config/checks/config : requires ;
  16. boost.use-project ;
  17. lib socket ; # SOLARIS, QNXNTO
  18. lib nsl ; # SOLARIS
  19. lib ws2_32 ; # NT
  20. lib mswsock ; # NT
  21. lib ipv6 ; # HPUX
  22. lib network ; # HAIKU
  23. lib ssl ;
  24. lib crypto ;
  25. lib crypt32 ;
  26. lib ssl : : <target-os>windows <name>ssleay32 ;
  27. lib crypto : : <target-os>windows <name>libeay32 ;
  28. feature.feature boost.beast.allow-deprecated : on off : propagated composite ;
  29. feature.compose <boost.beast.allow-deprecated>on : <define>BOOST_BEAST_ALLOW_DEPRECATED ;
  30. feature.feature boost.beast.separate-compilation : on off : propagated composite ;
  31. feature.compose <boost.beast.separate-compilation>on : <define>BOOST_BEAST_SEPARATE_COMPILATION ;
  32. variant beast_coverage
  33. : debug
  34. : <cxxflags>"-msse4.2 --coverage"
  35. <linkflags>"--coverage"
  36. ;
  37. variant beast_valgrind
  38. : release
  39. : <valgrind>on # Boost.Context uses this property
  40. ;
  41. variant beast_ubasan
  42. : release
  43. : <cxxflags>"-msse4.2 -funsigned-char -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined -fsanitize-blacklist=libs/beast/tools/blacklist.supp"
  44. <linkflags>"-fsanitize=address,undefined"
  45. <define>BOOST_USE_ASAN=1
  46. ;
  47. path-constant TEST_MAIN : include/boost/beast/_experimental/unit_test/main.cpp ;
  48. project /boost/beast ;
  49. local defines =
  50. [ requires
  51. cxx11_constexpr
  52. cxx11_decltype
  53. cxx11_hdr_tuple
  54. cxx11_template_aliases
  55. cxx11_variadic_templates
  56. ]
  57. <implicit-dependency>/boost//headers
  58. <include>.
  59. <define>BOOST_ALL_NO_LIB=1
  60. <define>BOOST_ASIO_SEPARATE_COMPILATION
  61. <define>BOOST_ASIO_NO_DEPRECATED=1
  62. <define>BOOST_ASIO_DISABLE_BOOST_ARRAY=1
  63. <define>BOOST_ASIO_DISABLE_BOOST_BIND=1
  64. <define>BOOST_ASIO_DISABLE_BOOST_DATE_TIME=1
  65. <define>BOOST_ASIO_DISABLE_BOOST_REGEX=1
  66. <define>BOOST_COROUTINES_NO_DEPRECATION_WARNING=1
  67. <toolset>msvc:<cxxflags>"/bigobj"
  68. <toolset>msvc-14.1:<cxxflags>"/permissive-"
  69. <toolset>msvc-14.2:<cxxflags>"/permissive-"
  70. <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS=1
  71. <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
  72. <toolset>msvc:<define>_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
  73. <toolset>msvc:<define>_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING
  74. <toolset>msvc,<variant>release:<cxxflags>"/Ob2 /Oi /Ot"
  75. <target-os>linux:<define>_XOPEN_SOURCE=600
  76. <target-os>linux:<define>_GNU_SOURCE=1
  77. <target-os>solaris:<define>_XOPEN_SOURCE=500
  78. <target-os>solaris:<define>__EXTENSIONS__
  79. <target-os>solaris:<library>socket
  80. <target-os>solaris:<library>nsl
  81. <target-os>windows:<define>_WIN32_WINNT=0x0601
  82. <target-os>windows,<toolset>gcc:<library>ws2_32
  83. <target-os>windows,<toolset>gcc:<library>mswsock
  84. <target-os>windows,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
  85. <target-os>hpux,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
  86. <target-os>hpux:<library>ipv6
  87. <target-os>qnxnto:<library>socket
  88. <target-os>haiku:<library>network
  89. ;
  90. lib lib-asio
  91. : test/lib_asio.cpp
  92. : requirements
  93. <link>static
  94. $(defines)
  95. : usage-requirements
  96. $(defines)
  97. ;
  98. lib lib-asio-ssl
  99. : test/lib_asio_ssl.cpp
  100. : requirements
  101. <link>static
  102. $(defines)
  103. [ ac.check-library /boost/beast//ssl : <library>/boost/beast//ssl/<link>shared : <build>no ]
  104. [ ac.check-library /boost/beast//crypto : <library>/boost/beast//crypto/<link>shared : <build>no ]
  105. : usage-requirements
  106. $(defines)
  107. ;
  108. lib lib-beast
  109. : test/lib_beast.cpp
  110. : requirements
  111. <link>static
  112. $(defines)
  113. : usage-requirements
  114. $(defines)
  115. ;