[WTF] Add standard containers with FastAllocator specialization
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_PUBLIC_HEADERS
2     ASCIICType.h
3     Algorithms.h
4     Assertions.h
5     Atomics.h
6     AutodrainedPool.h
7     AutomaticThread.h
8     BackwardsGraph.h
9     Bag.h
10     BagToHashMap.h
11     BitVector.h
12     Bitmap.h
13     BlockObjCExceptions.h
14     BlockPtr.h
15     BlockStack.h
16     BloomFilter.h
17     Box.h
18     Brigand.h
19     BubbleSort.h
20     BumpPointerAllocator.h
21     ByteOrder.h
22     CPUTime.h
23     CagedPtr.h
24     CagedUniquePtr.h
25     CallbackAggregator.h
26     CheckedArithmetic.h
27     CheckedBoolean.h
28     ClockType.h
29     CommaPrinter.h
30     CompilationThread.h
31     Compiler.h
32     CompletionHandler.h
33     ConcurrentBuffer.h
34     ConcurrentPtrHashSet.h
35     ConcurrentVector.h
36     Condition.h
37     CountingLock.h
38     CrossThreadCopier.h
39     CrossThreadQueue.h
40     CrossThreadTask.h
41     CrossThreadTaskHandler.h
42     CryptographicUtilities.h
43     CryptographicallyRandomNumber.h
44     DataLog.h
45     DateMath.h
46     DebugUtilities.h
47     DecimalNumber.h
48     DeferrableRefCounted.h
49     DeprecatedOptional.h
50     Deque.h
51     DisallowCType.h
52     DispatchPtr.h
53     Dominators.h
54     DoublyLinkedList.h
55     DumbPtrTraits.h
56     DumbValueTraits.h
57     EnumTraits.h
58     Expected.h
59     ExportMacros.h
60     FastBitVector.h
61     FastMalloc.h
62     FastTLS.h
63     FeatureDefines.h
64     FilePrintStream.h
65     FlipBytes.h
66     ForbidHeapAllocation.h
67     Forward.h
68     Function.h
69     FunctionDispatcher.h
70     FunctionTraits.h
71     GetPtr.h
72     Gigacage.h
73     GlobalVersion.h
74     GraphNodeWorklist.h
75     GregorianDateTime.h
76     HashCountedSet.h
77     HashFunctions.h
78     HashIterators.h
79     HashMap.h
80     HashMethod.h
81     HashSet.h
82     HashTable.h
83     HashTraits.h
84     Hasher.h
85     HexNumber.h
86     Identified.h
87     Indenter.h
88     IndexKeyType.h
89     IndexMap.h
90     IndexSet.h
91     IndexSparseSet.h
92     IndexedContainerIterator.h
93     InlineASM.h
94     Insertion.h
95     InstanceCounted.h
96     IsoMalloc.h
97     IsoMallocInlines.h
98     IteratorAdaptors.h
99     IteratorRange.h
100     JSONValues.h
101     JSValueMalloc.h
102     KeyValuePair.h
103     LEBDecoder.h
104     Language.h
105     ListDump.h
106     ListHashSet.h
107     Liveness.h
108     Lock.h
109     LockAlgorithm.h
110     LockAlgorithmInlines.h
111     LockedPrintStream.h
112     Locker.h
113     LocklessBag.h
114     Logger.h
115     LoggerHelper.h
116     LoggingAccumulator.h
117     LoggingHashID.h
118     LoggingHashMap.h
119     LoggingHashSet.h
120     LoggingHashTraits.h
121     MD5.h
122     MainThread.h
123     MallocPtr.h
124     MathExtras.h
125     MediaTime.h
126     MemoryFootprint.h
127     MemoryPressureHandler.h
128     MessageQueue.h
129     MetaAllocator.h
130     MetaAllocatorHandle.h
131     MonotonicTime.h
132     NakedPtr.h
133     NaturalLoops.h
134     NeverDestroyed.h
135     NoLock.h
136     NoTailCalls.h
137     Noncopyable.h
138     NotFound.h
139     NumberOfCores.h
140     OSAllocator.h
141     OSObjectPtr.h
142     OSRandomSource.h
143     ObjcRuntimeExtras.h
144     ObjectIdentifier.h
145     OptionSet.h
146     Optional.h
147     OrderMaker.h
148     PackedIntVector.h
149     PageAllocation.h
150     PageBlock.h
151     PageReservation.h
152     ParallelHelperPool.h
153     ParallelJobs.h
154     ParallelJobsGeneric.h
155     ParallelJobsLibdispatch.h
156     ParallelJobsOpenMP.h
157     ParallelVectorIterator.h
158     ParkingLot.h
159     Platform.h
160     PlatformRegisters.h
161     PointerComparison.h
162     PointerPreparations.h
163     Poisoned.h
164     PoisonedUniquePtr.h
165     PrintStream.h
166     PriorityQueue.h
167     ProcessID.h
168     ProcessPrivilege.h
169     RAMSize.h
170     RandomDevice.h
171     RandomNumber.h
172     RandomNumberSeed.h
173     Range.h
174     RangeSet.h
175     RawPointer.h
176     ReadWriteLock.h
177     RecursableLambda.h
178     RecursiveLockAdapter.h
179     RedBlackTree.h
180     Ref.h
181     RefCounted.h
182     RefCountedArray.h
183     RefCountedLeakCounter.h
184     RefCounter.h
185     RefPtr.h
186     RetainPtr.h
187     RunLoop.h
188     RunLoopTimer.h
189     SHA1.h
190     SaturatedArithmetic.h
191     SchedulePair.h
192     Scope.h
193     ScopedLambda.h
194     Seconds.h
195     SegmentedVector.h
196     SentinelLinkedList.h
197     SetForScope.h
198     SharedTask.h
199     SimpleStats.h
200     SingleRootGraph.h
201     SinglyLinkedList.h
202     SinglyLinkedListWithTail.h
203     SixCharacterHash.h
204     SmallPtrSet.h
205     SoftLinking.h
206     Spectrum.h
207     StackBounds.h
208     StackShot.h
209     StackShotProfiler.h
210     StackStats.h
211     StackTrace.h
212     StdLibExtras.h
213     StdList.h
214     StdMap.h
215     StdSet.h
216     StdUnorderedMap.h
217     StdUnorderedSet.h
218     Stopwatch.h
219     StreamBuffer.h
220     StringExtras.h
221     StringHashDumpContext.h
222     StringPrintStream.h
223     SynchronizedFixedQueue.h
224     SystemFree.h
225     SystemTracing.h
226     ThreadGroup.h
227     ThreadMessage.h
228     ThreadSafeRefCounted.h
229     ThreadSpecific.h
230     Threading.h
231     ThreadingPrimitives.h
232     TimeWithDynamicClockType.h
233     TimingScope.h
234     TinyLRUCache.h
235     TinyPtrSet.h
236     TriState.h
237     TypeCasts.h
238     UUID.h
239     Unexpected.h
240     UniStdExtras.h
241     UnionFind.h
242     UniqueArray.h
243     UniqueRef.h
244     UnsafePointer.h
245     VMTags.h
246     ValueCheck.h
247     Variant.h
248     Vector.h
249     VectorTraits.h
250     WallTime.h
251     WeakPtr.h
252     WeakRandom.h
253     WindowsExtras.h
254     WordLock.h
255     WorkQueue.h
256     dtoa.h
257
258     dtoa/bignum-dtoa.h
259     dtoa/bignum.h
260     dtoa/cached-powers.h
261     dtoa/diy-fp.h
262     dtoa/double-conversion.h
263     dtoa/double.h
264     dtoa/fast-dtoa.h
265     dtoa/fixed-dtoa.h
266     dtoa/strtod.h
267     dtoa/utils.h
268
269     persistence/PersistentCoder.h
270     persistence/PersistentCoders.h
271     persistence/PersistentDecoder.h
272     persistence/PersistentEncoder.h
273
274     text/ASCIIFastPath.h
275     text/AtomicString.h
276     text/AtomicStringHash.h
277     text/AtomicStringImpl.h
278     text/AtomicStringTable.h
279     text/Base64.h
280     text/CString.h
281     text/ConversionMode.h
282     text/IntegerToStringConversion.h
283     text/LChar.h
284     text/LineBreakIteratorPoolICU.h
285     text/LineEnding.h
286     text/NullTextBreakIterator.h
287     text/OrdinalNumber.h
288     text/StringBuffer.h
289     text/StringBuilder.h
290     text/StringCommon.h
291     text/StringConcatenate.h
292     text/StringConcatenateNumbers.h
293     text/StringHash.h
294     text/StringHasher.h
295     text/StringImpl.h
296     text/StringMalloc.h
297     text/StringOperators.h
298     text/StringVector.h
299     text/StringView.h
300     text/SymbolImpl.h
301     text/SymbolRegistry.h
302     text/TextBreakIterator.h
303     text/TextBreakIteratorInternalICU.h
304     text/TextPosition.h
305     text/TextStream.h
306     text/UniquedStringImpl.h
307     text/ValueToString.h
308     text/WTFString.h
309
310     text/icu/TextBreakIteratorICU.h
311     text/icu/UTextProvider.h
312     text/icu/UTextProviderLatin1.h
313     text/icu/UTextProviderUTF16.h
314
315     threads/BinarySemaphore.h
316     threads/Signals.h
317
318     unicode/CharacterNames.h
319     unicode/Collator.h
320     unicode/UTF8.h
321 )
322
323 set(WTF_SOURCES
324     Assertions.cpp
325     Atomics.cpp
326     AutomaticThread.cpp
327     BitVector.cpp
328     CPUTime.cpp
329     ClockType.cpp
330     CompilationThread.cpp
331     ConcurrentPtrHashSet.cpp
332     CountingLock.cpp
333     CrossThreadCopier.cpp
334     CrossThreadTaskHandler.cpp
335     CryptographicUtilities.cpp
336     CryptographicallyRandomNumber.cpp
337     CurrentTime.cpp
338     DataLog.cpp
339     DateMath.cpp
340     DecimalNumber.cpp
341     FastBitVector.cpp
342     FastMalloc.cpp
343     FilePrintStream.cpp
344     FunctionDispatcher.cpp
345     Gigacage.cpp
346     GlobalVersion.cpp
347     GregorianDateTime.cpp
348     HashTable.cpp
349     JSONValues.cpp
350     JSValueMalloc.cpp
351     Language.cpp
352     Lock.cpp
353     LockedPrintStream.cpp
354     MD5.cpp
355     MainThread.cpp
356     MediaTime.cpp
357     MemoryPressureHandler.cpp
358     MetaAllocator.cpp
359     MonotonicTime.cpp
360     NumberOfCores.cpp
361     OSRandomSource.cpp
362     PageBlock.cpp
363     ParallelHelperPool.cpp
364     ParallelJobsGeneric.cpp
365     ParkingLot.cpp
366     Poisoned.cpp
367     PrintStream.cpp
368     ProcessPrivilege.cpp
369     RAMSize.cpp
370     RandomDevice.cpp
371     RandomNumber.cpp
372     ReadWriteLock.cpp
373     RefCountedLeakCounter.cpp
374     RunLoop.cpp
375     SHA1.cpp
376     Seconds.cpp
377     SixCharacterHash.cpp
378     StackBounds.cpp
379     StackStats.cpp
380     StackTrace.cpp
381     StringPrintStream.cpp
382     ThreadGroup.cpp
383     ThreadMessage.cpp
384     Threading.cpp
385     TimeWithDynamicClockType.cpp
386     TimingScope.cpp
387     UUID.cpp
388     WTFAssertions.cpp
389     WallTime.cpp
390     WordLock.cpp
391     WorkQueue.cpp
392     dtoa.cpp
393
394     dtoa/bignum-dtoa.cc
395     dtoa/bignum.cc
396     dtoa/cached-powers.cc
397     dtoa/diy-fp.cc
398     dtoa/double-conversion.cc
399     dtoa/fast-dtoa.cc
400     dtoa/fixed-dtoa.cc
401     dtoa/strtod.cc
402
403     persistence/PersistentCoders.cpp
404     persistence/PersistentDecoder.cpp
405     persistence/PersistentEncoder.cpp
406
407     text/AtomicString.cpp
408     text/AtomicStringImpl.cpp
409     text/AtomicStringTable.cpp
410     text/Base64.cpp
411     text/CString.cpp
412     text/LineEnding.cpp
413     text/StringBuilder.cpp
414     text/StringBuilderJSON.cpp
415     text/StringImpl.cpp
416     text/StringMalloc.cpp
417     text/StringView.cpp
418     text/SymbolImpl.cpp
419     text/SymbolRegistry.cpp
420     text/TextBreakIterator.cpp
421     text/TextStream.cpp
422     text/WTFString.cpp
423
424     text/icu/UTextProvider.cpp
425     text/icu/UTextProviderLatin1.cpp
426     text/icu/UTextProviderUTF16.cpp
427
428     threads/BinarySemaphore.cpp
429     threads/Signals.cpp
430
431     unicode/UTF8.cpp
432 )
433
434 set(WTF_INCLUDE_DIRECTORIES
435     "${BMALLOC_DIR}"
436     "${CMAKE_BINARY_DIR}"
437     "${DERIVED_SOURCES_DIR}"
438     "${THIRDPARTY_DIR}"
439 )
440
441 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
442     "${WTF_DIR}"
443     "${WTF_DIR}/wtf"
444     "${WTF_DIR}/wtf/dtoa"
445     "${WTF_DIR}/wtf/persistence"
446     "${WTF_DIR}/wtf/text"
447     "${WTF_DIR}/wtf/text/icu"
448     "${WTF_DIR}/wtf/threads"
449     "${WTF_DIR}/wtf/unicode"
450 )
451
452 set(WTF_LIBRARIES
453     ${CMAKE_DL_LIBS}
454 )
455
456 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
457     list(APPEND WTF_PUBLIC_HEADERS
458         spi/darwin/CommonCryptoSPI.h
459     )
460 list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
461         "${WTF_DIR}/wtf/spi/darwin"
462     )
463 endif ()
464
465 if (NOT USE_SYSTEM_MALLOC)
466     list(APPEND WTF_LIBRARIES bmalloc)
467 endif ()
468
469 list(APPEND WTF_SOURCES
470     unicode/CollatorDefault.cpp
471
472     unicode/icu/CollatorICU.cpp
473 )
474 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
475     ${ICU_INCLUDE_DIRS}
476 )
477 list(APPEND WTF_LIBRARIES
478     ${ICU_DATA_LIBRARIES}
479     ${ICU_I18N_LIBRARIES}
480     ${ICU_LIBRARIES}
481 )
482
483 if (WIN32)
484     list(APPEND WTF_SOURCES
485         OSAllocatorWin.cpp
486         ThreadSpecificWin.cpp
487         ThreadingWin.cpp
488     )
489     list(APPEND WTF_LIBRARIES
490         winmm
491     )
492 else ()
493     list(APPEND WTF_SOURCES
494         OSAllocatorPosix.cpp
495         ThreadingPthreads.cpp
496     )
497 endif ()
498
499 WEBKIT_FRAMEWORK_DECLARE(WTF)
500 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
501
502 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
503 WEBKIT_FRAMEWORK(WTF)
504
505 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
506     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
507     FILES ${WTF_PUBLIC_HEADERS}
508 )
509
510 if (MSVC)
511     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
512     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
513
514     add_custom_command(
515         TARGET WTF
516         PRE_BUILD
517         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
518         VERBATIM)
519
520     add_custom_command(
521         TARGET WTF
522         POST_BUILD
523         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
524         VERBATIM)
525 endif ()
526
527 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
528
529 file(COPY
530     ../Scripts/generate-unified-source-bundles.rb
531     DESTINATION
532     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
533 )