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
3 # found in the LICENSE file.
5 # Note to maintainers: In the January 2014 release (*_0122*), there are some
6 # options for building:
7 # Pick one quadgram file (cld2_generated_quadchrome*.cc):
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)
10 # 0122_2 = 256K entries, largest size, highest accuracy (set cld2_table_size=2)
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.
14 # The _32 variant of the file is intended for applications that use the full
15 # 175-language version of CLD2.
20 # GN version: //third_party/cld_2:cld_2_dynamic_data_tool
21 'target_name': 'cld_2_dynamic_data_tool',
28 # Note: sources list duplicated in GN build.
29 'src/internal/cld2_dynamic_data.h',
30 'src/internal/cld2_dynamic_data.cc',
31 'src/internal/cld2_dynamic_data_extractor.h',
32 'src/internal/cld2_dynamic_data_extractor.cc',
33 'src/internal/cld2_dynamic_data_loader.h',
34 'src/internal/cld2_dynamic_data_loader.cc',
35 'src/internal/cld2_dynamic_data_tool.cc',
36 'src/internal/cld2_generated_cjk_compatible.cc',
37 'src/internal/cld2_generated_deltaoctachrome0122.cc',
38 'src/internal/cld2_generated_distinctoctachrome0122.cc',
39 'src/internal/cld2tablesummary.h',
40 'src/internal/cld_generated_cjk_delta_bi_4.cc',
41 'src/internal/cld_generated_cjk_uni_prop_80.cc',
42 'src/internal/cld_generated_score_quad_octa_0122_2.cc',
43 'src/internal/cldutil.cc',
44 'src/internal/cldutil.h',
45 'src/internal/cldutil_shared.cc',
46 'src/internal/cldutil_shared.h',
47 'src/internal/compact_lang_det.cc',
48 'src/internal/compact_lang_det_hint_code.cc',
49 'src/internal/compact_lang_det_hint_code.h',
50 'src/internal/compact_lang_det_impl.cc',
51 'src/internal/compact_lang_det_impl.h',
52 'src/internal/debug.h',
53 'src/internal/debug_empty.cc',
54 'src/internal/fixunicodevalue.cc',
55 'src/internal/fixunicodevalue.h',
56 'src/internal/generated_distinct_bi_0.cc',
57 'src/internal/generated_entities.cc',
58 'src/internal/generated_language.cc',
59 'src/internal/generated_language.h',
60 'src/internal/generated_ulscript.cc',
61 'src/internal/generated_ulscript.h',
62 'src/internal/getonescriptspan.cc',
63 'src/internal/getonescriptspan.h',
64 'src/internal/integral_types.h',
65 'src/internal/lang_script.cc',
66 'src/internal/lang_script.h',
67 'src/internal/langspan.h',
68 'src/internal/offsetmap.cc',
69 'src/internal/offsetmap.h',
70 'src/internal/port.h',
71 'src/internal/scoreonescriptspan.cc',
72 'src/internal/scoreonescriptspan.h',
73 'src/internal/stringpiece.h',
74 'src/internal/tote.cc',
75 'src/internal/tote.h',
76 'src/internal/utf8prop_lettermarkscriptnum.h',
77 'src/internal/utf8repl_lettermarklower.h',
78 'src/internal/utf8scannot_lettermarkspecial.h',
79 'src/internal/utf8statetable.cc',
80 'src/internal/utf8statetable.h',
81 'src/public/compact_lang_det.h',
82 'src/public/encodings.h',
86 'msvs_disabled_warnings': [4267],
88 ['cld2_table_size==0', {
91 'src/internal/cld2_generated_quadchrome0122_16.cc',
94 ['cld2_table_size==1', {
97 'src/internal/cld2_generated_quadchrome0122_19.cc',
100 ['cld2_table_size==2', {
103 'src/internal/cld2_generated_quadchrome0122_2.cc',
109 # GN version: //third_party/cld_2
110 'target_name': 'cld_2',
111 'type': 'static_library',
117 # Note: sources list duplicated in GN build.
118 'src/internal/cld2tablesummary.h',
119 'src/internal/cldutil.cc',
120 'src/internal/cldutil.h',
121 'src/internal/cldutil_shared.cc',
122 'src/internal/cldutil_shared.h',
123 'src/internal/compact_lang_det.cc',
124 'src/internal/compact_lang_det_hint_code.cc',
125 'src/internal/compact_lang_det_hint_code.h',
126 'src/internal/compact_lang_det_impl.cc',
127 'src/internal/compact_lang_det_impl.h',
128 'src/internal/debug.h',
129 'src/internal/debug_empty.cc',
130 'src/internal/fixunicodevalue.cc',
131 'src/internal/fixunicodevalue.h',
132 'src/internal/generated_distinct_bi_0.cc',
133 'src/internal/generated_entities.cc',
134 'src/internal/generated_language.cc',
135 'src/internal/generated_language.h',
136 'src/internal/generated_ulscript.cc',
137 'src/internal/generated_ulscript.h',
138 'src/internal/getonescriptspan.cc',
139 'src/internal/getonescriptspan.h',
140 'src/internal/integral_types.h',
141 'src/internal/lang_script.cc',
142 'src/internal/lang_script.h',
143 'src/internal/langspan.h',
144 'src/internal/offsetmap.cc',
145 'src/internal/offsetmap.h',
146 'src/internal/port.h',
147 'src/internal/scoreonescriptspan.cc',
148 'src/internal/scoreonescriptspan.h',
149 'src/internal/stringpiece.h',
150 'src/internal/tote.cc',
151 'src/internal/tote.h',
152 'src/internal/utf8prop_lettermarkscriptnum.h',
153 'src/internal/utf8repl_lettermarklower.h',
154 'src/internal/utf8scannot_lettermarkspecial.h',
155 'src/internal/utf8statetable.cc',
156 'src/internal/utf8statetable.h',
157 'src/public/compact_lang_det.h',
158 'src/public/encodings.h',
162 'msvs_disabled_warnings': [4267],
164 # Dynamic or vanilla mode
165 ['cld2_data_source!="static"',
167 # Enable dynamic mode, which allows CLD to read its data from a file
168 # instead of requiring the data to be linked into the library.
169 # You must generate the data file and check it in using the
170 # cld2_dynamic_data_tool.
171 # build/common.gypi takes care of setting -D CLD2_MODE_DYNAMIC
173 'src/internal/cld2_dynamic_data.h',
174 'src/internal/cld2_dynamic_data.cc',
175 'src/internal/cld2_dynamic_data_loader.h',
176 'src/internal/cld2_dynamic_data_loader.cc',
180 # Else it's regular mode, so link in all the data blobs directly.
182 'src/internal/cld2_generated_cjk_compatible.cc',
183 'src/internal/cld2_generated_deltaoctachrome0122.cc',
184 'src/internal/cld2_generated_distinctoctachrome0122.cc',
185 'src/internal/cld_generated_cjk_delta_bi_4.cc',
186 'src/internal/cld_generated_cjk_uni_prop_80.cc',
187 'src/internal/cld_generated_score_quad_octa_0122_2.cc',
188 'src/internal/generated_distinct_bi_0.cc',
191 ['cld2_table_size==0', {
194 'src/internal/cld2_generated_quadchrome0122_16.cc',
197 ['cld2_table_size==1', {
200 'src/internal/cld2_generated_quadchrome0122_19.cc',
203 ['cld2_table_size==2', {
206 'src/internal/cld2_generated_quadchrome0122_2.cc',