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

Side by Side Diff: sdch/BUILD.gn

Issue 1318823008: Un-nest configs in GN files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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("sdch_config") { 5 config("sdch_config") {
6 include_dirs = [ "open-vcdiff/src" ] 6 include_dirs = [ "open-vcdiff/src" ]
7 } 7 }
8 8
9 # gn orders flags on a target before flags from configs. The default config
10 # adds -Wall, and these flags have to be after -Wall -- so they need to come
11 # from a config and can't be on the target directly.
12 config("sdch_warnings") {
13 cflags = []
14 if (is_linux) {
15 # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
16 cflags += [ "-Wno-deprecated-declarations" ]
17 }
18 }
19
9 static_library("sdch") { 20 static_library("sdch") {
10 sources = [ 21 sources = [
11 "logging_forward.h", 22 "logging_forward.h",
12 "open-vcdiff/src/addrcache.cc", 23 "open-vcdiff/src/addrcache.cc",
13 "open-vcdiff/src/blockhash.cc", 24 "open-vcdiff/src/blockhash.cc",
14 "open-vcdiff/src/blockhash.h", 25 "open-vcdiff/src/blockhash.h",
15 "open-vcdiff/src/checksum.h", 26 "open-vcdiff/src/checksum.h",
16 "open-vcdiff/src/codetable.cc", 27 "open-vcdiff/src/codetable.cc",
17 "open-vcdiff/src/codetable.h", 28 "open-vcdiff/src/codetable.h",
18 "open-vcdiff/src/compile_assert.h", 29 "open-vcdiff/src/compile_assert.h",
(...skipping 16 matching lines...) Expand all
35 "open-vcdiff/src/varint_bigendian.h", 46 "open-vcdiff/src/varint_bigendian.h",
36 "open-vcdiff/src/vcdecoder.cc", 47 "open-vcdiff/src/vcdecoder.cc",
37 "open-vcdiff/src/vcdiff_defs.h", 48 "open-vcdiff/src/vcdiff_defs.h",
38 "open-vcdiff/src/vcdiffengine.cc", 49 "open-vcdiff/src/vcdiffengine.cc",
39 "open-vcdiff/src/vcdiffengine.h", 50 "open-vcdiff/src/vcdiffengine.h",
40 "open-vcdiff/src/vcencoder.cc", 51 "open-vcdiff/src/vcencoder.cc",
41 "open-vcdiff/vsprojects/config.h", 52 "open-vcdiff/vsprojects/config.h",
42 "open-vcdiff/vsprojects/stdint.h", 53 "open-vcdiff/vsprojects/stdint.h",
43 ] 54 ]
44 55
56 configs += [ ":sdch_warnings" ]
45 public_configs = [ ":sdch_config" ] 57 public_configs = [ ":sdch_config" ]
46 58
47 deps = [ 59 deps = [
48 "//base", 60 "//base",
49 "//third_party/zlib", 61 "//third_party/zlib",
50 ] 62 ]
51 63
52 # gn orders flags on a target before flags from configs. The default config
53 # adds -Wall, and these flags have to be after -Wall -- so they need to come
54 # from a config and can't be on the target directly.
55 config("sdch_warnings") {
56 cflags = []
57 if (is_linux) {
58 # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
59 cflags += [ "-Wno-deprecated-declarations" ]
60 }
61 }
62 configs += [ ":sdch_warnings" ]
63
64 if (is_linux || is_android) { 64 if (is_linux || is_android) {
65 include_dirs = [ "linux" ] 65 include_dirs = [ "linux" ]
66 } else if (is_ios) { 66 } else if (is_ios) {
67 include_dirs = [ "ios" ] 67 include_dirs = [ "ios" ]
68 } else if (is_mac) { 68 } else if (is_mac) {
69 include_dirs = [ "mac" ] 69 include_dirs = [ "mac" ]
70 defines = [ "OPEN_VCDIFF_USE_AUTO_PTR" ] 70 defines = [ "OPEN_VCDIFF_USE_AUTO_PTR" ]
71 } else if (is_win) { 71 } else if (is_win) {
72 include_dirs = [ "win" ] 72 include_dirs = [ "win" ]
73 } 73 }
(...skipping 11 matching lines...) Expand all
85 "sdch/logging_forward.h", 85 "sdch/logging_forward.h",
86 ] 86 ]
87 } else { 87 } else {
88 logging_file = rebase_path("logging_forward.h", root_build_dir) 88 logging_file = rebase_path("logging_forward.h", root_build_dir)
89 cflags = [ 89 cflags = [
90 "-include", 90 "-include",
91 logging_file, 91 logging_file,
92 ] 92 ]
93 } 93 }
94 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698