Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn

Issue 25698002: (mostly) working wtf / wtf_unittests gn targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/secondary/testing/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 config("wtf-config") {
6 include_dirs = [ ".." ]
7 if (is_win) {
8 include_dirs += [ "os-win32" ]
9 defines += [
10 "__STD_C",
11 "_CRT_SECURE_NO_DEPRECATE",
12 "_SCL_SECURE_NO_DEPRECATE",
13 "CRASH=__debugbreak",
14 ]
15 # # Chromium windows multi-dll build enables c++ exception and this
16 # # causes wtf generates 4291 warning due to operator new/delete
17 # # implementations. Disable the warning for chromium windows
18 # # multi-dll build.
19 # 'msvs_disabled_warnings': [4291],
20 # 'direct_dependent_settings': {
21 # 'msvs_disabled_warnings': [4291],
22 # },
23 }
24
25 if (is_linux) { # (gcc_version >= 46) {
26 # Disable warnings about c++0x compatibility, as some names (such as
27 # nullptr) conflict with upcoming c++0x types.
28 cflags_cc += [ "-Wno-c++0x-compat" ]
29 }
30
31 # # Some warnings occur in WTF headers, so they must also be disabled
32 # # in targets that use WTF.
33 # 'msvs_disabled_warnings': [
34 # # Don't complain about calling specific versions of templatized
35 # # functions (e.g. in RefPtrHashMap.h).
36 # 4344,
37 # # Don't complain about using "this" in an initializer list
38 # # (e.g. in StringImpl.h).
39 # 4355,
40 # # Disable c4267 warnings until we fix size_t to int truncations.
41 # 4267,
42 # ],
43
44 }
45
46 component("wtf") {
47 configs -= [ "//build/config/compiler:chromium_code" ]
48 configs += [
49 "//build/config/compiler:no_chromium_code",
50 ":wtf-config"
51 ]
52
53 defines = [ "WTF_IMPLEMENTATION=1" ]
54 deps = [
55 "//third_party/icu:icui18n",
56 "//third_party/icu:icuuc",
57 ]
58
59 sources = [
brettw 2013/10/18 17:22:58 I've been putting sources at the top of the compon
60 "ASCIICType.h",
61 "Alignment.h",
62 "ArrayBuffer.cpp",
63 "ArrayBuffer.h",
64 "ArrayBufferContents.cpp",
65 "ArrayBufferContents.h",
66 "ArrayBufferDeallocationObserver.h",
67 "ArrayBufferView.cpp",
68 "ArrayBufferView.h",
69 "Assertions.cpp",
70 "Assertions.h",
71 "Atomics.h",
72 "AutodrainedPool.h",
73 "BitArray.h",
74 "BitVector.cpp",
75 "BitVector.h",
76 "BloomFilter.h",
77 "ByteOrder.h",
78 "CPU.h",
79 "CheckedArithmetic.h",
80 "Compiler.h",
81 "Complex.h",
82 "CryptographicallyRandomNumber.cpp",
83 "CryptographicallyRandomNumber.h",
84 "CurrentTime.cpp",
85 "CurrentTime.h",
86 "DataLog.cpp",
87 "DataLog.h",
88 "DateMath.cpp",
89 "DateMath.h",
90 "DecimalNumber.cpp",
91 "DecimalNumber.h",
92 "Deque.h",
93 "DoublyLinkedList.h",
94 "DynamicAnnotations.cpp",
95 "DynamicAnnotations.h",
96 "FastAllocBase.h",
97 "FastMalloc.cpp",
98 "FastMalloc.h",
99 "FilePrintStream.cpp",
100 "FilePrintStream.h",
101 "Float32Array.h",
102 "Float64Array.h",
103 "Forward.h",
104 "Functional.h",
105 "GetPtr.h",
106 "GregorianDateTime.cpp",
107 "GregorianDateTime.h",
108 "HashCountedSet.h",
109 "HashFunctions.h",
110 "HashIterators.h",
111 "HashMap.h",
112 "HashSet.h",
113 "HashTable.cpp",
114 "HashTable.h",
115 "HashTableDeletedValueType.h",
116 "HashTraits.h",
117 "HexNumber.h",
118 "Int16Array.h",
119 "Int32Array.h",
120 "Int8Array.h",
121 "IntegralTypedArrayBase.h",
122 "LeakAnnotations.h",
123 "LinkedStack.h",
124 "ListHashSet.h",
125 "Locker.h",
126 "MainThread.cpp",
127 "MainThread.h",
128 "MallocZoneSupport.h",
129 "MathExtras.h",
130 "MessageQueue.h",
131 "NonCopyingSort.h",
132 "Noncopyable.h",
133 "NotFound.h",
134 "NullPtr.cpp",
135 "NullPtr.h",
136 "NumberOfCores.cpp",
137 "NumberOfCores.h",
138 "OwnPtr.h",
139 "OwnPtrCommon.h",
140 "PageAllocator.cpp",
141 "PageAllocator.h",
142 "ParallelJobs.h",
143 "ParallelJobsGeneric.cpp",
144 "ParallelJobsGeneric.h",
145 "ParallelJobsLibdispatch.h",
146 "PartitionAlloc.cpp",
147 "PartitionAlloc.h",
148 "PassOwnPtr.h",
149 "PassRefPtr.h",
150 "PassTraits.h",
151 "PrintStream.cpp",
152 "PrintStream.h",
153 "ProcessID.h",
154 "QuantizedAllocation.cpp",
155 "QuantizedAllocation.h",
156 "RefCounted.h",
157 "RefCountedLeakCounter.cpp",
158 "RefCountedLeakCounter.h",
159 "RefPtr.h",
160 "RefPtrHashMap.h",
161 "RetainPtr.h",
162 "SHA1.cpp",
163 "SHA1.h",
164 "SaturatedArithmetic.h",
165 "SizeLimits.cpp",
166 "SpinLock.h",
167 "StaticConstructors.h",
168 "StdLibExtras.h",
169 "StringExtras.h",
170 "StringHasher.h",
171 "TemporaryChange.h",
172 "ThreadFunctionInvocation.h",
173 "ThreadRestrictionVerifier.h",
174 "ThreadSafeRefCounted.h",
175 "ThreadSpecific.h",
176 "Threading.cpp",
177 "Threading.h",
178 "ThreadingPrimitives.h",
179 "TypeTraits.cpp",
180 "TypeTraits.h",
181 "TypedArrayBase.h",
182 "Uint16Array.h",
183 "Uint32Array.h",
184 "Uint8Array.h",
185 "UnusedParam.h",
186 "VMTags.h",
187 "Vector.h",
188 "VectorTraits.h",
189 "WTF.cpp",
190 "WTF.h",
191 "WTFExport.h",
192 "WTFThreadData.cpp",
193 "WTFThreadData.h",
194 "WeakPtr.h",
195 "dtoa.cpp",
196 "dtoa.h",
197 "dtoa/bignum-dtoa.cc",
198 "dtoa/bignum-dtoa.h",
199 "dtoa/bignum.cc",
200 "dtoa/bignum.h",
201 "dtoa/cached-powers.cc",
202 "dtoa/cached-powers.h",
203 "dtoa/diy-fp.cc",
204 "dtoa/diy-fp.h",
205 "dtoa/double-conversion.cc",
206 "dtoa/double-conversion.h",
207 "dtoa/double.h",
208 "dtoa/fast-dtoa.cc",
209 "dtoa/fast-dtoa.h",
210 "dtoa/fixed-dtoa.cc",
211 "dtoa/fixed-dtoa.h",
212 "dtoa/strtod.cc",
213 "dtoa/strtod.h",
214 "dtoa/utils.h",
215 "text/ASCIIFastPath.h",
216 "text/AtomicString.cpp",
217 "text/AtomicString.h",
218 "text/AtomicStringHash.h",
219 "text/Base64.cpp",
220 "text/Base64.h",
221 "text/CString.cpp",
222 "text/CString.h",
223 "text/IntegerToStringConversion.h",
224 "text/StringBuffer.h",
225 "text/StringBuilder.cpp",
226 "text/StringBuilder.h",
227 "text/StringConcatenate.h",
228 "text/StringHash.h",
229 "text/StringImpl.cpp",
230 "text/StringImpl.h",
231 "text/StringOperators.h",
232 "text/StringStatics.cpp",
233 "text/StringUTF8Adaptor.h",
234 "text/StringView.h",
235 "text/TextCodec.cpp",
236 "text/TextCodecASCIIFastPath.h",
237 "text/TextCodecICU.cpp",
238 "text/TextCodecLatin1.cpp",
239 "text/TextCodecUTF16.cpp",
240 "text/TextCodecUTF8.cpp",
241 "text/TextCodecUTF8.h",
242 "text/TextCodecUserDefined.cpp",
243 "text/TextEncoding.cpp",
244 "text/TextEncodingRegistry.cpp",
245 "text/TextPosition.cpp",
246 "text/TextPosition.h",
247 "text/WTFString.cpp",
248 "text/WTFString.h",
249 "unicode/CharacterNames.h",
250 "unicode/Collator.h",
251 "unicode/UTF8.cpp",
252 "unicode/UTF8.h",
253 "unicode/Unicode.h",
254 "unicode/icu/CollatorICU.cpp",
255 "unicode/icu/UnicodeIcu.h",
256 ]
257
258 # # Disable c4267 warnings until we fix size_t to int truncations.
259 # 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
260
261 if (is_android) {
262 ldflags += [ "-llog" ]
263 }
264
265 if (is_mac) {
266 # 'link_settings': {
267 # 'libraries': [
268 # '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
269 # '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
270 # ]
271 # }
272 sources += [
273 # mac is the only OS that uses WebKit's copy of TCMalloc.
274 "TCPackedCache.h",
275 "TCPageMap.h",
276 "TCSpinLock.h",
277 "TCSystemAlloc.cpp",
278 "TCSystemAlloc.h",
279
280 "AutodrainedPoolMac.mm",
281 "text/AtomicStringCF.cpp",
282 "text/StringCF.cpp",
283 "text/StringImplCF.cpp",
284 "text/StringImplMac.mm",
285 "text/StringMac.mm",
286 ]
287 }
288
289 if (is_win) {
290 sources += [
291 "ThreadSpecificWin.cpp",
292 "ThreadingWin.cpp",
293 ]
294 include_dirs -= [
295 # "<(SHARED_INTERMEDIATE_DIR)/blink',
296 ]
297 if (is_component_build) {
brettw 2013/10/18 17:22:58 Remove this?
298 }
299 } else {
300 sources += [
301 "ThreadIdentifierDataPthreads.cpp",
302 "ThreadIdentifierDataPthreads.h",
303 "ThreadingPthreads.cpp",
304 ]
305 }
306 }
307
308 static_library("run_all_tests") {
309 configs -= [ "//build/config/compiler:chromium_code" ]
310 configs += [
311 ":wtf-config"
brettw 2013/10/18 17:22:58 Indenting.
312 "//build/config/compiler:no_chromium_code",
313 ]
314
315 deps = [
316 "//base:test_support_base",
317 "//testing:gmock",
318 "//testing:gtest",
319 ":wtf"
320 ]
321
322 direct_dependent_configs = [
323 "//testing:gtest_config"
brettw 2013/10/18 17:22:58 I'd put a comma here, or use the one-line format w
324 ]
325
326 sources = [
brettw 2013/10/18 17:22:58 Sources first.
327 "testing/RunAllTests.cpp",
328 ]
329 }
330
331 executable("wtf_unittests") {
332 configs -= [ "//build/config/compiler:chromium_code" ]
333 configs += [
334 ":wtf-config"
brettw 2013/10/18 17:22:58 Indenting.
335 "//build/config/compiler:no_chromium_code",
336 "//third_party/icu:icu_config",
337 ]
338
339 deps = [
340 ":run_all_tests"
341 ]
342
343 sources = [
brettw 2013/10/18 17:22:58 Sources first.
344 "CheckedArithmeticTest.cpp",
345 "FunctionalTest.cpp",
346 "HashMapTest.cpp",
347 "HashSetTest.cpp",
348 "ListHashSetTest.cpp",
349 "MathExtrasTest.cpp",
350 "PartitionAllocTest.cpp",
351 "SHA1Test.cpp",
352 "SaturatedArithmeticTest.cpp",
353 "SpinLockTest.cpp",
354 "StringExtrasTest.cpp",
355 "StringHasherTest.cpp",
356 "TemporaryChangeTest.cpp",
357 "VectorTest.cpp",
358 "testing/WTFTestHelpers.h",
359 "text/CStringTest.cpp",
360 "text/StringBuilderTest.cpp",
361 "text/StringImplTest.cpp",
362 "text/StringOperatorsTest.cpp",
363 "text/WTFStringTest.cpp",
364 ]
365
366 # # Disable c4267 warnings until we fix size_t to int truncations.
367 # 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
368
369 # if (is_linux && use_tcmalloc) {
370 # deps += [
371 # "//base:base",
372 # "//base/allocator:allocator",
373 # ],
374 # }
375 }
OLDNEW
« no previous file with comments | « tools/gn/secondary/testing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698