Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: third_party/ced/BUILD.gn

Issue 2168003003: Replace ICU encoding detection with CED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments/add datafiles back Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 6
7 config("ced_config") { 7 config("ced_config") {
8 include_dirs = [ "src" ] 8 include_dirs = [ "src" ]
9 if (is_clang) { 9 if (is_clang) {
10 cflags = [ "-Wno-unused-function" ] 10 cflags = [ "-Wno-unused-function" ]
11 } 11 }
12 } 12 }
13 13
14 static_library("ced") { 14 static_library("ced") {
15 sources = [ 15 sources = [
16 # find src -maxdepth 3 ! -type d | egrep '\.(h|cc)$' | grep -v test.cc |\
17 # LC_COLLATE=c sort | sed 's/^\(.*\)$/ "\1",/'
16 "src/compact_enc_det/compact_enc_det.cc", 18 "src/compact_enc_det/compact_enc_det.cc",
17 "src/compact_enc_det/compact_enc_det.h",
18 "src/compact_enc_det/compact_enc_det_generated_tables.h", 19 "src/compact_enc_det/compact_enc_det_generated_tables.h",
19 "src/compact_enc_det/compact_enc_det_generated_tables2.h", 20 "src/compact_enc_det/compact_enc_det_generated_tables2.h",
20 "src/compact_enc_det/compact_enc_det_hint_code.cc", 21 "src/compact_enc_det/compact_enc_det_hint_code.cc",
21 "src/compact_enc_det/compact_enc_det_hint_code.h", 22 "src/compact_enc_det/compact_enc_det_hint_code.h",
22 "src/util/basictypes.h", 23 "src/util/basictypes.h",
23 "src/util/build_config.h", 24 "src/util/case_insensitive_hash.h",
24 "src/util/commandlineflags.h", 25 "src/util/commandlineflags.h",
25 "src/util/encodings/encodings.cc", 26 "src/util/encodings/encodings.cc",
26 "src/util/encodings/encodings.h", 27 "src/util/encodings/encodings.h",
27 "src/util/encodings/encodings.pb.h", 28 "src/util/encodings/encodings.pb.h",
28 "src/util/languages/languages.cc", 29 "src/util/languages/languages.cc",
29 "src/util/languages/languages.h", 30 "src/util/languages/languages.h",
30 "src/util/languages/languages.pb.h", 31 "src/util/languages/languages.pb.h",
31 "src/util/logging.h", 32 "src/util/logging.h",
32 "src/util/port.h", 33 "src/util/port.h",
33 "src/util/string_util.h", 34 "src/util/string_util.h",
34 "src/util/varsetter.h", 35 "src/util/varsetter.h",
35 ] 36 ]
36 37 public = [
38 "src/compact_enc_det/compact_enc_det.h",
39 ]
37 configs -= [ "//build/config/compiler:chromium_code" ] 40 configs -= [ "//build/config/compiler:chromium_code" ]
38 configs += [ "//build/config/compiler:no_chromium_code" ] 41 configs += [ "//build/config/compiler:no_chromium_code" ]
39 42
40 public_configs = [ ":ced_config" ] 43 public_configs = [ ":ced_config" ]
41 44
42 if (is_win) { 45 if (is_win) {
43 defines = [ "COMPILER_MSVC" ] 46 defines = [ "COMPILER_MSVC" ]
44 cflags = [ 47 cflags = [
45 "/wd4005", # Macro defined twice. 48 "/wd4005", # Macro defined twice.
46 "/wd4006", # #undef expected an identifier. 49 "/wd4006", # #undef expected an identifier.
47 "/wd4018", # '<': signed/unsigned mismatch 50 "/wd4018", # '<': signed/unsigned mismatch
48 "/wd4309", # Truncation of constant value. 51 "/wd4309", # Truncation of constant value.
49 ] 52 ]
50 } else { 53 } else {
51 defines = [ "COMPILER_GCC" ] 54 defines = [ "COMPILER_GCC" ]
52 } 55 }
53 } 56 }
54 57
55 test("ced_unittests") { 58 test("ced_unittests") {
56 sources = [ 59 sources = [
57 "src/compact_enc_det/compact_enc_det_fuzz_test.cc", 60 "src/compact_enc_det/compact_enc_det_fuzz_test.cc",
58 "src/compact_enc_det/compact_enc_det_unittest.cc", 61 "src/compact_enc_det/compact_enc_det_unittest.cc",
59 "src/compact_enc_det/detail_head_string.inc", 62 "src/compact_enc_det/detail_head_string.inc",
63 "src/util/encodings/encodings_unittest.cc",
60 ] 64 ]
61 65
62 if (is_win) { 66 if (is_win) {
63 defines = [ "COMPILER_MSVC" ] 67 defines = [ "COMPILER_MSVC" ]
64 cflags = [ 68 cflags = [
65 "/wd4310", # Truncation of constant value. 69 "/wd4310", # Truncation of constant value.
66 "/wd4267", # size_t -> int 70 "/wd4267", # size_t -> int
67 ] 71 ]
68 } else { 72 } else {
69 defines = [ "COMPILER_GCC" ] 73 defines = [ "COMPILER_GCC" ]
70 } 74 }
71 75
72 deps = [ 76 deps = [
73 ":ced", 77 ":ced",
74 "//testing/gtest", 78 "//testing/gtest",
75 "//testing/gtest:gtest_main", 79 "//testing/gtest:gtest_main",
76 ] 80 ]
77 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698