| 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 ['crashpad_dependencies!="chromium"', { | 20 ['1==1', { # Defer processing until crashpad_dependencies is set |
| 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"', { |
| 26 'gtest_dir': '../../../../gtest', | 27 'gtest_dir': '../../../../gtest', |
| 27 }], | 28 }], |
| 28 ], | 29 ], |
| 29 }, | 30 }, |
| 30 'target_defaults': { | 31 }], |
| 31 # gtest relies heavily on objects with static storage duration. | 32 ], |
| 32 'xcode_settings': { | 33 'target_defaults': { |
| 33 'WARNING_CFLAGS!': [ | 34 # gtest relies heavily on objects with static storage duration. |
| 34 '-Wexit-time-destructors', | 35 'xcode_settings': { |
| 35 ], | 36 'WARNING_CFLAGS!': [ |
| 36 }, | 37 '-Wexit-time-destructors', |
| 37 'cflags!': [ | 38 ], |
| 38 '-Wexit-time-destructors', | 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', |
| 39 ], | 94 ], |
| 40 }, | 95 }, |
| 41 | 96 'conditions': [ |
| 42 'targets': [ | 97 ['crashpad_dependencies=="external"', { |
| 43 { | |
| 44 'target_name': 'gtest', | |
| 45 'type': 'static_library', | |
| 46 'include_dirs': [ | 98 'include_dirs': [ |
| 47 '<(gtest_dir)', | 99 '<(gtest_dir)/../..', |
| 48 '<(gtest_dir)/include', | |
| 49 ], | 100 ], |
| 50 'sources': [ | 101 'defines': [ |
| 51 '<(gtest_dir)/include/gtest/gtest-death-test.h', | 102 'GUNIT_NO_GOOGLE3=1', |
| 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 ], | 103 ], |
| 88 'direct_dependent_settings': { | 104 'direct_dependent_settings': { |
| 89 'include_dirs': [ | 105 'include_dirs': [ |
| 90 '<(gtest_dir)/include', | 106 '<(gtest_dir)/../..', |
| 107 ], |
| 108 'defines': [ |
| 109 'GUNIT_NO_GOOGLE3=1', |
| 91 ], | 110 ], |
| 92 }, | 111 }, |
| 93 'conditions': [ | 112 }], |
| 94 ['crashpad_dependencies=="external"', { | 113 ], |
| 95 'include_dirs': [ | 114 }, |
| 96 '<(gtest_dir)/../..', | 115 { |
| 97 ], | 116 'target_name': 'gtest_main', |
| 98 'defines': [ | 117 'type': 'static_library', |
| 99 'GUNIT_NO_GOOGLE3=1', | 118 'dependencies': [ |
| 100 ], | 119 'gtest', |
| 101 'direct_dependent_settings': { | 120 ], |
| 102 'include_dirs': [ | 121 'sources': [ |
| 103 '<(gtest_dir)/../..', | 122 '<(gtest_dir)/src/gtest_main.cc', |
| 104 ], | 123 ], |
| 105 'defines': [ | 124 }, |
| 106 'GUNIT_NO_GOOGLE3=1', | 125 { |
| 107 ], | 126 'target_name': 'gtest_test_executable', |
| 108 }, | 127 'type': 'none', |
| 109 }], | 128 'dependencies': [ |
| 110 ], | 129 'gtest', |
| 111 }, | 130 ], |
| 112 { | 131 'direct_dependent_settings': { |
| 113 'target_name': 'gtest_main', | 132 'type': 'executable', |
| 114 'type': 'static_library', | 133 'include_dirs': [ |
| 115 'dependencies': [ | 134 '<(gtest_dir)', |
| 116 'gtest', | 135 ], |
| 117 ], | 136 }, |
| 118 'sources': [ | 137 'export_dependent_settings': [ |
| 119 '<(gtest_dir)/src/gtest_main.cc', | 138 'gtest', |
| 120 ], | 139 ], |
| 121 }, | 140 }, |
| 122 { | 141 { |
| 123 'target_name': 'gtest_test_executable', | 142 'target_name': 'gtest_all_test', |
| 124 'type': 'none', | 143 'dependencies': [ |
| 125 'dependencies': [ | 144 'gtest_test_executable', |
| 126 'gtest', | 145 'gtest_main', |
| 127 ], | 146 ], |
| 128 'direct_dependent_settings': { | 147 'sources': [ |
| 129 'type': 'executable', | 148 '<(gtest_dir)/test/gtest-death-test_test.cc', |
| 130 'include_dirs': [ | 149 '<(gtest_dir)/test/gtest-filepath_test.cc', |
| 131 '<(gtest_dir)', | 150 '<(gtest_dir)/test/gtest-linked_ptr_test.cc', |
| 132 ], | 151 '<(gtest_dir)/test/gtest-message_test.cc', |
| 133 }, | 152 '<(gtest_dir)/test/gtest-options_test.cc', |
| 134 'export_dependent_settings': [ | 153 '<(gtest_dir)/test/gtest-port_test.cc', |
| 135 'gtest', | 154 '<(gtest_dir)/test/gtest-printers_test.cc', |
| 136 ], | 155 '<(gtest_dir)/test/gtest-test-part_test.cc', |
| 137 }, | 156 '<(gtest_dir)/test/gtest-typed-test2_test.cc', |
| 138 { | 157 '<(gtest_dir)/test/gtest-typed-test_test.cc', |
| 139 'target_name': 'gtest_all_test', | 158 '<(gtest_dir)/test/gtest-typed-test_test.h', |
| 140 'dependencies': [ | 159 '<(gtest_dir)/test/gtest_main_unittest.cc', |
| 141 'gtest_test_executable', | 160 '<(gtest_dir)/test/gtest_pred_impl_unittest.cc', |
| 142 'gtest_main', | 161 '<(gtest_dir)/test/gtest_prod_test.cc', |
| 143 ], | 162 '<(gtest_dir)/test/gtest_unittest.cc', |
| 144 'sources': [ | 163 '<(gtest_dir)/test/production.cc', |
| 145 '<(gtest_dir)/test/gtest-death-test_test.cc', | 164 '<(gtest_dir)/test/production.h', |
| 146 '<(gtest_dir)/test/gtest-filepath_test.cc', | 165 ], |
| 147 '<(gtest_dir)/test/gtest-linked_ptr_test.cc', | 166 }, |
| 148 '<(gtest_dir)/test/gtest-message_test.cc', | 167 { |
| 149 '<(gtest_dir)/test/gtest-options_test.cc', | 168 'target_name': 'gtest_environment_test', |
| 150 '<(gtest_dir)/test/gtest-port_test.cc', | 169 'dependencies': [ |
| 151 '<(gtest_dir)/test/gtest-printers_test.cc', | 170 'gtest_test_executable', |
| 152 '<(gtest_dir)/test/gtest-test-part_test.cc', | 171 ], |
| 153 '<(gtest_dir)/test/gtest-typed-test2_test.cc', | 172 'sources': [ |
| 154 '<(gtest_dir)/test/gtest-typed-test_test.cc', | 173 '<(gtest_dir)/test/gtest_environment_test.cc', |
| 155 '<(gtest_dir)/test/gtest-typed-test_test.h', | 174 ], |
| 156 '<(gtest_dir)/test/gtest_main_unittest.cc', | 175 }, |
| 157 '<(gtest_dir)/test/gtest_pred_impl_unittest.cc', | 176 { |
| 158 '<(gtest_dir)/test/gtest_prod_test.cc', | 177 'target_name': 'gtest_listener_test', |
| 159 '<(gtest_dir)/test/gtest_unittest.cc', | 178 'dependencies': [ |
| 160 '<(gtest_dir)/test/production.cc', | 179 'gtest_test_executable', |
| 161 '<(gtest_dir)/test/production.h', | 180 ], |
| 162 ], | 181 'sources': [ |
| 163 }, | 182 '<(gtest_dir)/test/gtest-listener_test.cc', |
| 164 { | 183 ], |
| 165 'target_name': 'gtest_environment_test', | 184 }, |
| 166 'dependencies': [ | 185 { |
| 167 'gtest_test_executable', | 186 'target_name': 'gtest_no_test', |
| 168 ], | 187 'dependencies': [ |
| 169 'sources': [ | 188 'gtest_test_executable', |
| 170 '<(gtest_dir)/test/gtest_environment_test.cc', | 189 ], |
| 171 ], | 190 'sources': [ |
| 172 }, | 191 '<(gtest_dir)/test/gtest_no_test_unittest.cc', |
| 173 { | 192 ], |
| 174 'target_name': 'gtest_listener_test', | 193 }, |
| 175 'dependencies': [ | 194 { |
| 176 'gtest_test_executable', | 195 'target_name': 'gtest_param_test', |
| 177 ], | 196 'dependencies': [ |
| 178 'sources': [ | 197 'gtest_test_executable', |
| 179 '<(gtest_dir)/test/gtest-listener_test.cc', | 198 ], |
| 180 ], | 199 'sources': [ |
| 181 }, | 200 '<(gtest_dir)/test/gtest-param-test2_test.cc', |
| 182 { | 201 '<(gtest_dir)/test/gtest-param-test_test.cc', |
| 183 'target_name': 'gtest_no_test', | 202 '<(gtest_dir)/test/gtest-param-test_test.h', |
| 184 'dependencies': [ | 203 ], |
| 185 'gtest_test_executable', | 204 }, |
| 186 ], | 205 { |
| 187 'sources': [ | 206 'target_name': 'gtest_premature_exit_test', |
| 188 '<(gtest_dir)/test/gtest_no_test_unittest.cc', | 207 'dependencies': [ |
| 189 ], | 208 'gtest_test_executable', |
| 190 }, | 209 ], |
| 191 { | 210 'sources': [ |
| 192 'target_name': 'gtest_param_test', | 211 '<(gtest_dir)/test/gtest_premature_exit_test.cc', |
| 193 'dependencies': [ | 212 ], |
| 194 'gtest_test_executable', | 213 }, |
| 195 ], | 214 { |
| 196 'sources': [ | 215 'target_name': 'gtest_repeat_test', |
| 197 '<(gtest_dir)/test/gtest-param-test2_test.cc', | 216 'dependencies': [ |
| 198 '<(gtest_dir)/test/gtest-param-test_test.cc', | 217 'gtest_test_executable', |
| 199 '<(gtest_dir)/test/gtest-param-test_test.h', | 218 ], |
| 200 ], | 219 'sources': [ |
| 201 }, | 220 '<(gtest_dir)/test/gtest_repeat_test.cc', |
| 202 { | 221 ], |
| 203 'target_name': 'gtest_premature_exit_test', | 222 }, |
| 204 'dependencies': [ | 223 { |
| 205 'gtest_test_executable', | 224 'target_name': 'gtest_sole_header_test', |
| 206 ], | 225 'dependencies': [ |
| 207 'sources': [ | 226 'gtest_test_executable', |
| 208 '<(gtest_dir)/test/gtest_premature_exit_test.cc', | 227 'gtest_main', |
| 209 ], | 228 ], |
| 210 }, | 229 'sources': [ |
| 211 { | 230 '<(gtest_dir)/test/gtest_sole_header_test.cc', |
| 212 'target_name': 'gtest_repeat_test', | 231 ], |
| 213 'dependencies': [ | 232 }, |
| 214 'gtest_test_executable', | 233 { |
| 215 ], | 234 'target_name': 'gtest_stress_test', |
| 216 'sources': [ | 235 'dependencies': [ |
| 217 '<(gtest_dir)/test/gtest_repeat_test.cc', | 236 'gtest_test_executable', |
| 218 ], | 237 ], |
| 219 }, | 238 'sources': [ |
| 220 { | 239 '<(gtest_dir)/test/gtest_stress_test.cc', |
| 221 'target_name': 'gtest_sole_header_test', | 240 ], |
| 222 'dependencies': [ | 241 }, |
| 223 'gtest_test_executable', | 242 { |
| 224 'gtest_main', | 243 'target_name': 'gtest_unittest_api_test', |
| 225 ], | 244 'dependencies': [ |
| 226 'sources': [ | 245 'gtest_test_executable', |
| 227 '<(gtest_dir)/test/gtest_sole_header_test.cc', | 246 ], |
| 228 ], | 247 'sources': [ |
| 229 }, | 248 '<(gtest_dir)/test/gtest-unittest-api_test.cc', |
| 230 { | 249 ], |
| 231 'target_name': 'gtest_stress_test', | 250 }, |
| 232 'dependencies': [ | 251 { |
| 233 'gtest_test_executable', | 252 'target_name': 'gtest_all_tests', |
| 234 ], | 253 'type': 'none', |
| 235 'sources': [ | 254 'dependencies': [ |
| 236 '<(gtest_dir)/test/gtest_stress_test.cc', | 255 'gtest_all_test', |
| 237 ], | 256 'gtest_environment_test', |
| 238 }, | 257 'gtest_listener_test', |
| 239 { | 258 'gtest_no_test', |
| 240 'target_name': 'gtest_unittest_api_test', | 259 'gtest_param_test', |
| 241 'dependencies': [ | 260 'gtest_premature_exit_test', |
| 242 'gtest_test_executable', | 261 'gtest_repeat_test', |
| 243 ], | 262 'gtest_sole_header_test', |
| 244 'sources': [ | 263 'gtest_stress_test', |
| 245 '<(gtest_dir)/test/gtest-unittest-api_test.cc', | 264 'gtest_unittest_api_test', |
| 246 ], | 265 ], |
| 247 }, | 266 }, |
| 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 ], | |
| 288 }], | |
| 289 ], | 267 ], |
| 290 } | 268 } |
| OLD | NEW |