OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import("//testing/test.gni") |
| 6 |
| 7 config("ced_config") { |
| 8 include_dirs = [ "src" ] |
| 9 if (is_clang) { |
| 10 cflags = [ "-Wno-unused-function" ] |
| 11 } |
| 12 } |
| 13 |
| 14 source_set("ced") { |
| 15 sources = [ |
| 16 "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_tables2.h", |
| 20 "src/compact_enc_det/compact_enc_det_hint_code.cc", |
| 21 "src/compact_enc_det/compact_enc_det_hint_code.h", |
| 22 "src/util/basictypes.h", |
| 23 "src/util/build_config.h", |
| 24 "src/util/commandlineflags.h", |
| 25 "src/util/encodings/encodings.cc", |
| 26 "src/util/encodings/encodings.h", |
| 27 "src/util/encodings/encodings.pb.h", |
| 28 "src/util/languages/languages.cc", |
| 29 "src/util/languages/languages.h", |
| 30 "src/util/languages/languages.pb.h", |
| 31 "src/util/logging.h", |
| 32 "src/util/port.h", |
| 33 "src/util/string_util.h", |
| 34 "src/util/varsetter.h", |
| 35 ] |
| 36 |
| 37 configs -= [ "//build/config/compiler:chromium_code" ] |
| 38 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 39 |
| 40 public_configs = [ ":ced_config" ] |
| 41 |
| 42 if (is_win) { |
| 43 defines = [ "COMPILER_MSVC" ] |
| 44 cflags = [ |
| 45 "/wd4005", # Macro defined twice. |
| 46 "/wd4006", # #undef expected an identifier. |
| 47 "/wd4309", # Truncation of constant value. |
| 48 ] |
| 49 } else { |
| 50 defines = [ "COMPILER_GCC" ] |
| 51 } |
| 52 } |
| 53 |
| 54 test("ced_unittests") { |
| 55 sources = [ |
| 56 "src/compact_enc_det/compact_enc_det_fuzz_test.cc", |
| 57 "src/compact_enc_det/compact_enc_det_unittest.cc", |
| 58 "src/compact_enc_det/detail_head_string.inc", |
| 59 ] |
| 60 |
| 61 if (is_win) { |
| 62 defines = [ "COMPILER_MSVC" ] |
| 63 cflags = [ |
| 64 "/wd4310", # Truncation of constant value. |
| 65 "/wd4267", # size_t -> int |
| 66 ] |
| 67 } else { |
| 68 defines = [ "COMPILER_GCC" ] |
| 69 } |
| 70 |
| 71 deps = [ |
| 72 ":ced", |
| 73 "//testing/gtest", |
| 74 "//testing/gtest:gtest_main", |
| 75 ] |
| 76 } |
OLD | NEW |