Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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") | |
| 6 | |
| 5 config("snappy_config") { | 7 config("snappy_config") { |
| 6 include_dirs = [ "src" ] | 8 include_dirs = [ "src" ] |
| 7 | 9 |
| 8 # These OS-specific generated headers were made by running the configure | 10 # These OS-specific generated headers were made by running the configure |
| 9 # script offline. | 11 # script offline. |
| 10 if (is_win) { | 12 if (is_win) { |
| 11 include_dirs += [ "win32" ] | 13 include_dirs += [ "win32" ] |
| 12 } else if (is_mac) { | 14 } else if (is_mac) { |
| 13 include_dirs += [ "mac" ] | 15 include_dirs += [ "mac" ] |
| 14 } else { | 16 } else { |
| 15 include_dirs += [ "linux" ] | 17 include_dirs += [ "linux" ] |
| 16 } | 18 } |
| 17 } | 19 } |
| 18 | 20 |
| 19 config("snappy_warnings") { | 21 config("snappy_warnings") { |
| 20 if (is_clang) { | 22 if (is_clang) { |
| 21 # ComputeTable is unused, | 23 # ComputeTable is unused, |
| 22 # https://code.google.com/p/snappy/issues/detail?id=96 | 24 # https://code.google.com/p/snappy/issues/detail?id=96 |
| 23 cflags = [ "-Wno-unused-function" ] | 25 cflags = [ "-Wno-unused-function" ] |
| 24 } | 26 } |
| 27 | |
| 28 if (is_win) { | |
| 29 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. | |
|
jsbell
2017/03/10 15:57:36
+= ?
pwnall
2017/03/10 18:03:11
Done!
Thank you! Durr durr
| |
| 30 } | |
| 25 } | 31 } |
| 26 | 32 |
| 27 static_library("snappy") { | 33 static_library("snappy") { |
| 28 sources = [ | 34 sources = [ |
| 29 "src/snappy-internal.h", | 35 "src/snappy-internal.h", |
| 30 "src/snappy-sinksource.cc", | 36 "src/snappy-sinksource.cc", |
| 31 "src/snappy-sinksource.h", | 37 "src/snappy-sinksource.h", |
| 32 "src/snappy-stubs-internal.cc", | 38 "src/snappy-stubs-internal.cc", |
| 33 "src/snappy-stubs-internal.h", | 39 "src/snappy-stubs-internal.h", |
| 34 "src/snappy.cc", | 40 "src/snappy.cc", |
| 35 "src/snappy.h", | 41 "src/snappy.h", |
| 36 ] | 42 ] |
| 37 | 43 |
| 38 configs -= [ "//build/config/compiler:chromium_code" ] | 44 configs -= [ "//build/config/compiler:chromium_code" ] |
| 39 configs += [ | 45 configs += [ |
| 40 "//build/config/compiler:no_chromium_code", | 46 "//build/config/compiler:no_chromium_code", |
| 41 | 47 |
| 42 # Must be after no_chromium_code for warning flags to be ordered correctly. | 48 # Must be after no_chromium_code for warning flags to be ordered correctly. |
| 43 ":snappy_warnings", | 49 ":snappy_warnings", |
| 44 ] | 50 ] |
| 45 public_configs = [ ":snappy_config" ] | 51 public_configs = [ ":snappy_config" ] |
| 46 | 52 |
| 47 if (is_win) { | 53 # Chromium doesn't use automake, but we generated config.h offline for all the |
| 48 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. | 54 # platforms that we build for. |
| 49 } | 55 defines = [ "HAVE_CONFIG_H" ] |
| 50 | 56 |
| 51 if (is_clang) { | 57 if (is_clang) { |
| 52 # snappy-stubs-internal.h unapologetically has: using namespace std | 58 # snappy-stubs-internal.h unapologetically has: using namespace std |
| 53 # https://code.google.com/p/snappy/issues/detail?id=70 | 59 # https://code.google.com/p/snappy/issues/detail?id=70 |
| 54 configs -= [ "//build/config/clang:extra_warnings" ] | 60 configs -= [ "//build/config/clang:extra_warnings" ] |
| 55 } | 61 } |
| 56 } | 62 } |
| OLD | NEW |