Jamfile.v2 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. # copyright John Maddock 2003
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at
  4. # http://www.boost.org/LICENSE_1_0.txt.
  5. import modules ;
  6. import testing ;
  7. import errors ;
  8. project : requirements
  9. # default to all warnings on:
  10. <warnings>all
  11. ;
  12. local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ;
  13. rule path_options ( properties * )
  14. {
  15. local result ;
  16. if <address-model>64 in $(properties) && <toolset>msvc in $(properties)
  17. {
  18. result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ;
  19. }
  20. else
  21. {
  22. result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ;
  23. }
  24. return $(result) ;
  25. }
  26. #
  27. # ICU configuration:
  28. #
  29. if ! $(disable-icu)
  30. {
  31. if [ modules.peek : ICU_LINK ]
  32. {
  33. errors.user-error : "The ICU_LINK option is no longer supported by the Boost.Regex build - please refer to the documentation for equivalent options" ;
  34. }
  35. if [ modules.peek : ICU_PATH ]
  36. {
  37. ICU_PATH = [ modules.peek : ICU_PATH ] ;
  38. }
  39. if [ modules.peek : ICU_ICUUC_NAME ]
  40. {
  41. ICU_ICUUC_NAME = [ modules.peek : ICU_ICUUC_NAME ] ;
  42. }
  43. if [ modules.peek : ICU_ICUDT_NAME ]
  44. {
  45. ICU_ICUDT_NAME = [ modules.peek : ICU_ICUDT_NAME ] ;
  46. }
  47. if [ modules.peek : ICU_ICUIN_NAME ]
  48. {
  49. ICU_ICUIN_NAME = [ modules.peek : ICU_ICUIN_NAME ] ;
  50. }
  51. if $(ICU_ICUUC_NAME)
  52. {
  53. lib icuuc : : <name>$(ICU_ICUUC_NAME) ;
  54. }
  55. else
  56. {
  57. lib icuuc : : <runtime-link>shared <conditional>@path_options ;
  58. lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
  59. lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ;
  60. lib icuuc : : <name>sicuuc <runtime-link>static <conditional>@path_options ;
  61. lib icuuc : : <toolset>msvc <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
  62. lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ;
  63. lib icuuc : : <name>this_is_an_invalid_library_name ;
  64. }
  65. if $(ICU_ICUDT_NAME)
  66. {
  67. lib icudt : : <name>$(ICU_ICUDT_NAME) ;
  68. }
  69. else
  70. {
  71. lib icudt : : <name>icudata <runtime-link>shared <conditional>@path_options ;
  72. lib icudt : : <name>icudt <toolset>msvc <runtime-link>shared <conditional>@path_options ;
  73. lib icudt : : <name>icudt <toolset>intel <target-os>windows <runtime-link>shared <conditional>@path_options ;
  74. lib icudt : : <name>sicudata <runtime-link>static <conditional>@path_options ;
  75. lib icudt : : <name>sicudt <toolset>msvc <runtime-link>static <conditional>@path_options ;
  76. lib icudt : : <name>sicudt <toolset>intel <target-os>windows <runtime-link>static <conditional>@path_options ;
  77. lib icudt : : <name>this_is_an_invalid_library_name ;
  78. }
  79. if $(ICU_ICUIN_NAME)
  80. {
  81. lib icuin : : <name>$(ICU_ICUIN_NAME) ;
  82. }
  83. else
  84. {
  85. lib icuin : : <name>icui18n <runtime-link>shared <conditional>@path_options ;
  86. lib icuin : : <toolset>msvc <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
  87. lib icuin : : <toolset>msvc <name>icuin <runtime-link>shared <conditional>@path_options ;
  88. lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ;
  89. lib icuin : : <toolset>intel <target-os>windows <name>icuin <runtime-link>shared <conditional>@path_options ;
  90. lib icuin : : <name>sicui18n <runtime-link>static <conditional>@path_options ;
  91. lib icuin : : <toolset>msvc <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
  92. lib icuin : : <toolset>msvc <name>sicuin <runtime-link>static <conditional>@path_options ;
  93. lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ;
  94. lib icuin : : <toolset>intel <target-os>windows <name>sicuin <runtime-link>static <conditional>@path_options ;
  95. lib icuin : : <name>this_is_an_invalid_library_name ;
  96. }
  97. ICU_OPTS =
  98. <include>$(ICU_PATH)/include
  99. <runtime-link>shared:<library>icuuc/<link>shared
  100. <runtime-link>shared:<library>icudt/<link>shared
  101. <runtime-link>shared:<library>icuin/<link>shared
  102. <runtime-link>static:<library>icuuc
  103. <runtime-link>static:<library>icudt
  104. <runtime-link>static:<library>icuin
  105. <define>BOOST_HAS_ICU=1
  106. <runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
  107. ;
  108. }
  109. unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ;
  110. explicit has_icu ;
  111. alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ;
  112. SOURCES =
  113. c_regex_traits.cpp
  114. cpp_regex_traits.cpp
  115. cregex.cpp
  116. fileiter.cpp
  117. icu.cpp
  118. instances.cpp
  119. posix_api.cpp
  120. regex.cpp
  121. regex_debug.cpp
  122. regex_raw_buffer.cpp
  123. regex_traits_defaults.cpp
  124. static_mutex.cpp
  125. w32_regex_traits.cpp
  126. wc_regex_traits.cpp
  127. wide_posix_api.cpp
  128. winstances.cpp
  129. usinstances.cpp ;
  130. lib boost_regex : ../src/$(SOURCES) icu_options
  131. :
  132. <link>shared:<define>BOOST_REGEX_DYN_LINK=1
  133. <toolset>gcc-cygwin:<link>static
  134. ;
  135. boost-install boost_regex ;