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

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: formatting 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 sources = [
48 "ASCIICType.h",
49 "Alignment.h",
50 "ArrayBuffer.cpp",
51 "ArrayBuffer.h",
52 "ArrayBufferContents.cpp",
53 "ArrayBufferContents.h",
54 "ArrayBufferDeallocationObserver.h",
55 "ArrayBufferView.cpp",
56 "ArrayBufferView.h",
57 "Assertions.cpp",
58 "Assertions.h",
59 "Atomics.h",
60 "AutodrainedPool.h",
61 "BitArray.h",
62 "BitVector.cpp",
63 "BitVector.h",
64 "BloomFilter.h",
65 "ByteOrder.h",
66 "CPU.h",
67 "CheckedArithmetic.h",
68 "Compiler.h",
69 "Complex.h",
70 "CryptographicallyRandomNumber.cpp",
71 "CryptographicallyRandomNumber.h",
72 "CurrentTime.cpp",
73 "CurrentTime.h",
74 "DataLog.cpp",
75 "DataLog.h",
76 "DateMath.cpp",
77 "DateMath.h",
78 "DecimalNumber.cpp",
79 "DecimalNumber.h",
80 "Deque.h",
81 "DoublyLinkedList.h",
82 "DynamicAnnotations.cpp",
83 "DynamicAnnotations.h",
84 "FastAllocBase.h",
85 "FastMalloc.cpp",
86 "FastMalloc.h",
87 "FilePrintStream.cpp",
88 "FilePrintStream.h",
89 "Float32Array.h",
90 "Float64Array.h",
91 "Forward.h",
92 "Functional.h",
93 "GetPtr.h",
94 "GregorianDateTime.cpp",
95 "GregorianDateTime.h",
96 "HashCountedSet.h",
97 "HashFunctions.h",
98 "HashIterators.h",
99 "HashMap.h",
100 "HashSet.h",
101 "HashTable.cpp",
102 "HashTable.h",
103 "HashTableDeletedValueType.h",
104 "HashTraits.h",
105 "HexNumber.h",
106 "Int16Array.h",
107 "Int32Array.h",
108 "Int8Array.h",
109 "IntegralTypedArrayBase.h",
110 "LeakAnnotations.h",
111 "LinkedStack.h",
112 "ListHashSet.h",
113 "Locker.h",
114 "MainThread.cpp",
115 "MainThread.h",
116 "MallocZoneSupport.h",
117 "MathExtras.h",
118 "MessageQueue.h",
119 "NonCopyingSort.h",
120 "Noncopyable.h",
121 "NotFound.h",
122 "NullPtr.cpp",
123 "NullPtr.h",
124 "NumberOfCores.cpp",
125 "NumberOfCores.h",
126 "OwnPtr.h",
127 "OwnPtrCommon.h",
128 "PageAllocator.cpp",
129 "PageAllocator.h",
130 "ParallelJobs.h",
131 "ParallelJobsGeneric.cpp",
132 "ParallelJobsGeneric.h",
133 "ParallelJobsLibdispatch.h",
134 "PartitionAlloc.cpp",
135 "PartitionAlloc.h",
136 "PassOwnPtr.h",
137 "PassRefPtr.h",
138 "PassTraits.h",
139 "PrintStream.cpp",
140 "PrintStream.h",
141 "ProcessID.h",
142 "QuantizedAllocation.cpp",
143 "QuantizedAllocation.h",
144 "RefCounted.h",
145 "RefCountedLeakCounter.cpp",
146 "RefCountedLeakCounter.h",
147 "RefPtr.h",
148 "RefPtrHashMap.h",
149 "RetainPtr.h",
150 "SHA1.cpp",
151 "SHA1.h",
152 "SaturatedArithmetic.h",
153 "SizeLimits.cpp",
154 "SpinLock.h",
155 "StaticConstructors.h",
156 "StdLibExtras.h",
157 "StringExtras.h",
158 "StringHasher.h",
159 "TemporaryChange.h",
160 "ThreadFunctionInvocation.h",
161 "ThreadRestrictionVerifier.h",
162 "ThreadSafeRefCounted.h",
163 "ThreadSpecific.h",
164 "Threading.cpp",
165 "Threading.h",
166 "ThreadingPrimitives.h",
167 "TypeTraits.cpp",
168 "TypeTraits.h",
169 "TypedArrayBase.h",
170 "Uint16Array.h",
171 "Uint32Array.h",
172 "Uint8Array.h",
173 "UnusedParam.h",
174 "VMTags.h",
175 "Vector.h",
176 "VectorTraits.h",
177 "WTF.cpp",
178 "WTF.h",
179 "WTFExport.h",
180 "WTFThreadData.cpp",
181 "WTFThreadData.h",
182 "WeakPtr.h",
183 "dtoa.cpp",
184 "dtoa.h",
185 "dtoa/bignum-dtoa.cc",
186 "dtoa/bignum-dtoa.h",
187 "dtoa/bignum.cc",
188 "dtoa/bignum.h",
189 "dtoa/cached-powers.cc",
190 "dtoa/cached-powers.h",
191 "dtoa/diy-fp.cc",
192 "dtoa/diy-fp.h",
193 "dtoa/double-conversion.cc",
194 "dtoa/double-conversion.h",
195 "dtoa/double.h",
196 "dtoa/fast-dtoa.cc",
197 "dtoa/fast-dtoa.h",
198 "dtoa/fixed-dtoa.cc",
199 "dtoa/fixed-dtoa.h",
200 "dtoa/strtod.cc",
201 "dtoa/strtod.h",
202 "dtoa/utils.h",
203 "text/ASCIIFastPath.h",
204 "text/AtomicString.cpp",
205 "text/AtomicString.h",
206 "text/AtomicStringHash.h",
207 "text/Base64.cpp",
208 "text/Base64.h",
209 "text/CString.cpp",
210 "text/CString.h",
211 "text/IntegerToStringConversion.h",
212 "text/StringBuffer.h",
213 "text/StringBuilder.cpp",
214 "text/StringBuilder.h",
215 "text/StringConcatenate.h",
216 "text/StringHash.h",
217 "text/StringImpl.cpp",
218 "text/StringImpl.h",
219 "text/StringOperators.h",
220 "text/StringStatics.cpp",
221 "text/StringUTF8Adaptor.h",
222 "text/StringView.h",
223 "text/TextCodec.cpp",
224 "text/TextCodecASCIIFastPath.h",
225 "text/TextCodecICU.cpp",
226 "text/TextCodecLatin1.cpp",
227 "text/TextCodecUTF16.cpp",
228 "text/TextCodecUTF8.cpp",
229 "text/TextCodecUTF8.h",
230 "text/TextCodecUserDefined.cpp",
231 "text/TextEncoding.cpp",
232 "text/TextEncodingRegistry.cpp",
233 "text/TextPosition.cpp",
234 "text/TextPosition.h",
235 "text/WTFString.cpp",
236 "text/WTFString.h",
237 "unicode/CharacterNames.h",
238 "unicode/Collator.h",
239 "unicode/UTF8.cpp",
240 "unicode/UTF8.h",
241 "unicode/Unicode.h",
242 "unicode/icu/CollatorICU.cpp",
243 "unicode/icu/UnicodeIcu.h",
244 ]
245
246 configs -= [ "//build/config/compiler:chromium_code" ]
247 configs += [
248 "//build/config/compiler:no_chromium_code",
249 ":wtf-config"
250 ]
251
252 defines = [ "WTF_IMPLEMENTATION=1" ]
253 deps = [
254 "//third_party/icu:icui18n",
255 "//third_party/icu:icuuc",
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 } else {
298 sources += [
299 "ThreadIdentifierDataPthreads.cpp",
300 "ThreadIdentifierDataPthreads.h",
301 "ThreadingPthreads.cpp",
302 ]
303 }
304 }
305
306 static_library("run_all_tests") {
307 sources = [ "testing/RunAllTests.cpp" ]
308
309 configs -= [ "//build/config/compiler:chromium_code" ]
310 configs += [
311 "//build/config/compiler:no_chromium_code",
312 ":wtf-config",
313 ]
314
315 deps = [
316 "//base:test_support_base",
317 "//testing:gmock",
318 "//testing:gtest",
319 ":wtf",
320 ]
321
322 direct_dependent_configs = [ "//testing:gtest_config" ]
323 }
324
325 executable("wtf_unittests") {
326 sources = [
327 "CheckedArithmeticTest.cpp",
328 "FunctionalTest.cpp",
329 "HashMapTest.cpp",
330 "HashSetTest.cpp",
331 "ListHashSetTest.cpp",
332 "MathExtrasTest.cpp",
333 "PartitionAllocTest.cpp",
334 "SHA1Test.cpp",
335 "SaturatedArithmeticTest.cpp",
336 "SpinLockTest.cpp",
337 "StringExtrasTest.cpp",
338 "StringHasherTest.cpp",
339 "TemporaryChangeTest.cpp",
340 "VectorTest.cpp",
341 "testing/WTFTestHelpers.h",
342 "text/CStringTest.cpp",
343 "text/StringBuilderTest.cpp",
344 "text/StringImplTest.cpp",
345 "text/StringOperatorsTest.cpp",
346 "text/WTFStringTest.cpp",
347 ]
348
349 configs -= [ "//build/config/compiler:chromium_code" ]
350 configs += [
351 "//build/config/compiler:no_chromium_code",
352 "//third_party/icu:icu_config",
353 ":wtf-config",
354 ]
355
356 deps = [ ":run_all_tests" ]
357
358 # # Disable c4267 warnings until we fix size_t to int truncations.
359 # 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
360
361 # if (is_linux && use_tcmalloc) {
362 # deps += [
363 # "//base:base",
364 # "//base/allocator:allocator",
365 # ],
366 # }
367 }
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