OLD | NEW |
| (Empty) |
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. | |
4 | |
5 # MAINTAINERS: | |
6 # See the BUILD.gn file for more extensive comments and documentation. This | |
7 # .gyp file exists only for compatibility with gyp. The variables defined below | |
8 # are used in equivalent targets in BUILD.GN. | |
9 | |
10 { | |
11 'variables': { | |
12 # These sources need to be included in both static and dynamic builds as | |
13 # well as the dynamic data tool. | |
14 'cld2_core_sources': [ | |
15 'src/internal/cld2tablesummary.h', | |
16 'src/internal/cldutil.h', | |
17 'src/internal/cldutil_shared.h', | |
18 'src/internal/compact_lang_det_hint_code.h', | |
19 'src/internal/compact_lang_det_impl.h', | |
20 'src/internal/debug.h', | |
21 'src/internal/fixunicodevalue.h', | |
22 'src/internal/generated_language.h', | |
23 'src/internal/generated_ulscript.h', | |
24 'src/internal/getonescriptspan.h', | |
25 'src/internal/integral_types.h', | |
26 'src/internal/lang_script.h', | |
27 'src/internal/langspan.h', | |
28 'src/internal/offsetmap.h', | |
29 'src/internal/port.h', | |
30 'src/internal/scoreonescriptspan.h', | |
31 'src/internal/stringpiece.h', | |
32 'src/internal/tote.h', | |
33 'src/internal/utf8prop_lettermarkscriptnum.h', | |
34 'src/internal/utf8repl_lettermarklower.h', | |
35 'src/internal/utf8scannot_lettermarkspecial.h', | |
36 'src/internal/utf8statetable.h', | |
37 'src/public/compact_lang_det.h', | |
38 'src/public/encodings.h', | |
39 ], | |
40 | |
41 # These sources may have different compilation results based on flags. | |
42 'cld2_core_impl_sources': [ | |
43 'src/internal/cldutil.cc', | |
44 'src/internal/cldutil_shared.cc', | |
45 'src/internal/compact_lang_det.cc', | |
46 'src/internal/compact_lang_det_hint_code.cc', | |
47 'src/internal/compact_lang_det_impl.cc', | |
48 'src/internal/debug_empty.cc', | |
49 'src/internal/fixunicodevalue.cc', | |
50 'src/internal/generated_entities.cc', | |
51 'src/internal/generated_language.cc', | |
52 'src/internal/generated_ulscript.cc', | |
53 'src/internal/getonescriptspan.cc', | |
54 'src/internal/lang_script.cc', | |
55 'src/internal/offsetmap.cc', | |
56 'src/internal/scoreonescriptspan.cc', | |
57 'src/internal/tote.cc', | |
58 'src/internal/utf8statetable.cc', | |
59 ], | |
60 | |
61 # These sources are for both small-table and large-table data sets. | |
62 'cld2_data_sources': [ | |
63 'src/internal/cld2_generated_cjk_compatible.cc', | |
64 'src/internal/cld2_generated_deltaoctachrome.cc', | |
65 'src/internal/cld2_generated_distinctoctachrome.cc', | |
66 'src/internal/cld_generated_cjk_delta_bi_4.cc', | |
67 'src/internal/cld_generated_cjk_uni_prop_80.cc', | |
68 'src/internal/cld_generated_score_quad_octa_2.cc', | |
69 'src/internal/generated_distinct_bi_0.cc', | |
70 ], | |
71 | |
72 # Used when cld2_table_size == 0 (small tables) | |
73 # See 'cld2_table_size' in build/common.gypi for more information. | |
74 'cld2_data_smallest_sources': [ | |
75 'src/internal/cld2_generated_quadchrome_16.cc' | |
76 ], | |
77 | |
78 # Used when cld2_table_size == 2 (large tables) | |
79 # See 'cld2_table_size' in build/common.gypi for more information. | |
80 'cld2_data_largest_sources': [ | |
81 'src/internal/cld2_generated_quadchrome_2.cc' | |
82 ], | |
83 }, | |
84 | |
85 'targets': [ | |
86 { | |
87 # GN version: //third_party/cld_2 | |
88 'target_name': 'cld_2', | |
89 'type': 'static_library', | |
90 'include_dirs': [ | |
91 'src/internal', | |
92 'src/public', | |
93 ], | |
94 'sources': [ | |
95 '<@(cld2_core_sources)', | |
96 '<@(cld2_core_impl_sources)', | |
97 '<@(cld2_data_sources)', | |
98 ], | |
99 'conditions': [ | |
100 ['OS=="win"', { | |
101 'msvs_disabled_warnings': [4267], # size_t -> int conversion. | |
102 }], | |
103 ['cld2_table_size==0', { | |
104 'sources+': ['<@(cld2_data_smallest_sources)'] | |
105 }], | |
106 ['cld2_table_size==2', { | |
107 'sources+': ['<@(cld2_data_largest_sources)'] | |
108 }], | |
109 ], | |
110 'variables': { | |
111 'clang_warning_flags': [ | |
112 # The generated files don't have braces around subobject initializers. | |
113 '-Wno-missing-braces', | |
114 # cld_2 contains unused private fields, | |
115 # https://code.google.com/p/cld2/issues/detail?id=37 | |
116 '-Wno-unused-private-field', | |
117 ], | |
118 }, | |
119 }, | |
120 ], | |
121 } | |
OLD | NEW |