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 = [ "UNIT_TEST" ] | 6 defines = [ |
7 "UNIT_TEST", | |
8 "GTEST_HAS_POSIX_RE=0", | |
9 "GTEST_HAS_RTTI=0", | |
10 ] | |
11 | |
7 include_dirs = [ "include" ] # Gtest headers need to be able to find themselv es. | 12 include_dirs = [ "include" ] # Gtest headers need to be able to find themselv es. |
brettw
2014/01/06 20:41:29
Can you fix this long line while you're here (prob
tfarina
2014/01/06 22:48:15
Done.
| |
13 | |
8 if (is_win) { | 14 if (is_win) { |
9 cflags = [ "/wd4800" ] # Unused variable warning. | 15 cflags = [ "/wd4800" ] # Unused variable warning. |
10 } | 16 } |
11 } | 17 } |
12 | 18 |
13 static_library("gtest") { | 19 static_library("gtest") { |
14 external = true | 20 external = true |
15 gyp_file = "gtest.gyp" | 21 gyp_file = "gtest.gyp" |
16 sources = [ | 22 sources = [ |
17 "include/gtest/gtest-death-test.h", | 23 "include/gtest/gtest-death-test.h", |
(...skipping 22 matching lines...) Expand all Loading... | |
40 "src/gtest-port.cc", | 46 "src/gtest-port.cc", |
41 "src/gtest-printers.cc", | 47 "src/gtest-printers.cc", |
42 "src/gtest-test-part.cc", | 48 "src/gtest-test-part.cc", |
43 "src/gtest-typed-test.cc", | 49 "src/gtest-typed-test.cc", |
44 "src/gtest.cc", | 50 "src/gtest.cc", |
45 "../multiprocess_func_list.cc", | 51 "../multiprocess_func_list.cc", |
46 "../multiprocess_func_list.h", | 52 "../multiprocess_func_list.h", |
47 "../platform_test.h", | 53 "../platform_test.h", |
48 ] | 54 ] |
49 | 55 |
56 defines = [ | |
57 # In order to allow regex matches in gtest to be shared between Windows | |
58 # and other systems, we tell gtest to always use it's internal engine. | |
59 "GTEST_HAS_POSIX_RE=0", | |
brettw
2014/01/06 20:41:29
You don't need this, same reason as below.
tfarina
2014/01/06 22:48:15
Done.
| |
60 ] | |
61 | |
62 if (is_posix) { | |
63 defines += [ | |
64 # gtest isn't able to figure out when RTTI is disabled for gcc | |
65 # versions older than 4.3.2, and assumes it's enabled. Our Mac | |
66 # and Linux builds disable RTTI, and cannot guarantee that the | |
67 # compiler will be 4.3.2. or newer. The Mac, for example, uses | |
68 # 4.2.1 as that is the latest available on that platform. gtest | |
69 # must be instructed that RTTI is disabled here, and for any | |
70 # direct dependents that might include gtest headers. | |
71 "GTEST_HAS_RTTI=0", | |
brettw
2014/01/06 20:41:29
You don't need this since it's on the config, and
tfarina
2014/01/06 22:48:15
Done.
| |
72 ] | |
73 direct_dependent_configs = [ ":gtest_config" ] | |
brettw
2014/01/06 20:41:29
You don't need this since you add it below.
tfarina
2014/01/06 22:48:15
Done.
| |
74 } | |
75 | |
50 if (is_mac) { | 76 if (is_mac) { |
51 sources += [ | 77 sources += [ |
52 "gtest_mac.h", | 78 "gtest_mac.h", |
53 "gtest_mac.mm", | 79 "gtest_mac.mm", |
54 "platform_test_mac.mm", | 80 "platform_test_mac.mm", |
55 ] | 81 ] |
56 } | 82 } |
57 | 83 |
58 include_dirs = [ "." ] | 84 include_dirs = [ "." ] |
59 direct_dependent_configs = [ ":gtest_config" ] | 85 all_dependent_configs = [ ":gtest_config" ] |
86 direct_dependent_configs += [ ":gtest_config" ] | |
brettw
2014/01/06 20:41:29
You don't need this since 'all' handles everything
tfarina
2014/01/06 22:48:15
Done.
| |
60 | 87 |
61 configs -= "//build/config/compiler:chromium_code" | 88 configs -= "//build/config/compiler:chromium_code" |
62 configs += "//build/config/compiler:no_chromium_code" | 89 configs += "//build/config/compiler:no_chromium_code" |
63 } | 90 } |
OLD | NEW |