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