]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | ||
6 | import modules ; | |
b32b8144 | 7 | import testing ; |
7c673cae FG |
8 | |
9 | project : requirements | |
10 | # default to all warnings on: | |
11 | <warnings>all | |
12 | ; | |
13 | ||
14 | local disable-icu = [ MATCH (--disable-icu) : [ modules.peek : ARGV ] ] ; | |
15 | ||
16 | rule path_options ( properties * ) | |
17 | { | |
18 | local result ; | |
19 | if <address-model>64 in $(properties) && <toolset>msvc in $(properties) | |
20 | { | |
21 | result = <search>$(ICU_PATH)/bin64 <search>$(ICU_PATH)/lib64 ; | |
22 | } | |
23 | else | |
24 | { | |
25 | result = <search>$(ICU_PATH)/bin <search>$(ICU_PATH)/lib ; | |
26 | } | |
27 | return $(result) ; | |
28 | } | |
29 | ||
30 | # | |
31 | # ICU configuration: | |
32 | # | |
33 | if ! $(disable-icu) | |
34 | { | |
35 | ||
36 | if [ modules.peek : ICU_PATH ] | |
37 | { | |
38 | ICU_PATH = [ modules.peek : ICU_PATH ] ; | |
39 | } | |
40 | if [ modules.peek : ICU_LINK ] | |
41 | { | |
42 | ICU_LINK = [ modules.peek : ICU_LINK ] ; | |
43 | } | |
44 | ||
45 | if $(ICU_LINK) | |
46 | { | |
47 | ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <runtime-link>shared ; | |
48 | } | |
49 | else | |
50 | { | |
51 | lib icuuc : : <runtime-link>shared <conditional>@path_options ; | |
52 | lib icuuc : : <toolset>msvc <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ; | |
53 | lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>icuucd <runtime-link>shared <conditional>@path_options ; | |
54 | lib icuuc : : <name>sicuuc <runtime-link>static <conditional>@path_options ; | |
55 | lib icuuc : : <toolset>msvc <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ; | |
56 | lib icuuc : : <toolset>intel <target-os>windows <variant>debug <name>sicuucd <runtime-link>static <conditional>@path_options ; | |
57 | lib icuuc : : <name>this_is_an_invalid_library_name ; | |
58 | ||
59 | lib icudt : : <name>icudata <runtime-link>shared <conditional>@path_options ; | |
60 | lib icudt : : <name>icudt <toolset>msvc <runtime-link>shared <conditional>@path_options ; | |
61 | lib icudt : : <name>icudt <toolset>intel <target-os>windows <runtime-link>shared <conditional>@path_options ; | |
62 | lib icudt : : <name>sicudata <runtime-link>static <conditional>@path_options ; | |
63 | lib icudt : : <name>sicudt <toolset>msvc <runtime-link>static <conditional>@path_options ; | |
64 | lib icudt : : <name>sicudt <toolset>intel <target-os>windows <runtime-link>static <conditional>@path_options ; | |
65 | lib icudt : : <name>this_is_an_invalid_library_name ; | |
66 | ||
67 | lib icuin : : <name>icui18n <runtime-link>shared <conditional>@path_options ; | |
68 | lib icuin : : <toolset>msvc <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ; | |
69 | lib icuin : : <toolset>msvc <name>icuin <runtime-link>shared <conditional>@path_options ; | |
70 | lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>icuind <runtime-link>shared <conditional>@path_options ; | |
71 | lib icuin : : <toolset>intel <target-os>windows <name>icuin <runtime-link>shared <conditional>@path_options ; | |
72 | lib icuin : : <name>sicui18n <runtime-link>static <conditional>@path_options ; | |
73 | lib icuin : : <toolset>msvc <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ; | |
74 | lib icuin : : <toolset>msvc <name>sicuin <runtime-link>static <conditional>@path_options ; | |
75 | lib icuin : : <toolset>intel <target-os>windows <variant>debug <name>sicuind <runtime-link>static <conditional>@path_options ; | |
76 | lib icuin : : <toolset>intel <target-os>windows <name>sicuin <runtime-link>static <conditional>@path_options ; | |
77 | lib icuin : : <name>this_is_an_invalid_library_name ; | |
78 | ||
79 | ICU_OPTS = | |
80 | <include>$(ICU_PATH)/include | |
81 | <runtime-link>shared:<library>icuuc/<link>shared | |
82 | <runtime-link>shared:<library>icudt/<link>shared | |
83 | <runtime-link>shared:<library>icuin/<link>shared | |
84 | <runtime-link>static:<library>icuuc | |
85 | <runtime-link>static:<library>icudt | |
86 | <runtime-link>static:<library>icuin | |
87 | <define>BOOST_HAS_ICU=1 | |
88 | <runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1 | |
89 | ; | |
90 | } | |
91 | ||
92 | } | |
93 | ||
94 | unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; | |
95 | explicit has_icu ; | |
96 | ||
97 | alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; | |
98 | ||
99 | SOURCES = | |
100 | c_regex_traits.cpp | |
101 | cpp_regex_traits.cpp | |
102 | cregex.cpp | |
103 | fileiter.cpp | |
104 | icu.cpp | |
105 | instances.cpp | |
106 | posix_api.cpp | |
107 | regex.cpp | |
108 | regex_debug.cpp | |
109 | regex_raw_buffer.cpp | |
110 | regex_traits_defaults.cpp | |
111 | static_mutex.cpp | |
112 | w32_regex_traits.cpp | |
113 | wc_regex_traits.cpp | |
114 | wide_posix_api.cpp | |
115 | winstances.cpp | |
116 | usinstances.cpp ; | |
117 | ||
118 | ||
119 | lib boost_regex : ../src/$(SOURCES) icu_options | |
120 | : | |
121 | <link>shared:<define>BOOST_REGEX_DYN_LINK=1 | |
122 | <toolset>gcc-cygwin:<link>static | |
7c673cae FG |
123 | ; |
124 | ||
125 | boost-install boost_regex ; | |
126 | ||
127 | ||
128 | ||
129 | ||
130 | ||
131 | ||
132 | ||
133 |