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

Side by Side Diff: third_party/gflags/BUILD.gn

Issue 1581123002: pull gflags.gyp changes from webrtc (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | third_party/gflags/gflags.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Copyright 2014 The LibYuv Project Authors. All rights reserved. 2 # Copyright 2014 The LibYuv Project Authors. All rights reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 # This is a copy of WebRTC's BUILD.gn. 10 # This is a copy of WebRTC's BUILD.gn.
11 11
12 if (is_win) { 12 if (is_win) {
13 gflags_gen_arch_root = "gen/win" 13 gflags_gen_arch_root = "gen/win"
14 } else { 14 } else {
15 gflags_gen_arch_root = "gen/posix" 15 gflags_gen_arch_root = "gen/posix"
16 } 16 }
17 17
18 config("gflags_config") { 18 config("gflags_config") {
19 include_dirs = [ 19 include_dirs = [
20 "$gflags_gen_arch_root/include", # For configured files. 20 "$gflags_gen_arch_root/include", # For configured files.
21 "src", # For everything else. 21 "src", # For everything else.
22 ] 22 ]
23 23
24 defines = [ 24 defines = [
25 # These macros exist so flags and symbols are properly exported when 25 # These macros exist so flags and symbols are properly exported when
26 # building DLLs. Since we don't build DLLs, we need to disable them. 26 # building DLLs. Since we don't build DLLs, we need to disable them.
27 "GFLAGS_DLL_DECL=", 27 "GFLAGS_DLL_DECL=",
28 "GFLAGS_DLL_DECLARE_FLAG=", 28 "GFLAGS_DLL_DECLARE_FLAG=",
29 "GFLAGS_DLL_DEFINE_FLAG=", 29 "GFLAGS_DLL_DEFINE_FLAG=",
30 ] 30 ]
31
32 # GN orders flags on a target before flags from configs. The default config
33 # adds -Wall, and this flag have to be after -Wall -- so they need to
34 # come from a config and can't be on the target directly.
35 if (is_clang) {
36 cflags = [ "-Wno-unused-local-typedef" ]
37 }
31 } 38 }
32 39
33 source_set("gflags") { 40 source_set("gflags") {
34 sources = [ 41 sources = [
35 "src/gflags.cc", 42 "src/gflags.cc",
36 "src/gflags_completions.cc", 43 "src/gflags_completions.cc",
37 "src/gflags_reporting.cc", 44 "src/gflags_reporting.cc",
38 ] 45 ]
39 if (is_win) { 46 if (is_win) {
40 sources += [ "src/windows/port.cc" ] 47 sources += [ "src/windows/port.cc" ]
41 48
42 cflags = [ 49 cflags = [
43 "/wd4005", # WIN32_LEAN_AND_MEAN. 50 "/wd4005", # WIN32_LEAN_AND_MEAN.
44 "/wd4267", # Conversion from size_t to "type". 51 "/wd4267", # Conversion from size_t to "type".
45 ] 52 ]
46 } 53 }
47 54
48 include_dirs = [ 55 include_dirs = [ "$gflags_gen_arch_root/include/private" ] # For config.h
49 "$gflags_gen_arch_root/include/private", # For config.h
50 ]
51 56
52 public_configs = [ ":gflags_config" ] 57 public_configs = [ ":gflags_config" ]
53 58
54 configs -= [ "//build/config/compiler:chromium_code" ] 59 configs -= [ "//build/config/compiler:chromium_code" ]
55 configs += [ "//build/config/compiler:no_chromium_code" ] 60 configs += [ "//build/config/compiler:no_chromium_code" ]
56 61
57 if (is_clang) { 62 if (is_clang) {
58 # TODO(andrew): Look into fixing this warning upstream: 63 # TODO(andrew): Look into fixing this warning upstream:
59 # http://code.google.com/p/webrtc/issues/detail?id=760 64 # http://code.google.com/p/webrtc/issues/detail?id=760
60 configs -= [ "//build/config/clang:extra_warnings" ] 65 configs -= [ "//build/config/clang:extra_warnings" ]
61 } 66 }
62 } 67 }
68
OLDNEW
« no previous file with comments | « no previous file | third_party/gflags/gflags.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698