| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 config("gtest_config") { | 5 config("gtest_config") { |
| 6 defines = [ | 6 defines = [ |
| 7 "UNIT_TEST", | 7 "UNIT_TEST", |
| 8 | 8 |
| 9 # In order to allow regex matches in gtest to be shared between Windows | 9 # In order to allow regex matches in gtest to be shared between Windows |
| 10 # and other systems, we tell gtest to always use it's internal engine. | 10 # and other systems, we tell gtest to always use it's internal engine. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 # gtest isn't able to figure out when RTTI is disabled for gcc | 23 # gtest isn't able to figure out when RTTI is disabled for gcc |
| 24 # versions older than 4.3.2, and assumes it's enabled. Our Mac | 24 # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 25 # and Linux builds disable RTTI, and cannot guarantee that the | 25 # and Linux builds disable RTTI, and cannot guarantee that the |
| 26 # compiler will be 4.3.2. or newer. The Mac, for example, uses | 26 # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 27 # 4.2.1 as that is the latest available on that platform. gtest | 27 # 4.2.1 as that is the latest available on that platform. gtest |
| 28 # must be instructed that RTTI is disabled here, and for any | 28 # must be instructed that RTTI is disabled here, and for any |
| 29 # direct dependents that might include gtest headers. | 29 # direct dependents that might include gtest headers. |
| 30 "GTEST_HAS_RTTI=0", | 30 "GTEST_HAS_RTTI=0", |
| 31 ] | 31 ] |
| 32 } | 32 } |
| 33 |
| 34 if (is_android) { |
| 35 defines += [ |
| 36 # We want gtest features that use tr1::tuple, but we currently |
| 37 # don't support the variadic templates used by libstdc++'s |
| 38 # implementation. gtest supports this scenario by providing its |
| 39 # own implementation but we must opt in to it. |
| 40 "GTEST_USE_OWN_TR1_TUPLE=1", |
| 41 |
| 42 # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. |
| 43 # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 |
| 44 # automatically on android, so it has to be set explicitly here. |
| 45 "GTEST_HAS_TR1_TUPLE=1", |
| 46 ] |
| 47 } |
| 33 } | 48 } |
| 34 | 49 |
| 35 static_library("gtest") { | 50 static_library("gtest") { |
| 36 sources = [ | 51 sources = [ |
| 37 "include/gtest/gtest-death-test.h", | 52 "include/gtest/gtest-death-test.h", |
| 38 "include/gtest/gtest-message.h", | 53 "include/gtest/gtest-message.h", |
| 39 "include/gtest/gtest-param-test.h", | 54 "include/gtest/gtest-param-test.h", |
| 40 "include/gtest/gtest-printers.h", | 55 "include/gtest/gtest-printers.h", |
| 41 "include/gtest/gtest-spi.h", | 56 "include/gtest/gtest-spi.h", |
| 42 "include/gtest/gtest-test-part.h", | 57 "include/gtest/gtest-test-part.h", |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 ] | 90 ] |
| 76 } | 91 } |
| 77 | 92 |
| 78 include_dirs = [ "." ] | 93 include_dirs = [ "." ] |
| 79 | 94 |
| 80 all_dependent_configs = [ ":gtest_config" ] | 95 all_dependent_configs = [ ":gtest_config" ] |
| 81 | 96 |
| 82 configs -= [ "//build/config/compiler:chromium_code" ] | 97 configs -= [ "//build/config/compiler:chromium_code" ] |
| 83 configs += [ "//build/config/compiler:no_chromium_code" ] | 98 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 84 } | 99 } |
| OLD | NEW |