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