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