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 config("snappy_config") { | 5 config("snappy_config") { |
6 include_dirs = [ | 6 include_dirs = [ |
7 "src", | 7 "src", |
8 ] | 8 ] |
9 | 9 |
10 # These OS-specific generated headers were made by running the configure | 10 # These OS-specific generated headers were made by running the configure |
11 # script offline. | 11 # script offline. |
12 if (is_win) { | 12 if (is_win) { |
13 include_dirs += "win32" | 13 include_dirs += [ "win32" ] |
14 } else if (is_mac) { | 14 } else if (is_mac) { |
15 include_dirs += "mac" | 15 include_dirs += [ "mac" ] |
16 } else { | 16 } else { |
17 include_dirs += "linux" | 17 include_dirs += [ "linux" ] |
18 } | 18 } |
19 } | 19 } |
20 | 20 |
21 static_library("snappy") { | 21 static_library("snappy") { |
22 sources = [ | 22 sources = [ |
23 "src/snappy-internal.h", | 23 "src/snappy-internal.h", |
24 "src/snappy-sinksource.cc", | 24 "src/snappy-sinksource.cc", |
25 "src/snappy-sinksource.h", | 25 "src/snappy-sinksource.h", |
26 "src/snappy-stubs-internal.cc", | 26 "src/snappy-stubs-internal.cc", |
27 "src/snappy-stubs-internal.h", | 27 "src/snappy-stubs-internal.h", |
28 "src/snappy.cc", | 28 "src/snappy.cc", |
29 "src/snappy.h", | 29 "src/snappy.h", |
30 ] | 30 ] |
31 | 31 |
32 configs -= "//build/config/compiler:chromium_code" | 32 configs -= [ "//build/config/compiler:chromium_code" ] |
33 configs += "//build/config/compiler:no_chromium_code" | 33 configs += [ "//build/config/compiler:no_chromium_code" ] |
34 direct_dependent_configs = [ ":snappy_config" ] | 34 direct_dependent_configs = [ ":snappy_config" ] |
35 | 35 |
36 #['OS=="win"', { | 36 #['OS=="win"', { |
37 # # Signed/unsigned comparison | 37 # # Signed/unsigned comparison |
38 # 'msvs_disabled_warnings': [ | 38 # 'msvs_disabled_warnings': [ |
39 # # https://code.google.com/p/snappy/issues/detail?id=71 | 39 # # https://code.google.com/p/snappy/issues/detail?id=71 |
40 # 4018, | 40 # 4018, |
41 # # https://code.google.com/p/snappy/issues/detail?id=75 | 41 # # https://code.google.com/p/snappy/issues/detail?id=75 |
42 # 4267, | 42 # 4267, |
43 # ], | 43 # ], |
44 # }], | 44 # }], |
45 # ['clang == 1', { | 45 # ['clang == 1', { |
46 # # snappy-stubs-internal.h unapologetically has: using namespace std | 46 # # snappy-stubs-internal.h unapologetically has: using namespace std |
47 # # https://code.google.com/p/snappy/issues/detail?id=70 | 47 # # https://code.google.com/p/snappy/issues/detail?id=70 |
48 # 'xcode_settings': { | 48 # 'xcode_settings': { |
49 # 'WARNING_CFLAGS!': [ '-Wheader-hygiene' ], | 49 # 'WARNING_CFLAGS!': [ '-Wheader-hygiene' ], |
50 # }, | 50 # }, |
51 # 'cflags!': [ '-Wheader-hygiene' ], | 51 # 'cflags!': [ '-Wheader-hygiene' ], |
52 # }], | 52 # }], |
53 # ], | 53 # ], |
54 } | 54 } |
55 | 55 |
56 test("snappy_unittest") { | 56 test("snappy_unittest") { |
57 sources = [ | 57 sources = [ |
58 "src/snappy-test.cc", | 58 "src/snappy-test.cc", |
59 "src/snappy-test.h", | 59 "src/snappy-test.h", |
60 "src/snappy_unittest.cc", | 60 "src/snappy_unittest.cc", |
61 ] | 61 ] |
62 | 62 |
63 configs -= "//build/config/compiler:chromium_code" | 63 configs -= [ "//build/config/compiler:chromium_code" ] |
64 configs += "//build/config/compiler:no_chromium_code" | 64 configs += [ "//build/config/compiler:no_chromium_code" ] |
65 | 65 |
66 deps = [ | 66 deps = [ |
67 ":snappy", | 67 ":snappy", |
68 "//base", | 68 "//base", |
69 "//testing/gtest", | 69 "//testing/gtest", |
70 "//third_party/zlib", | 70 "//third_party/zlib", |
71 ] | 71 ] |
72 } | 72 } |
OLD | NEW |