OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("//third_party/protobuf/proto_library.gni") | 6 import("//third_party/protobuf/proto_library.gni") |
7 | 7 |
8 proto_library("proto") { | 8 proto_library("proto") { |
9 sources = [ | 9 sources = [ |
10 "dist/resources/phonemetadata.proto", | 10 "dist/resources/phonemetadata.proto", |
11 "dist/resources/phonenumber.proto", | 11 "dist/resources/phonenumber.proto", |
12 ] | 12 ] |
13 proto_out_dir = "third_party/libphonenumber/phonenumbers" | 13 proto_out_dir = "third_party/libphonenumber/phonenumbers" |
14 } | 14 } |
15 | 15 |
16 config("libphonenumber_config") { | 16 config("libphonenumber_config") { |
17 include_dirs = [ | 17 include_dirs = [ |
18 "dist/cpp/src", | 18 "dist/cpp/src", |
19 "$root_gen_dir/third_party/libphonenumber", | 19 "$root_gen_dir/third_party/libphonenumber", |
20 ] | 20 ] |
21 defines = [ "I18N_PHONENUMBERS_USE_ICU_REGEXP=1" ] | 21 defines = [ |
| 22 "I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS=1", |
| 23 "I18N_PHONENUMBERS_USE_ICU_REGEXP=1", |
| 24 ] |
22 if (!is_android) { | 25 if (!is_android) { |
23 defines += [ "I18N_PHONENUMBERS_NO_THREAD_SAFETY=1" ] | 26 defines += [ "I18N_PHONENUMBERS_NO_THREAD_SAFETY=1" ] |
24 } | 27 } |
25 } | 28 } |
26 | 29 |
27 config("libphonenumber_config_internal") { | 30 config("libphonenumber_config_internal") { |
28 if (is_clang) { | 31 if (is_clang) { |
29 cflags = [ | 32 cflags = [ |
30 # https://github.com/googlei18n/libphonenumber/pull/741 | 33 # https://github.com/googlei18n/libphonenumber/pull/741 |
31 "-Wno-unused-private-field", | 34 "-Wno-unused-private-field", |
32 ] | 35 ] |
33 } | 36 } |
34 } | 37 } |
35 | 38 |
36 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_with
out_metadata | 39 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_with
out_metadata |
37 static_library("libphonenumber_without_metadata") { | 40 static_library("libphonenumber_without_metadata") { |
38 sources = [ | 41 sources = [ |
| 42 "dist/cpp/src/phonenumbers/alternate_format.cc", |
39 "dist/cpp/src/phonenumbers/asyoutypeformatter.cc", | 43 "dist/cpp/src/phonenumbers/asyoutypeformatter.cc", |
40 "dist/cpp/src/phonenumbers/base/strings/string_piece.cc", | 44 "dist/cpp/src/phonenumbers/base/strings/string_piece.cc", |
41 "dist/cpp/src/phonenumbers/default_logger.cc", | 45 "dist/cpp/src/phonenumbers/default_logger.cc", |
42 "dist/cpp/src/phonenumbers/logger.cc", | 46 "dist/cpp/src/phonenumbers/logger.cc", |
43 "dist/cpp/src/phonenumbers/phonenumber.cc", | 47 "dist/cpp/src/phonenumbers/phonenumber.cc", |
44 "dist/cpp/src/phonenumbers/phonenumbermatch.cc", | 48 "dist/cpp/src/phonenumbers/phonenumbermatch.cc", |
45 "dist/cpp/src/phonenumbers/phonenumbermatcher.cc", | 49 "dist/cpp/src/phonenumbers/phonenumbermatcher.cc", |
46 "dist/cpp/src/phonenumbers/phonenumberutil.cc", | 50 "dist/cpp/src/phonenumbers/phonenumberutil.cc", |
47 "dist/cpp/src/phonenumbers/regexp_adapter_icu.cc", | 51 "dist/cpp/src/phonenumbers/regexp_adapter_icu.cc", |
48 "dist/cpp/src/phonenumbers/regexp_cache.cc", | 52 "dist/cpp/src/phonenumbers/regexp_cache.cc", |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 96 |
93 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unit
tests | 97 # GYP version: third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unit
tests |
94 test("libphonenumber_unittests") { | 98 test("libphonenumber_unittests") { |
95 sources = [ | 99 sources = [ |
96 "dist/cpp/src/phonenumbers/test_metadata.cc", | 100 "dist/cpp/src/phonenumbers/test_metadata.cc", |
97 "dist/cpp/test/phonenumbers/asyoutypeformatter_test.cc", | 101 "dist/cpp/test/phonenumbers/asyoutypeformatter_test.cc", |
98 "dist/cpp/test/phonenumbers/phonenumbermatch_test.cc", | 102 "dist/cpp/test/phonenumbers/phonenumbermatch_test.cc", |
99 "dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc", | 103 "dist/cpp/test/phonenumbers/phonenumbermatcher_test.cc", |
100 "dist/cpp/test/phonenumbers/phonenumberutil_test.cc", | 104 "dist/cpp/test/phonenumbers/phonenumberutil_test.cc", |
101 "dist/cpp/test/phonenumbers/regexp_adapter_test.cc", | 105 "dist/cpp/test/phonenumbers/regexp_adapter_test.cc", |
| 106 "dist/cpp/test/phonenumbers/regexp_cache_test.cc", |
102 "dist/cpp/test/phonenumbers/stringutil_test.cc", | 107 "dist/cpp/test/phonenumbers/stringutil_test.cc", |
103 "dist/cpp/test/phonenumbers/test_util.cc", | 108 "dist/cpp/test/phonenumbers/test_util.cc", |
104 "dist/cpp/test/phonenumbers/unicodestring_test.cc", | 109 "dist/cpp/test/phonenumbers/unicodestring_test.cc", |
| 110 "dist/cpp/test/phonenumbers/utf/unicodetext_test.cc", |
105 ] | 111 ] |
106 | 112 |
107 configs += [ ":libphonenumber_config_internal" ] | 113 configs += [ ":libphonenumber_config_internal" ] |
108 | 114 |
109 include_dirs = [ "dist/cpp/test" ] | 115 include_dirs = [ "dist/cpp/test" ] |
110 | 116 |
| 117 data = [ |
| 118 "dist/resources/test/", |
| 119 ] |
| 120 |
111 deps = [ | 121 deps = [ |
112 ":libphonenumber_without_metadata", | 122 ":libphonenumber_without_metadata", |
113 "//base", | 123 "//base", |
114 "//base/test:run_all_unittests", | 124 "//base/test:run_all_unittests", |
115 "//base/third_party/dynamic_annotations", | 125 "//base/third_party/dynamic_annotations", |
116 "//testing/gmock", | 126 "//testing/gmock", |
117 "//testing/gtest", | 127 "//testing/gtest", |
118 "//third_party/icu", | 128 "//third_party/icu", |
119 ] | 129 ] |
120 } | 130 } |
OLD | NEW |