Apply PtrTags to the MetaAllocator and friends.
[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     MachSendRight.h
123     MainThread.h
124     MallocPtr.h
125     MathExtras.h
126     MediaTime.h
127     MemoryFootprint.h
128     MemoryPressureHandler.h
129     MessageQueue.h
130     MetaAllocator.h
131     MetaAllocatorHandle.h
132     MetaAllocatorPtr.h
133     MonotonicTime.h
134     NakedPtr.h
135     NaturalLoops.h
136     NeverDestroyed.h
137     NoLock.h
138     NoTailCalls.h
139     Noncopyable.h
140     NotFound.h
141     NumberOfCores.h
142     OSAllocator.h
143     OSObjectPtr.h
144     OSRandomSource.h
145     ObjcRuntimeExtras.h
146     ObjectIdentifier.h
147     OptionSet.h
148     Optional.h
149     OrderMaker.h
150     PackedIntVector.h
151     PageAllocation.h
152     PageBlock.h
153     PageReservation.h
154     ParallelHelperPool.h
155     ParallelJobs.h
156     ParallelJobsGeneric.h
157     ParallelJobsLibdispatch.h
158     ParallelJobsOpenMP.h
159     ParallelVectorIterator.h
160     ParkingLot.h
161     Platform.h
162     PlatformRegisters.h
163     PointerComparison.h
164     PointerPreparations.h
165     Poisoned.h
166     PoisonedUniquePtr.h
167     PrintStream.h
168     PriorityQueue.h
169     ProcessID.h
170     ProcessPrivilege.h
171     PtrTag.h
172     RAMSize.h
173     RandomDevice.h
174     RandomNumber.h
175     RandomNumberSeed.h
176     Range.h
177     RangeSet.h
178     RawPointer.h
179     ReadWriteLock.h
180     RecursableLambda.h
181     RecursiveLockAdapter.h
182     RedBlackTree.h
183     Ref.h
184     RefCounted.h
185     RefCountedArray.h
186     RefCountedLeakCounter.h
187     RefCounter.h
188     RefPtr.h
189     RetainPtr.h
190     RunLoop.h
191     RunLoopTimer.h
192     SHA1.h
193     SaturatedArithmetic.h
194     SchedulePair.h
195     Scope.h
196     ScopedLambda.h
197     Seconds.h
198     SegmentedVector.h
199     SentinelLinkedList.h
200     SetForScope.h
201     SharedTask.h
202     SimpleStats.h
203     SingleRootGraph.h
204     SinglyLinkedList.h
205     SinglyLinkedListWithTail.h
206     SixCharacterHash.h
207     SmallPtrSet.h
208     SoftLinking.h
209     Spectrum.h
210     StackBounds.h
211     StackShot.h
212     StackShotProfiler.h
213     StackStats.h
214     StackTrace.h
215     StdLibExtras.h
216     StdList.h
217     StdMap.h
218     StdSet.h
219     StdUnorderedMap.h
220     StdUnorderedSet.h
221     Stopwatch.h
222     StreamBuffer.h
223     StringExtras.h
224     StringHashDumpContext.h
225     StringPrintStream.h
226     SynchronizedFixedQueue.h
227     SystemFree.h
228     SystemTracing.h
229     ThreadGroup.h
230     ThreadMessage.h
231     ThreadSafeRefCounted.h
232     ThreadSpecific.h
233     Threading.h
234     ThreadingPrimitives.h
235     TimeWithDynamicClockType.h
236     TimingScope.h
237     TinyLRUCache.h
238     TinyPtrSet.h
239     TriState.h
240     TypeCasts.h
241     UUID.h
242     Unexpected.h
243     UniStdExtras.h
244     UnionFind.h
245     UniqueArray.h
246     UniqueRef.h
247     UnsafePointer.h
248     VMTags.h
249     ValueCheck.h
250     Variant.h
251     Vector.h
252     VectorTraits.h
253     WallTime.h
254     WeakPtr.h
255     WeakRandom.h
256     WindowsExtras.h
257     WordLock.h
258     WorkQueue.h
259     dtoa.h
260
261     dtoa/bignum-dtoa.h
262     dtoa/bignum.h
263     dtoa/cached-powers.h
264     dtoa/diy-fp.h
265     dtoa/double-conversion.h
266     dtoa/double.h
267     dtoa/fast-dtoa.h
268     dtoa/fixed-dtoa.h
269     dtoa/strtod.h
270     dtoa/utils.h
271
272     persistence/PersistentCoder.h
273     persistence/PersistentCoders.h
274     persistence/PersistentDecoder.h
275     persistence/PersistentEncoder.h
276
277     text/ASCIIFastPath.h
278     text/AtomicString.h
279     text/AtomicStringHash.h
280     text/AtomicStringImpl.h
281     text/AtomicStringTable.h
282     text/Base64.h
283     text/CString.h
284     text/ConversionMode.h
285     text/IntegerToStringConversion.h
286     text/LChar.h
287     text/LineBreakIteratorPoolICU.h
288     text/LineEnding.h
289     text/NullTextBreakIterator.h
290     text/OrdinalNumber.h
291     text/StringBuffer.h
292     text/StringBuilder.h
293     text/StringCommon.h
294     text/StringConcatenate.h
295     text/StringConcatenateNumbers.h
296     text/StringHash.h
297     text/StringHasher.h
298     text/StringImpl.h
299     text/StringMalloc.h
300     text/StringOperators.h
301     text/StringVector.h
302     text/StringView.h
303     text/SymbolImpl.h
304     text/SymbolRegistry.h
305     text/TextBreakIterator.h
306     text/TextBreakIteratorInternalICU.h
307     text/TextPosition.h
308     text/TextStream.h
309     text/UniquedStringImpl.h
310     text/ValueToString.h
311     text/WTFString.h
312
313     text/icu/TextBreakIteratorICU.h
314     text/icu/UTextProvider.h
315     text/icu/UTextProviderLatin1.h
316     text/icu/UTextProviderUTF16.h
317
318     threads/BinarySemaphore.h
319     threads/Signals.h
320
321     unicode/CharacterNames.h
322     unicode/Collator.h
323     unicode/UTF8.h
324 )
325
326 set(WTF_SOURCES
327     Assertions.cpp
328     AutomaticThread.cpp
329     BitVector.cpp
330     CPUTime.cpp
331     ClockType.cpp
332     CompilationThread.cpp
333     ConcurrentPtrHashSet.cpp
334     CountingLock.cpp
335     CrossThreadCopier.cpp
336     CrossThreadTaskHandler.cpp
337     CryptographicUtilities.cpp
338     CryptographicallyRandomNumber.cpp
339     CurrentTime.cpp
340     DataLog.cpp
341     DateMath.cpp
342     DecimalNumber.cpp
343     FastBitVector.cpp
344     FastMalloc.cpp
345     FilePrintStream.cpp
346     FunctionDispatcher.cpp
347     Gigacage.cpp
348     GlobalVersion.cpp
349     GregorianDateTime.cpp
350     HashTable.cpp
351     JSONValues.cpp
352     JSValueMalloc.cpp
353     Language.cpp
354     Lock.cpp
355     LockedPrintStream.cpp
356     MD5.cpp
357     MainThread.cpp
358     MediaTime.cpp
359     MemoryPressureHandler.cpp
360     MetaAllocator.cpp
361     MonotonicTime.cpp
362     NumberOfCores.cpp
363     OSRandomSource.cpp
364     PageBlock.cpp
365     ParallelHelperPool.cpp
366     ParallelJobsGeneric.cpp
367     ParkingLot.cpp
368     Poisoned.cpp
369     PrintStream.cpp
370     ProcessPrivilege.cpp
371     RAMSize.cpp
372     RandomDevice.cpp
373     RandomNumber.cpp
374     ReadWriteLock.cpp
375     RefCountedLeakCounter.cpp
376     RunLoop.cpp
377     SHA1.cpp
378     Seconds.cpp
379     SixCharacterHash.cpp
380     StackBounds.cpp
381     StackStats.cpp
382     StackTrace.cpp
383     StringPrintStream.cpp
384     ThreadGroup.cpp
385     ThreadMessage.cpp
386     Threading.cpp
387     TimeWithDynamicClockType.cpp
388     TimingScope.cpp
389     UUID.cpp
390     WTFAssertions.cpp
391     WallTime.cpp
392     WordLock.cpp
393     WorkQueue.cpp
394     dtoa.cpp
395
396     dtoa/bignum-dtoa.cc
397     dtoa/bignum.cc
398     dtoa/cached-powers.cc
399     dtoa/diy-fp.cc
400     dtoa/double-conversion.cc
401     dtoa/fast-dtoa.cc
402     dtoa/fixed-dtoa.cc
403     dtoa/strtod.cc
404
405     persistence/PersistentCoders.cpp
406     persistence/PersistentDecoder.cpp
407     persistence/PersistentEncoder.cpp
408
409     text/AtomicString.cpp
410     text/AtomicStringImpl.cpp
411     text/AtomicStringTable.cpp
412     text/Base64.cpp
413     text/CString.cpp
414     text/LineEnding.cpp
415     text/StringBuilder.cpp
416     text/StringBuilderJSON.cpp
417     text/StringImpl.cpp
418     text/StringMalloc.cpp
419     text/StringView.cpp
420     text/SymbolImpl.cpp
421     text/SymbolRegistry.cpp
422     text/TextBreakIterator.cpp
423     text/TextStream.cpp
424     text/WTFString.cpp
425
426     text/icu/UTextProvider.cpp
427     text/icu/UTextProviderLatin1.cpp
428     text/icu/UTextProviderUTF16.cpp
429
430     threads/BinarySemaphore.cpp
431     threads/Signals.cpp
432
433     unicode/UTF8.cpp
434 )
435
436 set(WTF_INCLUDE_DIRECTORIES
437     "${BMALLOC_DIR}"
438     "${CMAKE_BINARY_DIR}"
439     "${DERIVED_SOURCES_DIR}"
440     "${THIRDPARTY_DIR}"
441 )
442
443 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
444     "${WTF_DIR}"
445     "${WTF_DIR}/wtf"
446     "${WTF_DIR}/wtf/dtoa"
447     "${WTF_DIR}/wtf/persistence"
448     "${WTF_DIR}/wtf/text"
449     "${WTF_DIR}/wtf/text/icu"
450     "${WTF_DIR}/wtf/threads"
451     "${WTF_DIR}/wtf/unicode"
452 )
453
454 set(WTF_LIBRARIES
455     ${CMAKE_DL_LIBS}
456 )
457
458 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
459     list(APPEND WTF_PUBLIC_HEADERS
460         spi/darwin/CommonCryptoSPI.h
461     )
462 list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
463         "${WTF_DIR}/wtf/spi/darwin"
464     )
465 endif ()
466
467 if (NOT USE_SYSTEM_MALLOC)
468     list(APPEND WTF_LIBRARIES bmalloc)
469 endif ()
470
471 list(APPEND WTF_SOURCES
472     unicode/CollatorDefault.cpp
473
474     unicode/icu/CollatorICU.cpp
475 )
476 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
477     ${ICU_INCLUDE_DIRS}
478 )
479 list(APPEND WTF_LIBRARIES
480     ${ICU_DATA_LIBRARIES}
481     ${ICU_I18N_LIBRARIES}
482     ${ICU_LIBRARIES}
483 )
484
485 if (WIN32)
486     list(APPEND WTF_SOURCES
487         OSAllocatorWin.cpp
488         ThreadSpecificWin.cpp
489         ThreadingWin.cpp
490     )
491     list(APPEND WTF_LIBRARIES
492         winmm
493     )
494 else ()
495     list(APPEND WTF_SOURCES
496         OSAllocatorPosix.cpp
497         ThreadingPthreads.cpp
498     )
499 endif ()
500
501 WEBKIT_FRAMEWORK_DECLARE(WTF)
502 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
503
504 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
505 WEBKIT_FRAMEWORK(WTF)
506
507 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
508     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
509     FILES ${WTF_PUBLIC_HEADERS}
510 )
511
512 if (MSVC)
513     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
514     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
515
516     add_custom_command(
517         TARGET WTF
518         PRE_BUILD
519         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
520         VERBATIM)
521
522     add_custom_command(
523         TARGET WTF
524         POST_BUILD
525         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
526         VERBATIM)
527 endif ()
528
529 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
530
531 file(COPY
532     ../Scripts/generate-unified-source-bundles.rb
533     DESTINATION
534     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
535 )