OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'variables': { | |
7 'chromium_code': 1, | |
8 }, | |
9 'includes': [ | |
10 '../build/common_untrusted.gypi', | |
11 'gtest.gypi', | |
12 ], | |
13 'conditions': [ | |
14 ['disable_nacl==0 and disable_nacl_untrusted==0', { | |
15 'targets': [ | |
16 { | |
17 'target_name': 'gtest_nacl', | |
18 'type': 'none', | |
19 'variables': { | |
20 'nlib_target': 'libgtest_nacl.a', | |
21 'build_glibc': 0, | |
22 'build_newlib': 1, | |
23 'build_pnacl_newlib': 0, | |
24 }, | |
25 'sources': [ | |
26 '<@(gtest_sources)', | |
27 ], | |
28 'include_dirs': [ | |
29 'gtest', | |
30 'gtest/include', | |
31 ], | |
32 'defines': [ | |
33 # In order to allow regex matches in gtest to be shared between | |
34 # Windows and other systems, we tell gtest to always use it's | |
35 # internal engine. | |
36 'GTEST_HAS_POSIX_RE=0', | |
37 'GTEST_LANG_CXX11=0', | |
38 ], | |
39 'all_dependent_settings': { | |
40 'defines': [ | |
41 'GTEST_HAS_POSIX_RE=0', | |
42 'GTEST_LANG_CXX11=0', | |
43 ], | |
44 'link_flags': [ | |
45 '-lgtest_nacl', | |
46 ], | |
47 }, | |
48 'defines': [ | |
49 # gtest isn't able to figure out when RTTI is disabled for gcc | |
50 # versions older than 4.3.2, and assumes it's enabled. Our Mac | |
51 # and Linux builds disable RTTI, and cannot guarantee that the | |
52 # compiler will be 4.3.2. or newer. The Mac, for example, uses | |
53 # 4.2.1 as that is the latest available on that platform. gtest | |
54 # must be instructed that RTTI is disabled here, and for any | |
55 # direct dependents that might include gtest headers. | |
56 'GTEST_HAS_RTTI=0', | |
57 ], | |
58 'direct_dependent_settings': { | |
59 'defines': [ | |
60 'UNIT_TEST', | |
61 'GTEST_HAS_RTTI=0', | |
62 ], | |
63 'include_dirs': [ | |
64 'gtest/include', # So that gtest headers can find themselves. | |
65 ], | |
66 }, | |
67 }, | |
68 { | |
69 'target_name': 'gtest_main_nacl', | |
70 'type': 'none', | |
71 'variables': { | |
72 'nlib_target': 'libgtest_main_nacl.a', | |
73 'build_glibc': 0, | |
74 'build_newlib': 1, | |
75 'build_pnacl_newlib': 0, | |
76 }, | |
77 'dependencies': [ | |
78 'gtest_nacl', | |
79 ], | |
80 'sources': [ | |
81 'gtest/src/gtest_main.cc', | |
82 ], | |
83 'all_dependent_settings': { | |
84 'link_flags': [ | |
85 '-lgtest_main_nacl', | |
86 ], | |
87 }, | |
88 }, | |
89 ], | |
90 }], | |
91 ], | |
92 } | |
OLD | NEW |