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