| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 visibility = [ | 6 visibility = [ |
| 7 ":*", | 7 ":*", |
| 8 "//testing/gmock:*", # gmock also shares this config. | 8 "//testing/gmock:*", # gmock also shares this config. |
| 9 ] | 9 ] |
| 10 | 10 |
| 11 defines = [ | 11 defines = [ |
| 12 # In order to allow regex matches in gtest to be shared between Windows | 12 # In order to allow regex matches in gtest to be shared between Windows |
| 13 # and other systems, we tell gtest to always use it's internal engine. | 13 # and other systems, we tell gtest to always use it's internal engine. |
| 14 "GTEST_HAS_POSIX_RE=0", | 14 "GTEST_HAS_POSIX_RE=0", |
| 15 | 15 |
| 16 # Chrome doesn't support / require C++11, yet. | 16 # Chrome doesn't support / require C++11, yet. |
| 17 "GTEST_LANG_CXX11=0", | 17 "GTEST_LANG_CXX11=0", |
| 18 ] | 18 ] |
| 19 | 19 |
| 20 # Gtest headers need to be able to find themselves. | 20 # Gtest headers need to be able to find themselves. |
| 21 include_dirs = [ "include" ] | 21 include_dirs = [ "include" ] |
| 22 | 22 |
| 23 if (is_win) { | |
| 24 cflags = [ "/wd4800" ] # Unused variable warning. | |
| 25 } | |
| 26 | |
| 27 if (is_posix) { | 23 if (is_posix) { |
| 28 defines += [ | 24 defines += [ |
| 29 # gtest isn't able to figure out when RTTI is disabled for gcc | 25 # gtest isn't able to figure out when RTTI is disabled for gcc |
| 30 # versions older than 4.3.2, and assumes it's enabled. Our Mac | 26 # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 31 # and Linux builds disable RTTI, and cannot guarantee that the | 27 # and Linux builds disable RTTI, and cannot guarantee that the |
| 32 # compiler will be 4.3.2. or newer. The Mac, for example, uses | 28 # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 33 # 4.2.1 as that is the latest available on that platform. gtest | 29 # 4.2.1 as that is the latest available on that platform. gtest |
| 34 # must be instructed that RTTI is disabled here, and for any | 30 # must be instructed that RTTI is disabled here, and for any |
| 35 # direct dependents that might include gtest headers. | 31 # direct dependents that might include gtest headers. |
| 36 "GTEST_HAS_RTTI=0", | 32 "GTEST_HAS_RTTI=0", |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 source_set("gtest_main") { | 112 source_set("gtest_main") { |
| 117 # TODO http://crbug.com/412064 enable this flag all the time. | 113 # TODO http://crbug.com/412064 enable this flag all the time. |
| 118 testonly = !is_component_build | 114 testonly = !is_component_build |
| 119 sources = [ | 115 sources = [ |
| 120 "src/gtest_main.cc", | 116 "src/gtest_main.cc", |
| 121 ] | 117 ] |
| 122 deps = [ | 118 deps = [ |
| 123 ":gtest", | 119 ":gtest", |
| 124 ] | 120 ] |
| 125 } | 121 } |
| OLD | NEW |