[Cocoa] Retire DispatchPtr, and add more move semantics and simpler #ifs to other...
[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     BooleanLattice.h
18     Box.h
19     Brigand.h
20     BubbleSort.h
21     BumpPointerAllocator.h
22     ByteOrder.h
23     CPUTime.h
24     CagedPtr.h
25     CagedUniquePtr.h
26     CallbackAggregator.h
27     CheckedArithmetic.h
28     CheckedBoolean.h
29     ClockType.h
30     CommaPrinter.h
31     CompilationThread.h
32     Compiler.h
33     CompletionHandler.h
34     ConcurrentBuffer.h
35     ConcurrentPtrHashSet.h
36     ConcurrentVector.h
37     Condition.h
38     CountingLock.h
39     CrossThreadCopier.h
40     CrossThreadQueue.h
41     CrossThreadTask.h
42     CrossThreadTaskHandler.h
43     CryptographicUtilities.h
44     CryptographicallyRandomNumber.h
45     DataLog.h
46     DateMath.h
47     DebugUtilities.h
48     DecimalNumber.h
49     DeferrableRefCounted.h
50     DeprecatedOptional.h
51     Deque.h
52     DisallowCType.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/StringOperators.h
300     text/StringView.h
301     text/SymbolImpl.h
302     text/SymbolRegistry.h
303     text/TextBreakIterator.h
304     text/TextBreakIteratorInternalICU.h
305     text/TextPosition.h
306     text/TextStream.h
307     text/UTF8ConversionError.h
308     text/UniquedStringImpl.h
309     text/ValueToString.h
310     text/WTFString.h
311
312     text/icu/TextBreakIteratorICU.h
313     text/icu/UTextProvider.h
314     text/icu/UTextProviderLatin1.h
315     text/icu/UTextProviderUTF16.h
316
317     threads/BinarySemaphore.h
318     threads/Signals.h
319
320     unicode/CharacterNames.h
321     unicode/Collator.h
322     unicode/UTF8.h
323 )
324
325 set(WTF_SOURCES
326     Assertions.cpp
327     AutomaticThread.cpp
328     BitVector.cpp
329     CPUTime.cpp
330     ClockType.cpp
331     CompilationThread.cpp
332     ConcurrentPtrHashSet.cpp
333     CountingLock.cpp
334     CrossThreadCopier.cpp
335     CrossThreadTaskHandler.cpp
336     CryptographicUtilities.cpp
337     CryptographicallyRandomNumber.cpp
338     CurrentTime.cpp
339     DataLog.cpp
340     DateMath.cpp
341     DecimalNumber.cpp
342     FastBitVector.cpp
343     FastMalloc.cpp
344     FilePrintStream.cpp
345     FunctionDispatcher.cpp
346     Gigacage.cpp
347     GlobalVersion.cpp
348     GregorianDateTime.cpp
349     HashTable.cpp
350     JSONValues.cpp
351     JSValueMalloc.cpp
352     Language.cpp
353     Lock.cpp
354     LockedPrintStream.cpp
355     MD5.cpp
356     MainThread.cpp
357     MediaTime.cpp
358     MemoryPressureHandler.cpp
359     MetaAllocator.cpp
360     MonotonicTime.cpp
361     NumberOfCores.cpp
362     OSRandomSource.cpp
363     PageBlock.cpp
364     ParallelHelperPool.cpp
365     ParallelJobsGeneric.cpp
366     ParkingLot.cpp
367     Poisoned.cpp
368     PrintStream.cpp
369     ProcessPrivilege.cpp
370     RAMSize.cpp
371     RandomDevice.cpp
372     RandomNumber.cpp
373     ReadWriteLock.cpp
374     RefCountedLeakCounter.cpp
375     RunLoop.cpp
376     SHA1.cpp
377     Seconds.cpp
378     SixCharacterHash.cpp
379     StackBounds.cpp
380     StackStats.cpp
381     StackTrace.cpp
382     StringPrintStream.cpp
383     ThreadGroup.cpp
384     ThreadMessage.cpp
385     Threading.cpp
386     TimeWithDynamicClockType.cpp
387     TimingScope.cpp
388     UUID.cpp
389     WTFAssertions.cpp
390     WallTime.cpp
391     WordLock.cpp
392     WorkQueue.cpp
393     dtoa.cpp
394
395     dtoa/bignum-dtoa.cc
396     dtoa/bignum.cc
397     dtoa/cached-powers.cc
398     dtoa/diy-fp.cc
399     dtoa/double-conversion.cc
400     dtoa/fast-dtoa.cc
401     dtoa/fixed-dtoa.cc
402     dtoa/strtod.cc
403
404     persistence/PersistentCoders.cpp
405     persistence/PersistentDecoder.cpp
406     persistence/PersistentEncoder.cpp
407
408     text/AtomicString.cpp
409     text/AtomicStringImpl.cpp
410     text/AtomicStringTable.cpp
411     text/Base64.cpp
412     text/CString.cpp
413     text/LineEnding.cpp
414     text/StringBuilder.cpp
415     text/StringBuilderJSON.cpp
416     text/StringImpl.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 )