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

Side by Side Diff: testing/gtest/BUILD.gn

Issue 2169193002: Re-land: Roll gtest. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « testing/gtest.gypi ('k') | testing/gtest/include/gtest/gtest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import("//build_overrides/gtest.gni") 5 import("//build_overrides/gtest.gni")
6 6
7 config("gtest_config") { 7 config("gtest_config") {
8 visibility = [ 8 visibility = [
9 ":*", 9 ":*",
10 "//testing/gmock:*", # gmock also shares this config. 10 "//testing/gmock:*", # gmock also shares this config.
11 ] 11 ]
12 12
13 defines = [ 13 defines = [
14 # In order to allow regex matches in gtest to be shared between Windows 14 # In order to allow regex matches in gtest to be shared between Windows
15 # and other systems, we tell gtest to always use it's internal engine. 15 # and other systems, we tell gtest to always use it's internal engine.
16 "GTEST_HAS_POSIX_RE=0", 16 "GTEST_HAS_POSIX_RE=0",
17 17
18 # Chrome doesn't support / require C++11, yet. 18 # Chrome doesn't support / require C++11, yet.
19 "GTEST_LANG_CXX11=0", 19 "GTEST_LANG_CXX11=0",
20 ] 20 ]
21 21
22 # Gtest headers need to be able to find themselves. 22 # Gtest headers need to be able to find themselves.
23 include_dirs = [ "include" ] 23 include_dirs = [ "../third_party/googletest/googletest/include" ]
24 24
25 if (is_win) { 25 if (is_win) {
26 cflags = [ "/wd4800" ] # Unused variable warning. 26 cflags = [ "/wd4800" ] # Unused variable warning.
27 } 27 }
28 } 28 }
29 29
30 config("gtest_direct_config") { 30 config("gtest_direct_config") {
31 visibility = [ ":*" ] 31 visibility = [ ":*" ]
32 defines = [ "UNIT_TEST" ] 32 defines = [ "UNIT_TEST" ]
33 } 33 }
34 34
35 config("gtest_warnings") {
36 if (is_win && is_clang) {
37 # The Mutex constructor initializer list in gtest-port.cc is incorrectly
38 # ordered. See
39 # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6 sJ.
40 cflags = [ "-Wno-reorder" ]
41 }
42 }
43
44 static_library("gtest") { 35 static_library("gtest") {
45 testonly = true 36 testonly = true
46 sources = [ 37 sources = [
38 "../third_party/googletest/googletest/include/gtest/gtest-death-test.h",
39 "../third_party/googletest/googletest/include/gtest/gtest-message.h",
40 "../third_party/googletest/googletest/include/gtest/gtest-param-test.h",
41 "../third_party/googletest/googletest/include/gtest/gtest-printers.h",
42 "../third_party/googletest/googletest/include/gtest/gtest-spi.h",
43 "../third_party/googletest/googletest/include/gtest/gtest-test-part.h",
44 "../third_party/googletest/googletest/include/gtest/gtest-typed-test.h",
45 "../third_party/googletest/googletest/include/gtest/gtest.h",
46 "../third_party/googletest/googletest/include/gtest/gtest_pred_impl.h",
47 "../third_party/googletest/googletest/include/gtest/internal/gtest-death-tes t-internal.h",
48 "../third_party/googletest/googletest/include/gtest/internal/gtest-filepath. h",
49 "../third_party/googletest/googletest/include/gtest/internal/gtest-internal. h",
50 "../third_party/googletest/googletest/include/gtest/internal/gtest-linked_pt r.h",
51 "../third_party/googletest/googletest/include/gtest/internal/gtest-param-uti l-generated.h",
52 "../third_party/googletest/googletest/include/gtest/internal/gtest-param-uti l.h",
53 "../third_party/googletest/googletest/include/gtest/internal/gtest-port.h",
54 "../third_party/googletest/googletest/include/gtest/internal/gtest-string.h" ,
55 "../third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h",
56 "../third_party/googletest/googletest/include/gtest/internal/gtest-type-util .h",
47 "include/gtest/gtest-death-test.h", 57 "include/gtest/gtest-death-test.h",
48 "include/gtest/gtest-message.h", 58 "include/gtest/gtest-message.h",
49 "include/gtest/gtest-param-test.h", 59 "include/gtest/gtest-param-test.h",
50 "include/gtest/gtest-printers.h", 60 "include/gtest/gtest-printers.h",
51 "include/gtest/gtest-spi.h", 61 "include/gtest/gtest-spi.h",
52 "include/gtest/gtest-test-part.h", 62 "include/gtest/gtest-test-part.h",
53 "include/gtest/gtest-typed-test.h", 63 "include/gtest/gtest-typed-test.h",
54 "include/gtest/gtest.h", 64 "include/gtest/gtest.h",
55 "include/gtest/gtest_pred_impl.h", 65 "include/gtest/gtest_pred_impl.h",
56 "include/gtest/internal/gtest-death-test-internal.h", 66 "include/gtest/internal/gtest-death-test-internal.h",
57 "include/gtest/internal/gtest-filepath.h", 67 "include/gtest/internal/gtest-filepath.h",
58 "include/gtest/internal/gtest-internal.h", 68 "include/gtest/internal/gtest-internal.h",
59 "include/gtest/internal/gtest-linked_ptr.h", 69 "include/gtest/internal/gtest-linked_ptr.h",
60 "include/gtest/internal/gtest-param-util-generated.h", 70 "include/gtest/internal/gtest-param-util-generated.h",
61 "include/gtest/internal/gtest-param-util.h", 71 "include/gtest/internal/gtest-param-util.h",
62 "include/gtest/internal/gtest-port.h", 72 "include/gtest/internal/gtest-port.h",
63 "include/gtest/internal/gtest-string.h", 73 "include/gtest/internal/gtest-string.h",
64 "include/gtest/internal/gtest-tuple.h", 74 "include/gtest/internal/gtest-tuple.h",
65 "include/gtest/internal/gtest-type-util.h", 75 "include/gtest/internal/gtest-type-util.h",
66 76
67 #"gtest/src/gtest-all.cc", # Not needed by our build. 77 #"gtest/src/gtest-all.cc", # Not needed by our build.
68 "src/gtest-death-test.cc", 78 "../third_party/googletest/googletest/src/gtest-death-test.cc",
69 "src/gtest-filepath.cc", 79 "../third_party/googletest/googletest/src/gtest-filepath.cc",
70 "src/gtest-internal-inl.h", 80 "../third_party/googletest/googletest/src/gtest-internal-inl.h",
71 "src/gtest-port.cc", 81 "../third_party/googletest/googletest/src/gtest-port.cc",
72 "src/gtest-printers.cc", 82 "../third_party/googletest/googletest/src/gtest-printers.cc",
73 "src/gtest-test-part.cc", 83 "../third_party/googletest/googletest/src/gtest-test-part.cc",
74 "src/gtest-typed-test.cc", 84 "../third_party/googletest/googletest/src/gtest-typed-test.cc",
75 "src/gtest.cc", 85 "../third_party/googletest/googletest/src/gtest.cc",
76 ] 86 ]
77 87
78 if (gtest_include_multiprocess) { 88 if (gtest_include_multiprocess) {
79 sources += [ 89 sources += [
80 "../multiprocess_func_list.cc", 90 "../multiprocess_func_list.cc",
81 "../multiprocess_func_list.h", 91 "../multiprocess_func_list.h",
82 ] 92 ]
83 } 93 }
84 94
85 if (gtest_include_platform_test) { 95 if (gtest_include_platform_test) {
(...skipping 14 matching lines...) Expand all
100 set_sources_assignment_filter(sources_assignment_filter) 110 set_sources_assignment_filter(sources_assignment_filter)
101 } 111 }
102 112
103 if (is_ios && gtest_include_ios_coverage) { 113 if (is_ios && gtest_include_ios_coverage) {
104 sources += [ 114 sources += [
105 "../coverage_util_ios.cc", 115 "../coverage_util_ios.cc",
106 "../coverage_util_ios.h", 116 "../coverage_util_ios.h",
107 ] 117 ]
108 } 118 }
109 119
110 include_dirs = [ "." ] 120 include_dirs = [ "../third_party/googletest/googletest" ]
111 121
112 all_dependent_configs = [ ":gtest_config" ] 122 all_dependent_configs = [ ":gtest_config" ]
113 public_configs = [ ":gtest_direct_config" ] 123 public_configs = [ ":gtest_direct_config" ]
114 124
115 configs -= [ "//build/config/compiler:chromium_code" ] 125 configs -= [ "//build/config/compiler:chromium_code" ]
116 configs += [ 126 configs += [ "//build/config/compiler:no_chromium_code" ]
117 "//build/config/compiler:no_chromium_code",
118
119 # Must be after no_chromium_code for warning flags to be ordered correctly.
120 ":gtest_warnings",
121 ]
122 } 127 }
123 128
124 source_set("gtest_main") { 129 source_set("gtest_main") {
125 testonly = true 130 testonly = true
126 sources = [ 131 sources = [
127 "src/gtest_main.cc", 132 "../third_party/googletest/googletest/src/gtest_main.cc",
128 ] 133 ]
129 deps = [ 134 deps = [
130 ":gtest", 135 ":gtest",
131 ] 136 ]
132 } 137 }
OLDNEW
« no previous file with comments | « testing/gtest.gypi ('k') | testing/gtest/include/gtest/gtest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698