Add WTF::PoisonedUniquePtr to replace std::unique_ptr when poisoning is desired.
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_HEADERS
2     ASCIICType.h
3     Assertions.h
4     Atomics.h
5     AutomaticThread.h
6     BackwardsGraph.h
7     Bag.h
8     BagToHashMap.h
9     BitVector.h
10     Bitmap.h
11     Brigand.h
12     BubbleSort.h
13     BumpPointerAllocator.h
14     ByteOrder.h
15     CPUTime.h
16     CagedPtr.h
17     CagedUniquePtr.h
18     ClockType.h
19     CompilationThread.h
20     Compiler.h
21     ConcurrentBuffer.h
22     ConcurrentPtrHashSet.h
23     ConcurrentVector.h
24     Condition.h
25     CountingLock.h
26     CrossThreadCopier.h
27     CrossThreadTask.h
28     CrossThreadTaskHandler.h
29     CryptographicUtilities.h
30     CryptographicallyRandomNumber.h
31     CurrentTime.h
32     DataLog.h
33     DateMath.h
34     Dominators.h
35     DecimalNumber.h
36     DeferrableRefCounted.h
37     Deque.h
38     DisallowCType.h
39     DoublyLinkedList.h
40     DumbPtrTraits.h
41     FastMalloc.h
42     FastTLS.h
43     FeatureDefines.h
44     FilePrintStream.h
45     FlipBytes.h
46     Forward.h
47     FunctionDispatcher.h
48     GetPtr.h
49     Gigacage.h
50     GlobalVersion.h
51     GraphNodeWorklist.h
52     GregorianDateTime.h
53     HashCountedSet.h
54     Hasher.h
55     HashFunctions.h
56     HashIterators.h
57     HashMap.h
58     HashMethod.h
59     HashSet.h
60     HashTable.h
61     HashTraits.h
62     HexNumber.h
63     IndexMap.h
64     IndexSet.h
65     IndexSparseSet.h
66     IndexedContainerIterator.h
67     IteratorAdaptors.h
68     IteratorRange.h
69     JSONValues.h
70     Language.h
71     ListHashSet.h
72     Liveness.h
73     Lock.h
74     LockAlgorithmInlines.h
75     LockAlgorithm.h
76     LockedPrintStream.h
77     Locker.h
78     LocklessBag.h
79     LoggingHashID.h
80     LoggingHashMap.h
81     LoggingHashSet.h
82     LoggingHashTraits.h
83     MD5.h
84     MainThread.h
85     MallocPtr.h
86     MathExtras.h
87     MediaTime.h
88     MemoryFootprint.h
89     MemoryPressureHandler.h
90     MessageQueue.h
91     MetaAllocator.h
92     MetaAllocatorHandle.h
93     NaturalLoops.h
94     MonotonicTime.h
95     Noncopyable.h
96     NumberOfCores.h
97     OSAllocator.h
98     OSRandomSource.h
99     OptionSet.h
100     OrderMaker.h
101     PageAllocation.h
102     PageBlock.h
103     PageReservation.h
104     ParallelHelperPool.h
105     ParallelJobs.h
106     ParallelJobsGeneric.h
107     ParallelJobsLibdispatch.h
108     ParallelJobsOpenMP.h
109     ParallelVectorIterator.h
110     ParkingLot.h
111     Platform.h
112     PlatformRegisters.h
113     Poisoned.h
114     PoisonedUniquePtr.h
115     PrintStream.h
116     ProcessID.h
117     RAMSize.h
118     RandomDevice.h
119     RandomNumber.h
120     RandomNumberSeed.h
121     Range.h
122     RangeSet.h
123     RawPointer.h
124     ReadWriteLock.h
125     RecursiveLockAdapter.h
126     RedBlackTree.h
127     Ref.h
128     RefCounted.h
129     RefCountedLeakCounter.h
130     RefCounter.h
131     RefPtr.h
132     RetainPtr.h
133     RunLoop.h
134     SHA1.h
135     SharedTask.h
136     SaturatedArithmetic.h
137     ScopedLambda.h
138     Seconds.h
139     SegmentedVector.h
140     SmallPtrSet.h
141     StackBounds.h
142     StackShot.h
143     StackShotProfiler.h
144     StackStats.h
145     StackTrace.h
146     StdLibExtras.h
147     Stopwatch.h
148     StringExtras.h
149     StringPrintStream.h
150     SystemFree.h
151     SystemTracing.h
152     ThreadGroup.h
153     ThreadMessage.h
154     ThreadSafeRefCounted.h
155     ThreadSpecific.h
156     Threading.h
157     ThreadingPrimitives.h
158     TimeWithDynamicClockType.h
159     TimingScope.h
160     TinyPtrSet.h
161     UUID.h
162     UniqueRef.h
163     VMTags.h
164     ValueCheck.h
165     Variant.h
166     Vector.h
167     VectorTraits.h
168     WallTime.h
169     WeakPtr.h
170     WordLock.h
171     WorkQueue.h
172     dtoa.h
173
174     dtoa/bignum-dtoa.h
175     dtoa/bignum.h
176     dtoa/cached-powers.h
177     dtoa/diy-fp.h
178     dtoa/double-conversion.h
179     dtoa/double.h
180     dtoa/fast-dtoa.h
181     dtoa/fixed-dtoa.h
182     dtoa/strtod.h
183     dtoa/utils.h
184
185     text/AtomicString.h
186     text/AtomicStringImpl.h
187     text/AtomicStringTable.h
188     text/Base64.h
189     text/CString.h
190     text/IntegerToStringConversion.h
191     text/LChar.h
192     text/LineEnding.h
193     text/LineBreakIteratorPoolICU.h
194     text/StringBuffer.h
195     text/StringCommon.h
196     text/StringHash.h
197     text/StringHasher.h
198     text/StringImpl.h
199     text/StringMalloc.h
200     text/StringVector.h
201     text/StringView.h
202     text/SymbolImpl.h
203     text/SymbolRegistry.h
204     text/TextBreakIterator.h
205     text/TextBreakIteratorInternalICU.h
206     text/TextStream.h
207     text/UniquedStringImpl.h
208     text/ValueToString.h
209     text/WTFString.h
210
211     text/icu/UTextProvider.h
212     text/icu/UTextProviderLatin1.h
213     text/icu/UTextProviderUTF16.h
214
215     threads/BinarySemaphore.h
216     threads/Signals.h
217
218     unicode/CharacterNames.h
219     unicode/Collator.h
220     unicode/UTF8.h
221 )
222
223 set(WTF_SOURCES
224     Assertions.cpp
225     Atomics.cpp
226     AutomaticThread.cpp
227     BitVector.cpp
228     CPUTime.cpp
229     ClockType.cpp
230     CompilationThread.cpp
231     ConcurrentPtrHashSet.cpp
232     CountingLock.cpp
233     CrossThreadCopier.cpp
234     CrossThreadTaskHandler.cpp
235     CryptographicUtilities.cpp
236     CryptographicallyRandomNumber.cpp
237     CurrentTime.cpp
238     DataLog.cpp
239     DateMath.cpp
240     DecimalNumber.cpp
241     FastBitVector.cpp
242     FastMalloc.cpp
243     FilePrintStream.cpp
244     FunctionDispatcher.cpp
245     Gigacage.cpp
246     GlobalVersion.cpp
247     GregorianDateTime.cpp
248     HashTable.cpp
249     JSONValues.cpp
250     JSValueMalloc.cpp
251     Language.cpp
252     Lock.cpp
253     LockedPrintStream.cpp
254     MD5.cpp
255     MainThread.cpp
256     MediaTime.cpp
257     MemoryPressureHandler.cpp
258     MetaAllocator.cpp
259     MonotonicTime.cpp
260     NumberOfCores.cpp
261     OSRandomSource.cpp
262     PageBlock.cpp
263     ParallelHelperPool.cpp
264     ParallelJobsGeneric.cpp
265     ParkingLot.cpp
266     PointerAsserts.cpp
267     Poisoned.cpp
268     PrintStream.cpp
269     RAMSize.cpp
270     RandomDevice.cpp
271     RandomNumber.cpp
272     ReadWriteLock.cpp
273     RefCountedLeakCounter.cpp
274     RunLoop.cpp
275     SHA1.cpp
276     Seconds.cpp
277     SixCharacterHash.cpp
278     StackBounds.cpp
279     StackStats.cpp
280     StackTrace.cpp
281     StringPrintStream.cpp
282     ThreadGroup.cpp
283     ThreadMessage.cpp
284     Threading.cpp
285     TimeWithDynamicClockType.cpp
286     TimingScope.cpp
287     UUID.cpp
288     WallTime.cpp
289     WordLock.cpp
290     WorkQueue.cpp
291     dtoa.cpp
292
293     dtoa/bignum-dtoa.cc
294     dtoa/bignum.cc
295     dtoa/cached-powers.cc
296     dtoa/diy-fp.cc
297     dtoa/double-conversion.cc
298     dtoa/fast-dtoa.cc
299     dtoa/fixed-dtoa.cc
300     dtoa/strtod.cc
301
302     persistence/PersistentCoders.cpp
303     persistence/PersistentDecoder.cpp
304     persistence/PersistentEncoder.cpp
305
306     text/AtomicString.cpp
307     text/AtomicStringImpl.cpp
308     text/AtomicStringTable.cpp
309     text/Base64.cpp
310     text/CString.cpp
311     text/LineEnding.cpp
312     text/StringBuilder.cpp
313     text/StringBuilderJSON.cpp
314     text/StringImpl.cpp
315     text/StringMalloc.cpp
316     text/StringView.cpp
317     text/SymbolImpl.cpp
318     text/SymbolRegistry.cpp
319     text/TextBreakIterator.cpp
320     text/TextStream.cpp
321     text/WTFString.cpp
322
323     text/icu/UTextProvider.cpp
324     text/icu/UTextProviderLatin1.cpp
325     text/icu/UTextProviderUTF16.cpp
326
327     threads/BinarySemaphore.cpp
328     threads/Signals.cpp
329
330     unicode/UTF8.cpp
331 )
332
333 set(WTF_INCLUDE_DIRECTORIES
334     "${BMALLOC_DIR}"
335     "${WTF_DIR}"
336     "${CMAKE_BINARY_DIR}"
337     "${DERIVED_SOURCES_DIR}"
338     "${THIRDPARTY_DIR}"
339 )
340
341 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
342     "${WTF_DIR}/wtf"
343     "${WTF_DIR}/wtf/dtoa"
344     "${WTF_DIR}/wtf/persistence"
345     "${WTF_DIR}/wtf/text"
346     "${WTF_DIR}/wtf/text/icu"
347     "${WTF_DIR}/wtf/threads"
348     "${WTF_DIR}/wtf/unicode"
349 )
350
351 set(WTF_LIBRARIES
352     ${CMAKE_DL_LIBS}
353 )
354
355 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
356     list(APPEND WTF_HEADERS
357         spi/darwin/CommonCryptoSPI.h
358     )
359     list(APPEND WTF_INCLUDE_DIRECTORIES
360         "${WTF_DIR}/wtf/spi/darwin"
361     )
362 endif ()
363
364 if (NOT USE_SYSTEM_MALLOC)
365     list(APPEND WTF_LIBRARIES bmalloc)
366 endif ()
367
368 list(APPEND WTF_SOURCES
369     unicode/icu/CollatorICU.cpp
370 )
371 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
372     ${ICU_INCLUDE_DIRS}
373 )
374 list(APPEND WTF_LIBRARIES
375     ${ICU_DATA_LIBRARIES}
376     ${ICU_I18N_LIBRARIES}
377     ${ICU_LIBRARIES}
378 )
379
380 if (WIN32)
381     list(APPEND WTF_SOURCES
382         OSAllocatorWin.cpp
383         ThreadSpecificWin.cpp
384         ThreadingWin.cpp
385     )
386     list(APPEND WTF_LIBRARIES
387         winmm
388     )
389 else ()
390     list(APPEND WTF_SOURCES
391         OSAllocatorPosix.cpp
392         ThreadingPthreads.cpp
393     )
394 endif ()
395
396 WEBKIT_FRAMEWORK_DECLARE(WTF)
397 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
398
399 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
400 WEBKIT_FRAMEWORK(WTF)
401
402 if (MSVC)
403     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
404     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
405
406     add_custom_command(
407         TARGET WTF
408         PRE_BUILD
409         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
410         VERBATIM)
411
412     add_custom_command(
413         TARGET WTF
414         POST_BUILD
415         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
416         VERBATIM)
417 endif ()
418
419 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
420
421 file(COPY
422     ../Scripts/generate-unified-source-bundles.rb
423     DESTINATION
424     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
425 )