Duplicate global variables: WTF::asciiCaseFoldTable
[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     URL.h
244     URLHash.h
245     URLParser.h
246     UUID.h
247     UnalignedAccess.h
248     Unexpected.h
249     UniStdExtras.h
250     UnionFind.h
251     UniqueArray.h
252     UniqueRef.h
253     UnsafePointer.h
254     VMTags.h
255     ValueCheck.h
256     Variant.h
257     Vector.h
258     VectorTraits.h
259     WTFSemaphore.h
260     WallTime.h
261     WeakPtr.h
262     WeakRandom.h
263     WindowsExtras.h
264     WordLock.h
265     WorkQueue.h
266     WorkerPool.h
267     dtoa.h
268
269     dtoa/bignum-dtoa.h
270     dtoa/bignum.h
271     dtoa/cached-powers.h
272     dtoa/diy-fp.h
273     dtoa/double-conversion.h
274     dtoa/double.h
275     dtoa/fast-dtoa.h
276     dtoa/fixed-dtoa.h
277     dtoa/strtod.h
278     dtoa/utils.h
279
280     persistence/PersistentCoder.h
281     persistence/PersistentCoders.h
282     persistence/PersistentDecoder.h
283     persistence/PersistentEncoder.h
284
285     text/ASCIIFastPath.h
286     text/ASCIILiteral.h
287     text/AtomicString.h
288     text/AtomicStringHash.h
289     text/AtomicStringImpl.h
290     text/AtomicStringTable.h
291     text/Base64.h
292     text/CString.h
293     text/ConversionMode.h
294     text/ExternalStringImpl.h
295     text/IntegerToStringConversion.h
296     text/LChar.h
297     text/LineBreakIteratorPoolICU.h
298     text/LineEnding.h
299     text/NullTextBreakIterator.h
300     text/OrdinalNumber.h
301     text/StringBuffer.h
302     text/StringBuilder.h
303     text/StringCommon.h
304     text/StringConcatenate.h
305     text/StringConcatenateNumbers.h
306     text/StringHash.h
307     text/StringHasher.h
308     text/StringImpl.h
309     text/StringOperators.h
310     text/StringToIntegerConversion.h
311     text/StringView.h
312     text/SymbolImpl.h
313     text/SymbolRegistry.h
314     text/TextBreakIterator.h
315     text/TextBreakIteratorInternalICU.h
316     text/TextPosition.h
317     text/TextStream.h
318     text/UTF8ConversionError.h
319     text/UniquedStringImpl.h
320     text/ValueToString.h
321     text/WTFString.h
322
323     text/icu/TextBreakIteratorICU.h
324     text/icu/UTextProvider.h
325     text/icu/UTextProviderLatin1.h
326     text/icu/UTextProviderUTF16.h
327
328     threads/BinarySemaphore.h
329     threads/Signals.h
330
331     unicode/CharacterNames.h
332     unicode/Collator.h
333     unicode/UTF8Conversion.h
334 )
335
336 set(WTF_SOURCES
337     ASCIICType.cpp
338     Assertions.cpp
339     AutomaticThread.cpp
340     BitVector.cpp
341     CPUTime.cpp
342     ClockType.cpp
343     CompilationThread.cpp
344     ConcurrentPtrHashSet.cpp
345     CountingLock.cpp
346     CrossThreadCopier.cpp
347     CrossThreadTaskHandler.cpp
348     CryptographicUtilities.cpp
349     CryptographicallyRandomNumber.cpp
350     CurrentTime.cpp
351     DataLog.cpp
352     DateMath.cpp
353     DecimalNumber.cpp
354     FastBitVector.cpp
355     FastMalloc.cpp
356     FilePrintStream.cpp
357     FunctionDispatcher.cpp
358     Gigacage.cpp
359     GlobalVersion.cpp
360     GregorianDateTime.cpp
361     HashTable.cpp
362     JSONValues.cpp
363     JSValueMalloc.cpp
364     Language.cpp
365     Lock.cpp
366     LockedPrintStream.cpp
367     MD5.cpp
368     MainThread.cpp
369     MediaTime.cpp
370     MemoryPressureHandler.cpp
371     MetaAllocator.cpp
372     MonotonicTime.cpp
373     NumberOfCores.cpp
374     OSRandomSource.cpp
375     PageBlock.cpp
376     ParallelHelperPool.cpp
377     ParallelJobsGeneric.cpp
378     ParkingLot.cpp
379     Poisoned.cpp
380     PrintStream.cpp
381     ProcessPrivilege.cpp
382     RAMSize.cpp
383     RandomDevice.cpp
384     RandomNumber.cpp
385     ReadWriteLock.cpp
386     RefCountedLeakCounter.cpp
387     RunLoop.cpp
388     SHA1.cpp
389     Seconds.cpp
390     SixCharacterHash.cpp
391     StackBounds.cpp
392     StackPointer.cpp
393     StackStats.cpp
394     StackTrace.cpp
395     StringPrintStream.cpp
396     ThreadGroup.cpp
397     ThreadMessage.cpp
398     Threading.cpp
399     TimeWithDynamicClockType.cpp
400     TimingScope.cpp
401     URL.cpp
402     URLParser.cpp
403     UUID.cpp
404     WTFAssertions.cpp
405     WallTime.cpp
406     WordLock.cpp
407     WorkQueue.cpp
408     WorkerPool.cpp
409     dtoa.cpp
410
411     dtoa/bignum-dtoa.cc
412     dtoa/bignum.cc
413     dtoa/cached-powers.cc
414     dtoa/diy-fp.cc
415     dtoa/double-conversion.cc
416     dtoa/fast-dtoa.cc
417     dtoa/fixed-dtoa.cc
418     dtoa/strtod.cc
419
420     persistence/PersistentCoders.cpp
421     persistence/PersistentDecoder.cpp
422     persistence/PersistentEncoder.cpp
423
424     text/ASCIILiteral.cpp
425     text/AtomicString.cpp
426     text/AtomicStringImpl.cpp
427     text/AtomicStringTable.cpp
428     text/Base64.cpp
429     text/CString.cpp
430     text/ExternalStringImpl.cpp
431     text/LineEnding.cpp
432     text/StringBuilder.cpp
433     text/StringBuilderJSON.cpp
434     text/StringImpl.cpp
435     text/StringView.cpp
436     text/SymbolImpl.cpp
437     text/SymbolRegistry.cpp
438     text/TextBreakIterator.cpp
439     text/TextStream.cpp
440     text/WTFString.cpp
441
442     text/icu/UTextProvider.cpp
443     text/icu/UTextProviderLatin1.cpp
444     text/icu/UTextProviderUTF16.cpp
445
446     threads/BinarySemaphore.cpp
447     threads/Signals.cpp
448
449     unicode/UTF8Conversion.cpp
450 )
451
452 set(WTF_INCLUDE_DIRECTORIES
453     "${BMALLOC_DIR}"
454     "${CMAKE_BINARY_DIR}"
455     "${DERIVED_SOURCES_DIR}"
456     "${THIRDPARTY_DIR}"
457 )
458
459 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
460     "${WTF_DIR}"
461     "${WTF_DIR}/wtf"
462     "${WTF_DIR}/wtf/dtoa"
463     "${WTF_DIR}/wtf/persistence"
464     "${WTF_DIR}/wtf/text"
465     "${WTF_DIR}/wtf/text/icu"
466     "${WTF_DIR}/wtf/threads"
467     "${WTF_DIR}/wtf/unicode"
468 )
469
470 set(WTF_LIBRARIES
471     ${CMAKE_DL_LIBS}
472 )
473
474 if (NOT USE_SYSTEM_MALLOC)
475     list(APPEND WTF_LIBRARIES bmalloc)
476 endif ()
477
478 list(APPEND WTF_SOURCES
479     unicode/CollatorDefault.cpp
480
481     unicode/icu/CollatorICU.cpp
482 )
483 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
484     ${ICU_INCLUDE_DIRS}
485 )
486 list(APPEND WTF_LIBRARIES
487     ${ICU_DATA_LIBRARIES}
488     ${ICU_I18N_LIBRARIES}
489     ${ICU_LIBRARIES}
490 )
491
492 if (WIN32)
493     list(APPEND WTF_SOURCES
494         OSAllocatorWin.cpp
495         ThreadSpecificWin.cpp
496         ThreadingWin.cpp
497     )
498     list(APPEND WTF_LIBRARIES
499         DbgHelp
500         winmm
501     )
502 else ()
503     list(APPEND WTF_SOURCES
504         OSAllocatorPosix.cpp
505         ThreadingPthreads.cpp
506     )
507 endif ()
508
509 WEBKIT_FRAMEWORK_DECLARE(WTF)
510 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
511
512 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
513 WEBKIT_FRAMEWORK(WTF)
514
515 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
516     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
517     FILES ${WTF_PUBLIC_HEADERS}
518 )
519
520 if (MSVC)
521     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
522     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
523
524     add_custom_command(
525         TARGET WTF
526         PRE_BUILD
527         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
528         VERBATIM)
529
530     add_custom_command(
531         TARGET WTF
532         POST_BUILD
533         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
534         VERBATIM)
535 endif ()
536
537 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
538
539 file(COPY
540     ../Scripts/generate-unified-source-bundles.rb
541     DESTINATION
542     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
543 )