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 "UNIT_TEST", | |
13 | 12 |
14 # In order to allow regex matches in gtest to be shared between Windows | 13 # In order to allow regex matches in gtest to be shared between Windows |
15 # and other systems, we tell gtest to always use it's internal engine. | 14 # and other systems, we tell gtest to always use it's internal engine. |
16 "GTEST_HAS_POSIX_RE=0", | 15 "GTEST_HAS_POSIX_RE=0", |
17 # Chrome doesn't support / require C++11, yet. | 16 # Chrome doesn't support / require C++11, yet. |
18 "GTEST_LANG_CXX11=0", | 17 "GTEST_LANG_CXX11=0", |
19 ] | 18 ] |
20 | 19 |
21 # Gtest headers need to be able to find themselves. | 20 # Gtest headers need to be able to find themselves. |
22 include_dirs = [ "include" ] | 21 include_dirs = [ "include" ] |
(...skipping 24 matching lines...) Expand all Loading... |
47 "GTEST_USE_OWN_TR1_TUPLE=1", | 46 "GTEST_USE_OWN_TR1_TUPLE=1", |
48 | 47 |
49 # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. | 48 # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. |
50 # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 | 49 # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 |
51 # automatically on android, so it has to be set explicitly here. | 50 # automatically on android, so it has to be set explicitly here. |
52 "GTEST_HAS_TR1_TUPLE=1", | 51 "GTEST_HAS_TR1_TUPLE=1", |
53 ] | 52 ] |
54 } | 53 } |
55 } | 54 } |
56 | 55 |
| 56 config("gtest_direct_config") { |
| 57 visibility = ":*" |
| 58 defines = [ "UNIT_TEST" ] |
| 59 } |
| 60 |
57 static_library("gtest") { | 61 static_library("gtest") { |
58 sources = [ | 62 sources = [ |
59 "include/gtest/gtest-death-test.h", | 63 "include/gtest/gtest-death-test.h", |
60 "include/gtest/gtest-message.h", | 64 "include/gtest/gtest-message.h", |
61 "include/gtest/gtest-param-test.h", | 65 "include/gtest/gtest-param-test.h", |
62 "include/gtest/gtest-printers.h", | 66 "include/gtest/gtest-printers.h", |
63 "include/gtest/gtest-spi.h", | 67 "include/gtest/gtest-spi.h", |
64 "include/gtest/gtest-test-part.h", | 68 "include/gtest/gtest-test-part.h", |
65 "include/gtest/gtest-typed-test.h", | 69 "include/gtest/gtest-typed-test.h", |
66 "include/gtest/gtest.h", | 70 "include/gtest/gtest.h", |
(...skipping 26 matching lines...) Expand all Loading... |
93 sources += [ | 97 sources += [ |
94 "../gtest_mac.h", | 98 "../gtest_mac.h", |
95 "../gtest_mac.mm", | 99 "../gtest_mac.mm", |
96 "../platform_test_mac.mm", | 100 "../platform_test_mac.mm", |
97 ] | 101 ] |
98 } | 102 } |
99 | 103 |
100 include_dirs = [ "." ] | 104 include_dirs = [ "." ] |
101 | 105 |
102 all_dependent_configs = [ ":gtest_config" ] | 106 all_dependent_configs = [ ":gtest_config" ] |
| 107 direct_dependent_configs = [ ":gtest_direct_config" ] |
103 | 108 |
104 configs -= [ "//build/config/compiler:chromium_code" ] | 109 configs -= [ "//build/config/compiler:chromium_code" ] |
105 configs += [ "//build/config/compiler:no_chromium_code" ] | 110 configs += [ "//build/config/compiler:no_chromium_code" ] |
106 } | 111 } |
107 | 112 |
108 source_set("gtest_main") { | 113 source_set("gtest_main") { |
109 sources = [ "src/gtest_main.cc" ] | 114 sources = [ "src/gtest_main.cc" ] |
110 deps = [ ":gtest" ] | 115 deps = [ ":gtest" ] |
111 } | 116 } |
OLD | NEW |