OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Note to maintainers: In the January 2014 release (*_0122*), there are some | 5 # Note to maintainers: In the January 2014 release (*_0122*), there are some |
6 # options for building: | 6 # options for building: |
7 # Pick one quadgram file (cld2_generated_quadchrome*.cc): | 7 # Pick one quadgram file (cld2_generated_quadchrome*.cc): |
8 # 0122_16 = 160K entries, smallest size, lowest accuracy (set cld2_table_size=
0) | 8 # 0122_16 = 160K entries, smallest size, lowest accuracy (set cld2_table_size=
0) |
9 # 0122_19 = 192K entries, medium size, medium accuracy (set cld2_table_size=1) | 9 # 0122_19 = 192K entries, medium size, medium accuracy (set cld2_table_size=1) |
10 # 0122_2 = 256K entries, largest size, highest accuracy (set cld2_table_size=
2) | 10 # 0122_2 = 256K entries, largest size, highest accuracy (set cld2_table_size=
2) |
11 # | 11 # |
12 # For the CJK bigram file (cld_generated_cjk_delta_bi*.cc), always use | 12 # For the CJK bigram file (cld_generated_cjk_delta_bi*.cc), always use |
13 # cld_generated_cjk_delta_bi_4.cc, as this is intended for use with Chromium. | 13 # cld_generated_cjk_delta_bi_4.cc, as this is intended for use with Chromium. |
14 # The _32 variant of the file is intended for applications that use the full | 14 # The _32 variant of the file is intended for applications that use the full |
15 # 175-language version of CLD2. | 15 # 175-language version of CLD2. |
16 | 16 |
17 { | 17 { |
18 'targets': [ | 18 'targets': [ |
19 { | 19 { |
20 'target_name': 'cld_2', | 20 'target_name': 'cld_2_dynamic_data_tool', |
21 'type': 'static_library', | 21 'type': 'executable', |
22 'include_dirs': [ | 22 'include_dirs': [ |
23 'src/internal', | 23 'src/internal', |
24 'src/public', | 24 'src/public', |
25 ], | 25 ], |
26 'sources': [ | 26 'sources': [ |
| 27 'src/internal/cld2_dynamic_data.h', |
| 28 'src/internal/cld2_dynamic_data.cc', |
| 29 'src/internal/cld2_dynamic_data_extractor.h', |
| 30 'src/internal/cld2_dynamic_data_extractor.cc', |
| 31 'src/internal/cld2_dynamic_data_loader.h', |
| 32 'src/internal/cld2_dynamic_data_loader.cc', |
| 33 'src/internal/cld2_dynamic_data_tool.cc', |
27 'src/internal/cld2_generated_cjk_compatible.cc', | 34 'src/internal/cld2_generated_cjk_compatible.cc', |
28 'src/internal/cld2_generated_deltaoctachrome0122.cc', | 35 'src/internal/cld2_generated_deltaoctachrome0122.cc', |
29 'src/internal/cld2_generated_distinctoctachrome0122.cc', | 36 'src/internal/cld2_generated_distinctoctachrome0122.cc', |
30 'src/internal/cld2tablesummary.h', | 37 'src/internal/cld2tablesummary.h', |
31 'src/internal/cld_generated_cjk_delta_bi_4.cc', | 38 'src/internal/cld_generated_cjk_delta_bi_4.cc', |
32 'src/internal/cld_generated_cjk_uni_prop_80.cc', | 39 'src/internal/cld_generated_cjk_uni_prop_80.cc', |
33 'src/internal/cld_generated_score_quad_octa_0122_2.cc', | 40 'src/internal/cld_generated_score_quad_octa_0122_2.cc', |
34 'src/internal/cldutil.cc', | 41 'src/internal/cldutil.cc', |
35 'src/internal/cldutil.h', | 42 'src/internal/cldutil.h', |
36 'src/internal/cldutil_shared.cc', | 43 'src/internal/cldutil_shared.cc', |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 ], | 96 ], |
90 }], | 97 }], |
91 ['cld2_table_size==2', { | 98 ['cld2_table_size==2', { |
92 # Large table sizes | 99 # Large table sizes |
93 'sources+': [ | 100 'sources+': [ |
94 'src/internal/cld2_generated_quadchrome0122_2.cc', | 101 'src/internal/cld2_generated_quadchrome0122_2.cc', |
95 ], | 102 ], |
96 }], | 103 }], |
97 ], | 104 ], |
98 }, | 105 }, |
| 106 { |
| 107 'target_name': 'cld_2', |
| 108 'type': 'static_library', |
| 109 'include_dirs': [ |
| 110 'src/internal', |
| 111 'src/public', |
| 112 ], |
| 113 'sources': [ |
| 114 'src/internal/cld2tablesummary.h', |
| 115 'src/internal/cldutil.cc', |
| 116 'src/internal/cldutil.h', |
| 117 'src/internal/cldutil_shared.cc', |
| 118 'src/internal/cldutil_shared.h', |
| 119 'src/internal/compact_lang_det.cc', |
| 120 'src/internal/compact_lang_det_hint_code.cc', |
| 121 'src/internal/compact_lang_det_hint_code.h', |
| 122 'src/internal/compact_lang_det_impl.cc', |
| 123 'src/internal/compact_lang_det_impl.h', |
| 124 'src/internal/debug.h', |
| 125 'src/internal/debug_empty.cc', |
| 126 'src/internal/fixunicodevalue.cc', |
| 127 'src/internal/fixunicodevalue.h', |
| 128 'src/internal/generated_distinct_bi_0.cc', |
| 129 'src/internal/generated_entities.cc', |
| 130 'src/internal/generated_language.cc', |
| 131 'src/internal/generated_language.h', |
| 132 'src/internal/generated_ulscript.cc', |
| 133 'src/internal/generated_ulscript.h', |
| 134 'src/internal/getonescriptspan.cc', |
| 135 'src/internal/getonescriptspan.h', |
| 136 'src/internal/integral_types.h', |
| 137 'src/internal/lang_script.cc', |
| 138 'src/internal/lang_script.h', |
| 139 'src/internal/langspan.h', |
| 140 'src/internal/offsetmap.cc', |
| 141 'src/internal/offsetmap.h', |
| 142 'src/internal/port.h', |
| 143 'src/internal/scoreonescriptspan.cc', |
| 144 'src/internal/scoreonescriptspan.h', |
| 145 'src/internal/stringpiece.h', |
| 146 'src/internal/tote.cc', |
| 147 'src/internal/tote.h', |
| 148 'src/internal/utf8prop_lettermarkscriptnum.h', |
| 149 'src/internal/utf8repl_lettermarklower.h', |
| 150 'src/internal/utf8scannot_lettermarkspecial.h', |
| 151 'src/internal/utf8statetable.cc', |
| 152 'src/internal/utf8statetable.h', |
| 153 'src/public/compact_lang_det.h', |
| 154 'src/public/encodings.h', |
| 155 ], |
| 156 'conditions': [ |
| 157 ['OS=="win"', { |
| 158 'msvs_disabled_warnings': [4267], |
| 159 }], |
| 160 # Dynamic or vanilla mode |
| 161 ['cld2_dynamic==1', |
| 162 { |
| 163 # Enable dynamic mode, which allows CLD to read its data from a file |
| 164 # instead of requiring the data to be linked into the library. |
| 165 # You must generate the data file and check it in using the |
| 166 # cld2_dynamic_data_tool. |
| 167 # build/common.gypi takes care of setting -D CLD2_MODE_DYNAMIC |
| 168 'sources+': [ |
| 169 'src/internal/cld2_dynamic_data.h', |
| 170 'src/internal/cld2_dynamic_data.cc', |
| 171 'src/internal/cld2_dynamic_data_loader.h', |
| 172 'src/internal/cld2_dynamic_data_loader.cc', |
| 173 ], |
| 174 }, |
| 175 { |
| 176 # Else it's regular mode, so link in all the data blobs directly. |
| 177 'sources+': [ |
| 178 'src/internal/cld2_generated_cjk_compatible.cc', |
| 179 'src/internal/cld2_generated_deltaoctachrome0122.cc', |
| 180 'src/internal/cld2_generated_distinctoctachrome0122.cc', |
| 181 'src/internal/cld_generated_cjk_delta_bi_4.cc', |
| 182 'src/internal/cld_generated_cjk_uni_prop_80.cc', |
| 183 'src/internal/cld_generated_score_quad_octa_0122_2.cc', |
| 184 'src/internal/generated_distinct_bi_0.cc', |
| 185 ], |
| 186 'conditions': [ |
| 187 ['cld2_table_size==0', { |
| 188 # Small table sizes |
| 189 'sources+': [ |
| 190 'src/internal/cld2_generated_quadchrome0122_16.cc', |
| 191 ], |
| 192 }], |
| 193 ['cld2_table_size==1', { |
| 194 # Medium table sizes |
| 195 'sources+': [ |
| 196 'src/internal/cld2_generated_quadchrome0122_19.cc', |
| 197 ], |
| 198 }], |
| 199 ['cld2_table_size==2', { |
| 200 # Large table sizes |
| 201 'sources+': [ |
| 202 'src/internal/cld2_generated_quadchrome0122_2.cc', |
| 203 ], |
| 204 }], |
| 205 ], |
| 206 }, |
| 207 ], |
| 208 ], |
| 209 }, |
99 ], | 210 ], |
100 } | 211 } |
OLD | NEW |