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