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