OLD | NEW |
1 # Copyright 2014 The Crashpad Authors. All rights reserved. | 1 # Copyright 2014 The Crashpad Authors. All rights reserved. |
2 # | 2 # |
3 # Licensed under the Apache License, Version 2.0 (the "License"); | 3 # Licensed under the Apache License, Version 2.0 (the "License"); |
4 # you may not use this file except in compliance with the License. | 4 # you may not use this file except in compliance with the License. |
5 # You may obtain a copy of the License at | 5 # You may obtain a copy of the License at |
6 # | 6 # |
7 # http://www.apache.org/licenses/LICENSE-2.0 | 7 # http://www.apache.org/licenses/LICENSE-2.0 |
8 # | 8 # |
9 # Unless required by applicable law or agreed to in writing, software | 9 # Unless required by applicable law or agreed to in writing, software |
10 # distributed under the License is distributed on an "AS IS" BASIS, | 10 # distributed under the License is distributed on an "AS IS" BASIS, |
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 # See the License for the specific language governing permissions and | 12 # See the License for the specific language governing permissions and |
13 # limitations under the License. | 13 # limitations under the License. |
14 | 14 |
15 { | 15 { |
16 'includes': [ | 16 'includes': [ |
17 '../../build/crashpad_dependencies.gypi', | 17 '../../build/crashpad_dependencies.gypi', |
18 ], | 18 ], |
19 'conditions': [ | 19 'conditions': [ |
20 ['1==1', { # Defer processing until crashpad_dependencies is set | 20 ['crashpad_dependencies!="chromium"', { |
21 'variables': { | 21 'variables': { |
22 'conditions': [ | 22 'conditions': [ |
23 ['crashpad_dependencies=="standalone"', { | 23 ['crashpad_dependencies=="standalone"', { |
24 'gtest_dir': 'gtest/googletest', | 24 'gtest_dir': 'gtest/googletest', |
25 }], | 25 }, { |
26 ['crashpad_dependencies=="external"', { | |
27 'gtest_dir': '../../../../gtest', | 26 'gtest_dir': '../../../../gtest', |
28 }], | 27 }], |
29 ], | 28 ], |
30 }, | 29 }, |
| 30 'target_defaults': { |
| 31 # gtest relies heavily on objects with static storage duration. |
| 32 'xcode_settings': { |
| 33 'WARNING_CFLAGS!': [ |
| 34 '-Wexit-time-destructors', |
| 35 ], |
| 36 }, |
| 37 'cflags!': [ |
| 38 '-Wexit-time-destructors', |
| 39 ], |
| 40 }, |
| 41 |
| 42 'targets': [ |
| 43 { |
| 44 'target_name': 'gtest', |
| 45 'type': 'static_library', |
| 46 'include_dirs': [ |
| 47 '<(gtest_dir)', |
| 48 '<(gtest_dir)/include', |
| 49 ], |
| 50 'sources': [ |
| 51 '<(gtest_dir)/include/gtest/gtest-death-test.h', |
| 52 '<(gtest_dir)/include/gtest/gtest-message.h', |
| 53 '<(gtest_dir)/include/gtest/gtest-param-test.h', |
| 54 '<(gtest_dir)/include/gtest/gtest-printers.h', |
| 55 '<(gtest_dir)/include/gtest/gtest-spi.h', |
| 56 '<(gtest_dir)/include/gtest/gtest-test-part.h', |
| 57 '<(gtest_dir)/include/gtest/gtest-typed-test.h', |
| 58 '<(gtest_dir)/include/gtest/gtest.h', |
| 59 '<(gtest_dir)/include/gtest/gtest_pred_impl.h', |
| 60 '<(gtest_dir)/include/gtest/gtest_prod.h', |
| 61 '<(gtest_dir)/include/gtest/internal/custom/gtest-port.h', |
| 62 '<(gtest_dir)/include/gtest/internal/custom/gtest-printers.h', |
| 63 '<(gtest_dir)/include/gtest/internal/custom/gtest.h', |
| 64 '<(gtest_dir)/include/gtest/internal/gtest-death-test-internal.h', |
| 65 '<(gtest_dir)/include/gtest/internal/gtest-filepath.h', |
| 66 '<(gtest_dir)/include/gtest/internal/gtest-internal.h', |
| 67 '<(gtest_dir)/include/gtest/internal/gtest-linked_ptr.h', |
| 68 '<(gtest_dir)/include/gtest/internal/gtest-param-util-generated.h', |
| 69 '<(gtest_dir)/include/gtest/internal/gtest-param-util.h', |
| 70 '<(gtest_dir)/include/gtest/internal/gtest-port-arch.h', |
| 71 '<(gtest_dir)/include/gtest/internal/gtest-port.h', |
| 72 '<(gtest_dir)/include/gtest/internal/gtest-string.h', |
| 73 '<(gtest_dir)/include/gtest/internal/gtest-tuple.h', |
| 74 '<(gtest_dir)/include/gtest/internal/gtest-type-util.h', |
| 75 '<(gtest_dir)/src/gtest-all.cc', |
| 76 '<(gtest_dir)/src/gtest-death-test.cc', |
| 77 '<(gtest_dir)/src/gtest-filepath.cc', |
| 78 '<(gtest_dir)/src/gtest-internal-inl.h', |
| 79 '<(gtest_dir)/src/gtest-port.cc', |
| 80 '<(gtest_dir)/src/gtest-printers.cc', |
| 81 '<(gtest_dir)/src/gtest-test-part.cc', |
| 82 '<(gtest_dir)/src/gtest-typed-test.cc', |
| 83 '<(gtest_dir)/src/gtest.cc', |
| 84 ], |
| 85 'sources!': [ |
| 86 '<(gtest_dir)/src/gtest-all.cc', |
| 87 ], |
| 88 'direct_dependent_settings': { |
| 89 'include_dirs': [ |
| 90 '<(gtest_dir)/include', |
| 91 ], |
| 92 }, |
| 93 'conditions': [ |
| 94 ['crashpad_dependencies=="external"', { |
| 95 'include_dirs': [ |
| 96 '<(gtest_dir)/../..', |
| 97 ], |
| 98 'defines': [ |
| 99 'GUNIT_NO_GOOGLE3=1', |
| 100 ], |
| 101 'direct_dependent_settings': { |
| 102 'include_dirs': [ |
| 103 '<(gtest_dir)/../..', |
| 104 ], |
| 105 'defines': [ |
| 106 'GUNIT_NO_GOOGLE3=1', |
| 107 ], |
| 108 }, |
| 109 }], |
| 110 ], |
| 111 }, |
| 112 { |
| 113 'target_name': 'gtest_main', |
| 114 'type': 'static_library', |
| 115 'dependencies': [ |
| 116 'gtest', |
| 117 ], |
| 118 'sources': [ |
| 119 '<(gtest_dir)/src/gtest_main.cc', |
| 120 ], |
| 121 }, |
| 122 { |
| 123 'target_name': 'gtest_test_executable', |
| 124 'type': 'none', |
| 125 'dependencies': [ |
| 126 'gtest', |
| 127 ], |
| 128 'direct_dependent_settings': { |
| 129 'type': 'executable', |
| 130 'include_dirs': [ |
| 131 '<(gtest_dir)', |
| 132 ], |
| 133 }, |
| 134 'export_dependent_settings': [ |
| 135 'gtest', |
| 136 ], |
| 137 }, |
| 138 { |
| 139 'target_name': 'gtest_all_test', |
| 140 'dependencies': [ |
| 141 'gtest_test_executable', |
| 142 'gtest_main', |
| 143 ], |
| 144 'sources': [ |
| 145 '<(gtest_dir)/test/gtest-death-test_test.cc', |
| 146 '<(gtest_dir)/test/gtest-filepath_test.cc', |
| 147 '<(gtest_dir)/test/gtest-linked_ptr_test.cc', |
| 148 '<(gtest_dir)/test/gtest-message_test.cc', |
| 149 '<(gtest_dir)/test/gtest-options_test.cc', |
| 150 '<(gtest_dir)/test/gtest-port_test.cc', |
| 151 '<(gtest_dir)/test/gtest-printers_test.cc', |
| 152 '<(gtest_dir)/test/gtest-test-part_test.cc', |
| 153 '<(gtest_dir)/test/gtest-typed-test2_test.cc', |
| 154 '<(gtest_dir)/test/gtest-typed-test_test.cc', |
| 155 '<(gtest_dir)/test/gtest-typed-test_test.h', |
| 156 '<(gtest_dir)/test/gtest_main_unittest.cc', |
| 157 '<(gtest_dir)/test/gtest_pred_impl_unittest.cc', |
| 158 '<(gtest_dir)/test/gtest_prod_test.cc', |
| 159 '<(gtest_dir)/test/gtest_unittest.cc', |
| 160 '<(gtest_dir)/test/production.cc', |
| 161 '<(gtest_dir)/test/production.h', |
| 162 ], |
| 163 }, |
| 164 { |
| 165 'target_name': 'gtest_environment_test', |
| 166 'dependencies': [ |
| 167 'gtest_test_executable', |
| 168 ], |
| 169 'sources': [ |
| 170 '<(gtest_dir)/test/gtest_environment_test.cc', |
| 171 ], |
| 172 }, |
| 173 { |
| 174 'target_name': 'gtest_listener_test', |
| 175 'dependencies': [ |
| 176 'gtest_test_executable', |
| 177 ], |
| 178 'sources': [ |
| 179 '<(gtest_dir)/test/gtest-listener_test.cc', |
| 180 ], |
| 181 }, |
| 182 { |
| 183 'target_name': 'gtest_no_test', |
| 184 'dependencies': [ |
| 185 'gtest_test_executable', |
| 186 ], |
| 187 'sources': [ |
| 188 '<(gtest_dir)/test/gtest_no_test_unittest.cc', |
| 189 ], |
| 190 }, |
| 191 { |
| 192 'target_name': 'gtest_param_test', |
| 193 'dependencies': [ |
| 194 'gtest_test_executable', |
| 195 ], |
| 196 'sources': [ |
| 197 '<(gtest_dir)/test/gtest-param-test2_test.cc', |
| 198 '<(gtest_dir)/test/gtest-param-test_test.cc', |
| 199 '<(gtest_dir)/test/gtest-param-test_test.h', |
| 200 ], |
| 201 }, |
| 202 { |
| 203 'target_name': 'gtest_premature_exit_test', |
| 204 'dependencies': [ |
| 205 'gtest_test_executable', |
| 206 ], |
| 207 'sources': [ |
| 208 '<(gtest_dir)/test/gtest_premature_exit_test.cc', |
| 209 ], |
| 210 }, |
| 211 { |
| 212 'target_name': 'gtest_repeat_test', |
| 213 'dependencies': [ |
| 214 'gtest_test_executable', |
| 215 ], |
| 216 'sources': [ |
| 217 '<(gtest_dir)/test/gtest_repeat_test.cc', |
| 218 ], |
| 219 }, |
| 220 { |
| 221 'target_name': 'gtest_sole_header_test', |
| 222 'dependencies': [ |
| 223 'gtest_test_executable', |
| 224 'gtest_main', |
| 225 ], |
| 226 'sources': [ |
| 227 '<(gtest_dir)/test/gtest_sole_header_test.cc', |
| 228 ], |
| 229 }, |
| 230 { |
| 231 'target_name': 'gtest_stress_test', |
| 232 'dependencies': [ |
| 233 'gtest_test_executable', |
| 234 ], |
| 235 'sources': [ |
| 236 '<(gtest_dir)/test/gtest_stress_test.cc', |
| 237 ], |
| 238 }, |
| 239 { |
| 240 'target_name': 'gtest_unittest_api_test', |
| 241 'dependencies': [ |
| 242 'gtest_test_executable', |
| 243 ], |
| 244 'sources': [ |
| 245 '<(gtest_dir)/test/gtest-unittest-api_test.cc', |
| 246 ], |
| 247 }, |
| 248 { |
| 249 'target_name': 'gtest_all_tests', |
| 250 'type': 'none', |
| 251 'dependencies': [ |
| 252 'gtest_all_test', |
| 253 'gtest_environment_test', |
| 254 'gtest_listener_test', |
| 255 'gtest_no_test', |
| 256 'gtest_param_test', |
| 257 'gtest_premature_exit_test', |
| 258 'gtest_repeat_test', |
| 259 'gtest_sole_header_test', |
| 260 'gtest_stress_test', |
| 261 'gtest_unittest_api_test', |
| 262 ], |
| 263 }, |
| 264 ], |
| 265 }, { # else: crashpad_dependencies=="chromium" |
| 266 'targets': [ |
| 267 { |
| 268 'target_name': 'gtest', |
| 269 'type': 'none', |
| 270 'dependencies': [ |
| 271 '<(DEPTH)/testing/gtest.gyp:gtest', |
| 272 ], |
| 273 'export_dependent_settings': [ |
| 274 '<(DEPTH)/testing/gtest.gyp:gtest', |
| 275 ], |
| 276 }, |
| 277 { |
| 278 'target_name': 'gtest_main', |
| 279 'type': 'none', |
| 280 'dependencies': [ |
| 281 '<(DEPTH)/testing/gtest.gyp:gtest_main', |
| 282 ], |
| 283 'export_dependent_settings': [ |
| 284 '<(DEPTH)/testing/gtest.gyp:gtest_main', |
| 285 ], |
| 286 }, |
| 287 ], |
31 }], | 288 }], |
32 ], | 289 ], |
33 'target_defaults': { | |
34 # gtest relies heavily on objects with static storage duration. | |
35 'xcode_settings': { | |
36 'WARNING_CFLAGS!': [ | |
37 '-Wexit-time-destructors', | |
38 ], | |
39 }, | |
40 'cflags!': [ | |
41 '-Wexit-time-destructors', | |
42 ], | |
43 }, | |
44 | |
45 'targets': [ | |
46 { | |
47 'target_name': 'gtest', | |
48 'type': 'static_library', | |
49 'include_dirs': [ | |
50 '<(gtest_dir)', | |
51 '<(gtest_dir)/include', | |
52 ], | |
53 'sources': [ | |
54 '<(gtest_dir)/include/gtest/gtest-death-test.h', | |
55 '<(gtest_dir)/include/gtest/gtest-message.h', | |
56 '<(gtest_dir)/include/gtest/gtest-param-test.h', | |
57 '<(gtest_dir)/include/gtest/gtest-printers.h', | |
58 '<(gtest_dir)/include/gtest/gtest-spi.h', | |
59 '<(gtest_dir)/include/gtest/gtest-test-part.h', | |
60 '<(gtest_dir)/include/gtest/gtest-typed-test.h', | |
61 '<(gtest_dir)/include/gtest/gtest.h', | |
62 '<(gtest_dir)/include/gtest/gtest_pred_impl.h', | |
63 '<(gtest_dir)/include/gtest/gtest_prod.h', | |
64 '<(gtest_dir)/include/gtest/internal/custom/gtest-port.h', | |
65 '<(gtest_dir)/include/gtest/internal/custom/gtest-printers.h', | |
66 '<(gtest_dir)/include/gtest/internal/custom/gtest.h', | |
67 '<(gtest_dir)/include/gtest/internal/gtest-death-test-internal.h', | |
68 '<(gtest_dir)/include/gtest/internal/gtest-filepath.h', | |
69 '<(gtest_dir)/include/gtest/internal/gtest-internal.h', | |
70 '<(gtest_dir)/include/gtest/internal/gtest-linked_ptr.h', | |
71 '<(gtest_dir)/include/gtest/internal/gtest-param-util-generated.h', | |
72 '<(gtest_dir)/include/gtest/internal/gtest-param-util.h', | |
73 '<(gtest_dir)/include/gtest/internal/gtest-port-arch.h', | |
74 '<(gtest_dir)/include/gtest/internal/gtest-port.h', | |
75 '<(gtest_dir)/include/gtest/internal/gtest-string.h', | |
76 '<(gtest_dir)/include/gtest/internal/gtest-tuple.h', | |
77 '<(gtest_dir)/include/gtest/internal/gtest-type-util.h', | |
78 '<(gtest_dir)/src/gtest-all.cc', | |
79 '<(gtest_dir)/src/gtest-death-test.cc', | |
80 '<(gtest_dir)/src/gtest-filepath.cc', | |
81 '<(gtest_dir)/src/gtest-internal-inl.h', | |
82 '<(gtest_dir)/src/gtest-port.cc', | |
83 '<(gtest_dir)/src/gtest-printers.cc', | |
84 '<(gtest_dir)/src/gtest-test-part.cc', | |
85 '<(gtest_dir)/src/gtest-typed-test.cc', | |
86 '<(gtest_dir)/src/gtest.cc', | |
87 ], | |
88 'sources!': [ | |
89 '<(gtest_dir)/src/gtest-all.cc', | |
90 ], | |
91 'direct_dependent_settings': { | |
92 'include_dirs': [ | |
93 '<(gtest_dir)/include', | |
94 ], | |
95 }, | |
96 'conditions': [ | |
97 ['crashpad_dependencies=="external"', { | |
98 'include_dirs': [ | |
99 '<(gtest_dir)/../..', | |
100 ], | |
101 'defines': [ | |
102 'GUNIT_NO_GOOGLE3=1', | |
103 ], | |
104 'direct_dependent_settings': { | |
105 'include_dirs': [ | |
106 '<(gtest_dir)/../..', | |
107 ], | |
108 'defines': [ | |
109 'GUNIT_NO_GOOGLE3=1', | |
110 ], | |
111 }, | |
112 }], | |
113 ], | |
114 }, | |
115 { | |
116 'target_name': 'gtest_main', | |
117 'type': 'static_library', | |
118 'dependencies': [ | |
119 'gtest', | |
120 ], | |
121 'sources': [ | |
122 '<(gtest_dir)/src/gtest_main.cc', | |
123 ], | |
124 }, | |
125 { | |
126 'target_name': 'gtest_test_executable', | |
127 'type': 'none', | |
128 'dependencies': [ | |
129 'gtest', | |
130 ], | |
131 'direct_dependent_settings': { | |
132 'type': 'executable', | |
133 'include_dirs': [ | |
134 '<(gtest_dir)', | |
135 ], | |
136 }, | |
137 'export_dependent_settings': [ | |
138 'gtest', | |
139 ], | |
140 }, | |
141 { | |
142 'target_name': 'gtest_all_test', | |
143 'dependencies': [ | |
144 'gtest_test_executable', | |
145 'gtest_main', | |
146 ], | |
147 'sources': [ | |
148 '<(gtest_dir)/test/gtest-death-test_test.cc', | |
149 '<(gtest_dir)/test/gtest-filepath_test.cc', | |
150 '<(gtest_dir)/test/gtest-linked_ptr_test.cc', | |
151 '<(gtest_dir)/test/gtest-message_test.cc', | |
152 '<(gtest_dir)/test/gtest-options_test.cc', | |
153 '<(gtest_dir)/test/gtest-port_test.cc', | |
154 '<(gtest_dir)/test/gtest-printers_test.cc', | |
155 '<(gtest_dir)/test/gtest-test-part_test.cc', | |
156 '<(gtest_dir)/test/gtest-typed-test2_test.cc', | |
157 '<(gtest_dir)/test/gtest-typed-test_test.cc', | |
158 '<(gtest_dir)/test/gtest-typed-test_test.h', | |
159 '<(gtest_dir)/test/gtest_main_unittest.cc', | |
160 '<(gtest_dir)/test/gtest_pred_impl_unittest.cc', | |
161 '<(gtest_dir)/test/gtest_prod_test.cc', | |
162 '<(gtest_dir)/test/gtest_unittest.cc', | |
163 '<(gtest_dir)/test/production.cc', | |
164 '<(gtest_dir)/test/production.h', | |
165 ], | |
166 }, | |
167 { | |
168 'target_name': 'gtest_environment_test', | |
169 'dependencies': [ | |
170 'gtest_test_executable', | |
171 ], | |
172 'sources': [ | |
173 '<(gtest_dir)/test/gtest_environment_test.cc', | |
174 ], | |
175 }, | |
176 { | |
177 'target_name': 'gtest_listener_test', | |
178 'dependencies': [ | |
179 'gtest_test_executable', | |
180 ], | |
181 'sources': [ | |
182 '<(gtest_dir)/test/gtest-listener_test.cc', | |
183 ], | |
184 }, | |
185 { | |
186 'target_name': 'gtest_no_test', | |
187 'dependencies': [ | |
188 'gtest_test_executable', | |
189 ], | |
190 'sources': [ | |
191 '<(gtest_dir)/test/gtest_no_test_unittest.cc', | |
192 ], | |
193 }, | |
194 { | |
195 'target_name': 'gtest_param_test', | |
196 'dependencies': [ | |
197 'gtest_test_executable', | |
198 ], | |
199 'sources': [ | |
200 '<(gtest_dir)/test/gtest-param-test2_test.cc', | |
201 '<(gtest_dir)/test/gtest-param-test_test.cc', | |
202 '<(gtest_dir)/test/gtest-param-test_test.h', | |
203 ], | |
204 }, | |
205 { | |
206 'target_name': 'gtest_premature_exit_test', | |
207 'dependencies': [ | |
208 'gtest_test_executable', | |
209 ], | |
210 'sources': [ | |
211 '<(gtest_dir)/test/gtest_premature_exit_test.cc', | |
212 ], | |
213 }, | |
214 { | |
215 'target_name': 'gtest_repeat_test', | |
216 'dependencies': [ | |
217 'gtest_test_executable', | |
218 ], | |
219 'sources': [ | |
220 '<(gtest_dir)/test/gtest_repeat_test.cc', | |
221 ], | |
222 }, | |
223 { | |
224 'target_name': 'gtest_sole_header_test', | |
225 'dependencies': [ | |
226 'gtest_test_executable', | |
227 'gtest_main', | |
228 ], | |
229 'sources': [ | |
230 '<(gtest_dir)/test/gtest_sole_header_test.cc', | |
231 ], | |
232 }, | |
233 { | |
234 'target_name': 'gtest_stress_test', | |
235 'dependencies': [ | |
236 'gtest_test_executable', | |
237 ], | |
238 'sources': [ | |
239 '<(gtest_dir)/test/gtest_stress_test.cc', | |
240 ], | |
241 }, | |
242 { | |
243 'target_name': 'gtest_unittest_api_test', | |
244 'dependencies': [ | |
245 'gtest_test_executable', | |
246 ], | |
247 'sources': [ | |
248 '<(gtest_dir)/test/gtest-unittest-api_test.cc', | |
249 ], | |
250 }, | |
251 { | |
252 'target_name': 'gtest_all_tests', | |
253 'type': 'none', | |
254 'dependencies': [ | |
255 'gtest_all_test', | |
256 'gtest_environment_test', | |
257 'gtest_listener_test', | |
258 'gtest_no_test', | |
259 'gtest_param_test', | |
260 'gtest_premature_exit_test', | |
261 'gtest_repeat_test', | |
262 'gtest_sole_header_test', | |
263 'gtest_stress_test', | |
264 'gtest_unittest_api_test', | |
265 ], | |
266 }, | |
267 ], | |
268 } | 290 } |
OLD | NEW |