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

Side by Side Diff: build/secondary/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 | « DEPS ('k') | net/socket/sequenced_socket_data_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//build_overrides/gtest.gni")
6
7 config("gtest_config") {
8 visibility = [
9 ":*",
10 "//testing/gmock:*", # gmock also shares this config.
11 ]
12
13 defines = [
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.
16 "GTEST_HAS_POSIX_RE=0",
17
18 # Chrome doesn't support / require C++11, yet.
19 "GTEST_LANG_CXX11=0",
20 ]
21
22 # Gtest headers need to be able to find themselves.
23 include_dirs = [ "include" ]
24
25 if (is_win) {
26 cflags = [ "/wd4800" ] # Unused variable warning.
27 }
28 }
29
30 config("gtest_direct_config") {
31 visibility = [ ":*" ]
32 defines = [ "UNIT_TEST" ]
33 }
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") {
45 testonly = true
46 sources = [
47 "include/gtest/gtest-death-test.h",
48 "include/gtest/gtest-message.h",
49 "include/gtest/gtest-param-test.h",
50 "include/gtest/gtest-printers.h",
51 "include/gtest/gtest-spi.h",
52 "include/gtest/gtest-test-part.h",
53 "include/gtest/gtest-typed-test.h",
54 "include/gtest/gtest.h",
55 "include/gtest/gtest_pred_impl.h",
56 "include/gtest/internal/gtest-death-test-internal.h",
57 "include/gtest/internal/gtest-filepath.h",
58 "include/gtest/internal/gtest-internal.h",
59 "include/gtest/internal/gtest-linked_ptr.h",
60 "include/gtest/internal/gtest-param-util-generated.h",
61 "include/gtest/internal/gtest-param-util.h",
62 "include/gtest/internal/gtest-port.h",
63 "include/gtest/internal/gtest-string.h",
64 "include/gtest/internal/gtest-tuple.h",
65 "include/gtest/internal/gtest-type-util.h",
66
67 #"gtest/src/gtest-all.cc", # Not needed by our build.
68 "src/gtest-death-test.cc",
69 "src/gtest-filepath.cc",
70 "src/gtest-internal-inl.h",
71 "src/gtest-port.cc",
72 "src/gtest-printers.cc",
73 "src/gtest-test-part.cc",
74 "src/gtest-typed-test.cc",
75 "src/gtest.cc",
76 ]
77
78 if (gtest_include_multiprocess) {
79 sources += [
80 "../multiprocess_func_list.cc",
81 "../multiprocess_func_list.h",
82 ]
83 }
84
85 if (gtest_include_platform_test) {
86 sources += [ "../platform_test.h" ]
87 }
88
89 if ((is_mac || is_ios) && gtest_include_objc_support) {
90 if (is_ios) {
91 set_sources_assignment_filter([])
92 }
93 sources += [
94 "../gtest_mac.h",
95 "../gtest_mac.mm",
96 ]
97 if (gtest_include_platform_test) {
98 sources += [ "../platform_test_mac.mm" ]
99 }
100 set_sources_assignment_filter(sources_assignment_filter)
101 }
102
103 if (is_ios && gtest_include_ios_coverage) {
104 sources += [
105 "../coverage_util_ios.cc",
106 "../coverage_util_ios.h",
107 ]
108 }
109
110 include_dirs = [ "." ]
111
112 all_dependent_configs = [ ":gtest_config" ]
113 public_configs = [ ":gtest_direct_config" ]
114
115 configs -= [ "//build/config/compiler:chromium_code" ]
116 configs += [
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 }
123
124 source_set("gtest_main") {
125 testonly = true
126 sources = [
127 "src/gtest_main.cc",
128 ]
129 deps = [
130 ":gtest",
131 ]
132 }
OLDNEW
« no previous file with comments | « DEPS ('k') | net/socket/sequenced_socket_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698