[M120 Migration] Implement ewk_view_is_video_playing api
[platform/framework/web/chromium-efl.git] / third_party / googletest / BUILD.gn
1 # Copyright 2014 The Chromium Authors
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/build.gni")
6
7 config("gtest_config") {
8   # webrtc wants to push this config without a public_dep chain
9   # TODO(crbug.com/1249254): figure out what to do with this
10   visibility = [
11     ":*",  # gmock also shares this config.
12     "//test:*",  # webrts standalone setup
13     "//third_party/webrtc/test:*",
14   ]
15
16   defines = [
17     # Chromium always links googletest statically, so no API qualifier is
18     # necessary. The definition in gtest-port.h at the time of this writing
19     # causes crashes in content_browsertests.
20     "GTEST_API_=",
21
22     # In order to allow regex matches in gtest to be shared between Windows
23     # and other systems, we tell gtest to always use its internal engine.
24     "GTEST_HAS_POSIX_RE=0",
25
26     # Enables C++11 features.
27     "GTEST_LANG_CXX11=1",
28
29     # Prevents gtest from including both <tr1/tuple> and <tuple>.
30     "GTEST_HAS_TR1_TUPLE=0",
31   ]
32
33   # Gtest headers need to be able to find themselves.
34   include_dirs = [
35     "custom",
36     "src/googletest/include",
37   ]
38
39   if (is_win) {
40     cflags = [ "/wd4800" ]  # Unused variable warning.
41   }
42
43   if (gtest_enable_absl_printers) {
44     configs = [ "//third_party/abseil-cpp:absl_include_config" ]
45     defines += [ "GTEST_HAS_ABSL=1" ]
46   }
47 }
48
49 config("gmock_config") {
50   # Gmock headers need to be able to find themselves.
51   include_dirs = [
52     "custom",
53     "src/googlemock/include",
54   ]
55
56   if (is_clang) {
57     # TODO(tikuta): remove this when the issue is fixed.
58     # https://github.com/google/googletest/issues/533
59     cflags = [ "-Wno-inconsistent-missing-override" ]
60   }
61 }
62
63 # Do NOT depend on this directly. Use //testing/gtest instead.
64 # See README.chromium for details.
65 source_set("gtest") {
66   testonly = true
67   sources = [
68     "custom/gtest/internal/custom/gtest.h",
69     "custom/gtest/internal/custom/stack_trace_getter.cc",
70     "custom/gtest/internal/custom/stack_trace_getter.h",
71
72     # TODO(crbug.com/1009553): Remove this wrapper and custom temp dir
73     # after plumbing a workable temporary path into googletest on Android.
74     "custom/gtest/internal/custom/chrome_custom_temp_dir.cc",
75     "custom/gtest/internal/custom/chrome_custom_temp_dir.h",
76     "custom/gtest/internal/custom/gtest_port_wrapper.cc",
77     "src/googletest/include/gtest/gtest-assertion-result.h",
78     "src/googletest/include/gtest/gtest-death-test.h",
79     "src/googletest/include/gtest/gtest-matchers.h",
80     "src/googletest/include/gtest/gtest-message.h",
81     "src/googletest/include/gtest/gtest-param-test.h",
82     "src/googletest/include/gtest/gtest-printers.h",
83     "src/googletest/include/gtest/gtest-spi.h",
84     "src/googletest/include/gtest/gtest-test-part.h",
85     "src/googletest/include/gtest/gtest-typed-test.h",
86     "src/googletest/include/gtest/gtest.h",
87     "src/googletest/include/gtest/gtest_pred_impl.h",
88     "src/googletest/include/gtest/gtest_prod.h",
89
90     #"src/googletest/include/gtest/internal/custom/gtest.h",  # Superseded.
91     "src/googletest/include/gtest/internal/custom/gtest-port.h",
92     "src/googletest/include/gtest/internal/custom/gtest-printers.h",
93     "src/googletest/include/gtest/internal/gtest-death-test-internal.h",
94     "src/googletest/include/gtest/internal/gtest-filepath.h",
95     "src/googletest/include/gtest/internal/gtest-internal.h",
96     "src/googletest/include/gtest/internal/gtest-param-util.h",
97     "src/googletest/include/gtest/internal/gtest-port-arch.h",
98     "src/googletest/include/gtest/internal/gtest-port.h",
99     "src/googletest/include/gtest/internal/gtest-string.h",
100     "src/googletest/include/gtest/internal/gtest-type-util.h",
101
102     #"src/googletest/src/gtest-all.cc",  # Not needed by our build.
103     "src/googletest/src/gtest-assertion-result.cc",
104     "src/googletest/src/gtest-death-test.cc",
105     "src/googletest/src/gtest-filepath.cc",
106     "src/googletest/src/gtest-internal-inl.h",
107     "src/googletest/src/gtest-matchers.cc",
108
109     # gtest_port_wrapper.cc is used instead of gtest-port.cc.
110     # TODO(crbug.com/1009553): Re-enable this file after plumbing a workable
111     #                          temporary path into googletest on Android.
112     #"src/googletest/src/gtest-port.cc",
113     "src/googletest/src/gtest-printers.cc",
114     "src/googletest/src/gtest-test-part.cc",
115     "src/googletest/src/gtest-typed-test.cc",
116     "src/googletest/src/gtest.cc",
117   ]
118
119   # Some files include "src/gtest-internal-inl.h".
120   include_dirs = [ "src/googletest" ]
121
122   public_configs = [ ":gtest_config" ]
123
124   configs -= [ "//build/config/compiler:chromium_code" ]
125   configs += [ "//build/config/compiler:no_chromium_code" ]
126
127   defines = []
128   deps = []
129   public_deps = []
130   if (is_nacl || !build_with_chromium) {
131     defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ]
132     sources -= [
133       "custom/gtest/internal/custom/stack_trace_getter.cc",
134       "custom/gtest/internal/custom/stack_trace_getter.h",
135     ]
136   } else {
137     deps += [ "//base" ]
138   }
139
140   if (is_fuchsia) {
141     deps += [
142       "//third_party/fuchsia-sdk/sdk/pkg/fdio",
143       "//third_party/fuchsia-sdk/sdk/pkg/zx",
144     ]
145   }
146
147   if (gtest_enable_absl_printers) {
148     deps += [ "//third_party/abseil-cpp:absl" ]
149   }
150 }
151
152 # Do NOT depend on this directly. Use //testing/gtest:gtest_main instead.
153 # See README.chromium for details.
154 source_set("gtest_main") {
155   testonly = true
156   sources = [ "src/googletest/src/gtest_main.cc" ]
157   deps = [ ":gtest" ]
158 }
159
160 # Do NOT depend on this directly. Use //testing/gmock instead.
161 # See README.chromium for details.
162 source_set("gmock") {
163   testonly = true
164   sources = [
165     "src/googlemock/include/gmock/gmock-actions.h",
166     "src/googlemock/include/gmock/gmock-cardinalities.h",
167     "src/googlemock/include/gmock/gmock-function-mocker.h",
168     "src/googlemock/include/gmock/gmock-matchers.h",
169     "src/googlemock/include/gmock/gmock-more-matchers.h",
170     "src/googlemock/include/gmock/gmock-nice-strict.h",
171     "src/googlemock/include/gmock/gmock-spec-builders.h",
172     "src/googlemock/include/gmock/gmock.h",
173
174     #"src/googlemock/include/gmock/internal/custom/gmock-port.h",  # Superseded.
175     "src/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
176     "src/googlemock/include/gmock/internal/custom/gmock-matchers.h",
177     "src/googlemock/include/gmock/internal/gmock-internal-utils.h",
178     "src/googlemock/include/gmock/internal/gmock-port.h",
179     "src/googlemock/include/gmock/internal/gmock-pp.h",
180
181     #"src/googlemock/src/gmock-all.cc",  # Not needed by our build.
182     "src/googlemock/src/gmock-cardinalities.cc",
183     "src/googlemock/src/gmock-internal-utils.cc",
184     "src/googlemock/src/gmock-matchers.cc",
185     "src/googlemock/src/gmock-spec-builders.cc",
186     "src/googlemock/src/gmock.cc",
187   ]
188
189   public_deps = [ ":gtest" ]
190
191   public_configs = [ ":gmock_config" ]
192 }
193
194 # Do NOT depend on this directly. Use //testing/gmock:gmock_main instead.
195 # See README.chromium for details.
196 static_library("gmock_main") {
197   testonly = true
198   sources = [ "src/googlemock/src/gmock_main.cc" ]
199   deps = [ ":gmock" ]
200 }