Fix issues caused due to GitMigration.
[chromium-blink-merge.git] / third_party / snappy / BUILD.gn
blob705cb8aa2b8d7ffea3714220a5cfc7f6b04f048e
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
3 # found in the LICENSE file.
5 config("snappy_config") {
6   include_dirs = [
7     "src",
8   ]
10   # These OS-specific generated headers were made by running the configure
11   # script offline.
12   if (is_win) {
13     include_dirs += [ "win32" ]
14   } else if (is_mac) {
15     include_dirs += [ "mac" ]
16   } else {
17     include_dirs += [ "linux" ]
18   }
21 static_library("snappy") {
22   sources = [
23     "src/snappy-internal.h",
24     "src/snappy-sinksource.cc",
25     "src/snappy-sinksource.h",
26     "src/snappy-stubs-internal.cc",
27     "src/snappy-stubs-internal.h",
28     "src/snappy.cc",
29     "src/snappy.h",
30   ]
32   configs -= [ "//build/config/compiler:chromium_code" ]
33   configs += [ "//build/config/compiler:no_chromium_code" ]
34   direct_dependent_configs = [ ":snappy_config" ]
36   if (is_clang) {
37     # snappy-stubs-internal.h unapologetically has: using namespace std
38     # https://code.google.com/p/snappy/issues/detail?id=70
39     configs -= [ "//build/config/clang:extra_warnings" ]
40   }
42   if (is_win) {
43     # https://code.google.com/p/snappy/issues/detail?id=75
44     cflags = [ "/wd4267" ]  # Conversion from size_t to 'type'.
45   }