OLD | NEW |
1 # Copyright 2014 The Crashpad Authors. All rights reserved. | 1 # Copyright 2014 The Crashpad Authors. All rights reserved. |
2 # | 2 # |
3 # Licensed under the Apache License, Version 2.0 (the "License"); | 3 # Licensed under the Apache License, Version 2.0 (the "License"); |
4 # you may not use this file except in compliance with the License. | 4 # you may not use this file except in compliance with the License. |
5 # You may obtain a copy of the License at | 5 # You may obtain a copy of the License at |
6 # | 6 # |
7 # http://www.apache.org/licenses/LICENSE-2.0 | 7 # http://www.apache.org/licenses/LICENSE-2.0 |
8 # | 8 # |
9 # Unless required by applicable law or agreed to in writing, software | 9 # Unless required by applicable law or agreed to in writing, software |
10 # distributed under the License is distributed on an "AS IS" BASIS, | 10 # distributed under the License is distributed on an "AS IS" BASIS, |
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 # See the License for the specific language governing permissions and | 12 # See the License for the specific language governing permissions and |
13 # limitations under the License. | 13 # limitations under the License. |
14 | 14 |
15 { | 15 { |
16 'includes': [ | 16 'includes': [ |
17 '../../build/crashpad_dependencies.gypi', | 17 '../../build/crashpad_dependencies.gypi', |
18 ], | 18 ], |
19 'conditions': [ | 19 'conditions': [ |
20 ['crashpad_dependencies!="chromium"', { | 20 ['1==1', { # Defer processing until crashpad_dependencies is set |
21 'variables': { | 21 'variables': { |
22 'conditions': [ | 22 'conditions': [ |
23 ['crashpad_dependencies=="standalone"', { | 23 ['crashpad_dependencies=="standalone"', { |
24 'gmock_dir': 'gtest/googlemock', | 24 'gmock_dir': 'gtest/googlemock', |
25 }, { | 25 }], |
| 26 ['crashpad_dependencies=="external"', { |
26 'gmock_dir': '../../../../gmock', | 27 'gmock_dir': '../../../../gmock', |
27 }], | 28 }], |
28 ], | 29 ], |
29 }, | 30 }, |
30 'target_defaults': { | 31 }], |
31 # gmock relies heavily on objects with static storage duration. | 32 ], |
32 'xcode_settings': { | 33 'target_defaults': { |
33 'WARNING_CFLAGS!': [ | 34 # gmock relies heavily on objects with static storage duration. |
34 '-Wexit-time-destructors', | 35 'xcode_settings': { |
35 ], | 36 'WARNING_CFLAGS!': [ |
36 }, | 37 '-Wexit-time-destructors', |
37 'cflags!': [ | 38 ], |
38 '-Wexit-time-destructors', | 39 }, |
| 40 'cflags!': [ |
| 41 '-Wexit-time-destructors', |
| 42 ], |
| 43 }, |
| 44 |
| 45 'targets': [ |
| 46 { |
| 47 'target_name': 'gmock', |
| 48 'type': 'static_library', |
| 49 'dependencies': [ |
| 50 'gtest.gyp:gtest', |
| 51 ], |
| 52 'include_dirs': [ |
| 53 '<(gmock_dir)', |
| 54 '<(gmock_dir)/include', |
| 55 ], |
| 56 'sources': [ |
| 57 '<(gmock_dir)/include/gmock/gmock-actions.h', |
| 58 '<(gmock_dir)/include/gmock/gmock-cardinalities.h', |
| 59 '<(gmock_dir)/include/gmock/gmock-generated-actions.h', |
| 60 '<(gmock_dir)/include/gmock/gmock-generated-function-mockers.h', |
| 61 '<(gmock_dir)/include/gmock/gmock-generated-matchers.h', |
| 62 '<(gmock_dir)/include/gmock/gmock-generated-nice-strict.h', |
| 63 '<(gmock_dir)/include/gmock/gmock-matchers.h', |
| 64 '<(gmock_dir)/include/gmock/gmock-more-actions.h', |
| 65 '<(gmock_dir)/include/gmock/gmock-more-matchers.h', |
| 66 '<(gmock_dir)/include/gmock/gmock-spec-builders.h', |
| 67 '<(gmock_dir)/include/gmock/gmock.h', |
| 68 '<(gmock_dir)/include/gmock/internal/custom/gmock-generated-actions.h', |
| 69 '<(gmock_dir)/include/gmock/internal/custom/gmock-matchers.h', |
| 70 '<(gmock_dir)/include/gmock/internal/custom/gmock-port.h', |
| 71 '<(gmock_dir)/include/gmock/internal/gmock-generated-internal-utils.h', |
| 72 '<(gmock_dir)/include/gmock/internal/gmock-internal-utils.h', |
| 73 '<(gmock_dir)/include/gmock/internal/gmock-port.h', |
| 74 '<(gmock_dir)/src/gmock-all.cc', |
| 75 '<(gmock_dir)/src/gmock-cardinalities.cc', |
| 76 '<(gmock_dir)/src/gmock-internal-utils.cc', |
| 77 '<(gmock_dir)/src/gmock-matchers.cc', |
| 78 '<(gmock_dir)/src/gmock-spec-builders.cc', |
| 79 '<(gmock_dir)/src/gmock.cc', |
| 80 ], |
| 81 'sources!': [ |
| 82 '<(gmock_dir)/src/gmock-all.cc', |
| 83 ], |
| 84 |
| 85 'direct_dependent_settings': { |
| 86 'include_dirs': [ |
| 87 '<(gmock_dir)/include', |
39 ], | 88 ], |
40 }, | 89 'conditions': [ |
41 | 90 ['clang!=0', { |
42 'targets': [ | 91 # The MOCK_METHODn() macros do not specify “override”, which |
43 { | 92 # triggers this warning in users: “error: 'Method' overrides a |
44 'target_name': 'gmock', | 93 # member function but is not marked 'override' |
45 'type': 'static_library', | 94 # [-Werror,-Winconsistent-missing-override]”. Suppress these |
46 'dependencies': [ | 95 # warnings, and add -Wno-unknown-warning-option because only |
47 'gtest.gyp:gtest', | 96 # recent versions of clang (trunk r220703 and later, version |
48 ], | 97 # 3.6 and later) recognize it. |
49 'include_dirs': [ | |
50 '<(gmock_dir)', | |
51 '<(gmock_dir)/include', | |
52 ], | |
53 'sources': [ | |
54 '<(gmock_dir)/include/gmock/gmock-actions.h', | |
55 '<(gmock_dir)/include/gmock/gmock-cardinalities.h', | |
56 '<(gmock_dir)/include/gmock/gmock-generated-actions.h', | |
57 '<(gmock_dir)/include/gmock/gmock-generated-function-mockers.h', | |
58 '<(gmock_dir)/include/gmock/gmock-generated-matchers.h', | |
59 '<(gmock_dir)/include/gmock/gmock-generated-nice-strict.h', | |
60 '<(gmock_dir)/include/gmock/gmock-matchers.h', | |
61 '<(gmock_dir)/include/gmock/gmock-more-actions.h', | |
62 '<(gmock_dir)/include/gmock/gmock-more-matchers.h', | |
63 '<(gmock_dir)/include/gmock/gmock-spec-builders.h', | |
64 '<(gmock_dir)/include/gmock/gmock.h', | |
65 '<(gmock_dir)/include/gmock/internal/custom/gmock-generated-actions.
h', | |
66 '<(gmock_dir)/include/gmock/internal/custom/gmock-matchers.h', | |
67 '<(gmock_dir)/include/gmock/internal/custom/gmock-port.h', | |
68 '<(gmock_dir)/include/gmock/internal/gmock-generated-internal-utils.
h', | |
69 '<(gmock_dir)/include/gmock/internal/gmock-internal-utils.h', | |
70 '<(gmock_dir)/include/gmock/internal/gmock-port.h', | |
71 '<(gmock_dir)/src/gmock-all.cc', | |
72 '<(gmock_dir)/src/gmock-cardinalities.cc', | |
73 '<(gmock_dir)/src/gmock-internal-utils.cc', | |
74 '<(gmock_dir)/src/gmock-matchers.cc', | |
75 '<(gmock_dir)/src/gmock-spec-builders.cc', | |
76 '<(gmock_dir)/src/gmock.cc', | |
77 ], | |
78 'sources!': [ | |
79 '<(gmock_dir)/src/gmock-all.cc', | |
80 ], | |
81 | |
82 'direct_dependent_settings': { | |
83 'include_dirs': [ | |
84 '<(gmock_dir)/include', | |
85 ], | |
86 'conditions': [ | 98 'conditions': [ |
87 ['clang!=0', { | 99 ['OS=="mac"', { |
88 # The MOCK_METHODn() macros do not specify “override”, which | 100 'xcode_settings': { |
89 # triggers this warning in users: “error: 'Method' overrides a | 101 'WARNING_CFLAGS': [ |
90 # member function but is not marked 'override' | 102 '-Wno-inconsistent-missing-override', |
91 # [-Werror,-Winconsistent-missing-override]”. Suppress these | 103 '-Wno-unknown-warning-option', |
92 # warnings, and add -Wno-unknown-warning-option because only | 104 ], |
93 # recent versions of clang (trunk r220703 and later, version | 105 }, |
94 # 3.6 and later) recognize it. | 106 }], |
95 'conditions': [ | 107 ['OS=="linux"', { |
96 ['OS=="mac"', { | 108 'cflags': [ |
97 'xcode_settings': { | 109 '-Wno-inconsistent-missing-override', |
98 'WARNING_CFLAGS': [ | 110 '-Wno-unknown-warning-option', |
99 '-Wno-inconsistent-missing-override', | |
100 '-Wno-unknown-warning-option', | |
101 ], | |
102 }, | |
103 }], | |
104 ['OS=="linux"', { | |
105 'cflags': [ | |
106 '-Wno-inconsistent-missing-override', | |
107 '-Wno-unknown-warning-option', | |
108 ], | |
109 }], | |
110 ], | 111 ], |
111 }], | 112 }], |
112 ], | 113 ], |
113 }, | 114 }], |
114 'export_dependent_settings': [ | 115 ], |
115 'gtest.gyp:gtest', | 116 }, |
116 ], | 117 'export_dependent_settings': [ |
117 }, | 118 'gtest.gyp:gtest', |
118 { | |
119 'target_name': 'gmock_main', | |
120 'type': 'static_library', | |
121 'dependencies': [ | |
122 'gmock', | |
123 'gtest.gyp:gtest', | |
124 ], | |
125 'sources': [ | |
126 '<(gmock_dir)/src/gmock_main.cc', | |
127 ], | |
128 }, | |
129 { | |
130 'target_name': 'gmock_test_executable', | |
131 'type': 'none', | |
132 'dependencies': [ | |
133 'gmock', | |
134 'gtest.gyp:gtest', | |
135 ], | |
136 'direct_dependent_settings': { | |
137 'type': 'executable', | |
138 'include_dirs': [ | |
139 '<(gmock_dir)', | |
140 ], | |
141 }, | |
142 'export_dependent_settings': [ | |
143 'gmock', | |
144 'gtest.gyp:gtest', | |
145 ], | |
146 }, | |
147 { | |
148 'target_name': 'gmock_all_test', | |
149 'dependencies': [ | |
150 'gmock_test_executable', | |
151 'gmock_main', | |
152 ], | |
153 'include_dirs': [ | |
154 'gtest/googletest', | |
155 ], | |
156 'sources': [ | |
157 '<(gmock_dir)/test/gmock-actions_test.cc', | |
158 '<(gmock_dir)/test/gmock-cardinalities_test.cc', | |
159 '<(gmock_dir)/test/gmock-generated-actions_test.cc', | |
160 '<(gmock_dir)/test/gmock-generated-function-mockers_test.cc', | |
161 '<(gmock_dir)/test/gmock-generated-internal-utils_test.cc', | |
162 '<(gmock_dir)/test/gmock-generated-matchers_test.cc', | |
163 '<(gmock_dir)/test/gmock-internal-utils_test.cc', | |
164 '<(gmock_dir)/test/gmock-matchers_test.cc', | |
165 '<(gmock_dir)/test/gmock-more-actions_test.cc', | |
166 '<(gmock_dir)/test/gmock-nice-strict_test.cc', | |
167 '<(gmock_dir)/test/gmock-port_test.cc', | |
168 '<(gmock_dir)/test/gmock-spec-builders_test.cc', | |
169 '<(gmock_dir)/test/gmock_test.cc', | |
170 ], | |
171 }, | |
172 { | |
173 'target_name': 'gmock_link_test', | |
174 'dependencies': [ | |
175 'gmock_test_executable', | |
176 'gmock_main', | |
177 ], | |
178 'sources': [ | |
179 '<(gmock_dir)/test/gmock_link_test.cc', | |
180 '<(gmock_dir)/test/gmock_link_test.h', | |
181 '<(gmock_dir)/test/gmock_link2_test.cc', | |
182 ], | |
183 }, | |
184 { | |
185 'target_name': 'gmock_stress_test', | |
186 'dependencies': [ | |
187 'gmock_test_executable', | |
188 ], | |
189 'sources': [ | |
190 '<(gmock_dir)/test/gmock_stress_test.cc', | |
191 ], | |
192 }, | |
193 { | |
194 'target_name': 'gmock_all_tests', | |
195 'type': 'none', | |
196 'dependencies': [ | |
197 'gmock_all_test', | |
198 'gmock_link_test', | |
199 'gmock_stress_test', | |
200 ], | |
201 }, | |
202 ], | 119 ], |
203 }, { # else: crashpad_dependencies=="chromium" | 120 }, |
204 'targets': [ | 121 { |
205 { | 122 'target_name': 'gmock_main', |
206 'target_name': 'gmock', | 123 'type': 'static_library', |
207 'type': 'none', | 124 'dependencies': [ |
208 'dependencies': [ | 125 'gmock', |
209 '<(DEPTH)/testing/gmock.gyp:gmock', | 126 'gtest.gyp:gtest', |
210 ], | |
211 'export_dependent_settings': [ | |
212 '<(DEPTH)/testing/gmock.gyp:gmock', | |
213 ], | |
214 }, | |
215 { | |
216 'target_name': 'gmock_main', | |
217 'type': 'none', | |
218 'dependencies': [ | |
219 '<(DEPTH)/testing/gmock.gyp:gmock_main', | |
220 ], | |
221 'export_dependent_settings': [ | |
222 '<(DEPTH)/testing/gmock.gyp:gmock_main', | |
223 ], | |
224 }, | |
225 ], | 127 ], |
226 }], | 128 'sources': [ |
| 129 '<(gmock_dir)/src/gmock_main.cc', |
| 130 ], |
| 131 }, |
| 132 { |
| 133 'target_name': 'gmock_test_executable', |
| 134 'type': 'none', |
| 135 'dependencies': [ |
| 136 'gmock', |
| 137 'gtest.gyp:gtest', |
| 138 ], |
| 139 'direct_dependent_settings': { |
| 140 'type': 'executable', |
| 141 'include_dirs': [ |
| 142 '<(gmock_dir)', |
| 143 ], |
| 144 }, |
| 145 'export_dependent_settings': [ |
| 146 'gmock', |
| 147 'gtest.gyp:gtest', |
| 148 ], |
| 149 }, |
| 150 { |
| 151 'target_name': 'gmock_all_test', |
| 152 'dependencies': [ |
| 153 'gmock_test_executable', |
| 154 'gmock_main', |
| 155 ], |
| 156 'include_dirs': [ |
| 157 'gtest/googletest', |
| 158 ], |
| 159 'sources': [ |
| 160 '<(gmock_dir)/test/gmock-actions_test.cc', |
| 161 '<(gmock_dir)/test/gmock-cardinalities_test.cc', |
| 162 '<(gmock_dir)/test/gmock-generated-actions_test.cc', |
| 163 '<(gmock_dir)/test/gmock-generated-function-mockers_test.cc', |
| 164 '<(gmock_dir)/test/gmock-generated-internal-utils_test.cc', |
| 165 '<(gmock_dir)/test/gmock-generated-matchers_test.cc', |
| 166 '<(gmock_dir)/test/gmock-internal-utils_test.cc', |
| 167 '<(gmock_dir)/test/gmock-matchers_test.cc', |
| 168 '<(gmock_dir)/test/gmock-more-actions_test.cc', |
| 169 '<(gmock_dir)/test/gmock-nice-strict_test.cc', |
| 170 '<(gmock_dir)/test/gmock-port_test.cc', |
| 171 '<(gmock_dir)/test/gmock-spec-builders_test.cc', |
| 172 '<(gmock_dir)/test/gmock_test.cc', |
| 173 ], |
| 174 }, |
| 175 { |
| 176 'target_name': 'gmock_link_test', |
| 177 'dependencies': [ |
| 178 'gmock_test_executable', |
| 179 'gmock_main', |
| 180 ], |
| 181 'sources': [ |
| 182 '<(gmock_dir)/test/gmock_link_test.cc', |
| 183 '<(gmock_dir)/test/gmock_link_test.h', |
| 184 '<(gmock_dir)/test/gmock_link2_test.cc', |
| 185 ], |
| 186 }, |
| 187 { |
| 188 'target_name': 'gmock_stress_test', |
| 189 'dependencies': [ |
| 190 'gmock_test_executable', |
| 191 ], |
| 192 'sources': [ |
| 193 '<(gmock_dir)/test/gmock_stress_test.cc', |
| 194 ], |
| 195 }, |
| 196 { |
| 197 'target_name': 'gmock_all_tests', |
| 198 'type': 'none', |
| 199 'dependencies': [ |
| 200 'gmock_all_test', |
| 201 'gmock_link_test', |
| 202 'gmock_stress_test', |
| 203 ], |
| 204 }, |
227 ], | 205 ], |
228 } | 206 } |
OLD | NEW |