Add infrastructure for pointer preparation.
[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     PointerPreparations.h
114     Poisoned.h
115     PoisonedUniquePtr.h
116     PrintStream.h
117     ProcessID.h
118     RAMSize.h
119     RandomDevice.h
120     RandomNumber.h
121     RandomNumberSeed.h
122     Range.h
123     RangeSet.h
124     RawPointer.h
125     ReadWriteLock.h
126     RecursiveLockAdapter.h
127     RedBlackTree.h
128     Ref.h
129     RefCounted.h
130     RefCountedLeakCounter.h
131     RefCounter.h
132     RefPtr.h
133     RetainPtr.h
134     RunLoop.h
135     SHA1.h
136     SharedTask.h
137     SaturatedArithmetic.h
138     ScopedLambda.h
139     Seconds.h
140     SegmentedVector.h
141     SmallPtrSet.h
142     StackBounds.h
143     StackShot.h
144     StackShotProfiler.h
145     StackStats.h
146     StackTrace.h
147     StdLibExtras.h
148     Stopwatch.h
149     StringExtras.h
150     StringPrintStream.h
151     SystemFree.h
152     SystemTracing.h
153     ThreadGroup.h
154     ThreadMessage.h
155     ThreadSafeRefCounted.h
156     ThreadSpecific.h
157     Threading.h
158     ThreadingPrimitives.h
159     TimeWithDynamicClockType.h
160     TimingScope.h
161     TinyPtrSet.h
162     UUID.h
163     UniqueRef.h
164     VMTags.h
165     ValueCheck.h
166     Variant.h
167     Vector.h
168     VectorTraits.h
169     WallTime.h
170     WeakPtr.h
171     WordLock.h
172     WorkQueue.h
173     dtoa.h
174
175     dtoa/bignum-dtoa.h
176     dtoa/bignum.h
177     dtoa/cached-powers.h
178     dtoa/diy-fp.h
179     dtoa/double-conversion.h
180     dtoa/double.h
181     dtoa/fast-dtoa.h
182     dtoa/fixed-dtoa.h
183     dtoa/strtod.h
184     dtoa/utils.h
185
186     text/AtomicString.h
187     text/AtomicStringImpl.h
188     text/AtomicStringTable.h
189     text/Base64.h
190     text/CString.h
191     text/IntegerToStringConversion.h
192     text/LChar.h
193     text/LineEnding.h
194     text/LineBreakIteratorPoolICU.h
195     text/StringBuffer.h
196     text/StringCommon.h
197     text/StringHash.h
198     text/StringHasher.h
199     text/StringImpl.h
200     text/StringMalloc.h
201     text/StringVector.h
202     text/StringView.h
203     text/SymbolImpl.h
204     text/SymbolRegistry.h
205     text/TextBreakIterator.h
206     text/TextBreakIteratorInternalICU.h
207     text/TextStream.h
208     text/UniquedStringImpl.h
209     text/ValueToString.h
210     text/WTFString.h
211
212     text/icu/UTextProvider.h
213     text/icu/UTextProviderLatin1.h
214     text/icu/UTextProviderUTF16.h
215
216     threads/BinarySemaphore.h
217     threads/Signals.h
218
219     unicode/CharacterNames.h
220     unicode/Collator.h
221     unicode/UTF8.h
222 )
223
224 set(WTF_SOURCES
225     Assertions.cpp
226     Atomics.cpp
227     AutomaticThread.cpp
228     BitVector.cpp
229     CPUTime.cpp
230     ClockType.cpp
231     CompilationThread.cpp
232     ConcurrentPtrHashSet.cpp
233     CountingLock.cpp
234     CrossThreadCopier.cpp
235     CrossThreadTaskHandler.cpp
236     CryptographicUtilities.cpp
237     CryptographicallyRandomNumber.cpp
238     CurrentTime.cpp
239     DataLog.cpp
240     DateMath.cpp
241     DecimalNumber.cpp
242     FastBitVector.cpp
243     FastMalloc.cpp
244     FilePrintStream.cpp
245     FunctionDispatcher.cpp
246     Gigacage.cpp
247     GlobalVersion.cpp
248     GregorianDateTime.cpp
249     HashTable.cpp
250     JSONValues.cpp
251     JSValueMalloc.cpp
252     Language.cpp
253     Lock.cpp
254     LockedPrintStream.cpp
255     MD5.cpp
256     MainThread.cpp
257     MediaTime.cpp
258     MemoryPressureHandler.cpp
259     MetaAllocator.cpp
260     MonotonicTime.cpp
261     NumberOfCores.cpp
262     OSRandomSource.cpp
263     PageBlock.cpp
264     ParallelHelperPool.cpp
265     ParallelJobsGeneric.cpp
266     ParkingLot.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     WTFAssertions.cpp
289     WallTime.cpp
290     WordLock.cpp
291     WorkQueue.cpp
292     dtoa.cpp
293
294     dtoa/bignum-dtoa.cc
295     dtoa/bignum.cc
296     dtoa/cached-powers.cc
297     dtoa/diy-fp.cc
298     dtoa/double-conversion.cc
299     dtoa/fast-dtoa.cc
300     dtoa/fixed-dtoa.cc
301     dtoa/strtod.cc
302
303     persistence/PersistentCoders.cpp
304     persistence/PersistentDecoder.cpp
305     persistence/PersistentEncoder.cpp
306
307     text/AtomicString.cpp
308     text/AtomicStringImpl.cpp
309     text/AtomicStringTable.cpp
310     text/Base64.cpp
311     text/CString.cpp
312     text/LineEnding.cpp
313     text/StringBuilder.cpp
314     text/StringBuilderJSON.cpp
315     text/StringImpl.cpp
316     text/StringMalloc.cpp
317     text/StringView.cpp
318     text/SymbolImpl.cpp
319     text/SymbolRegistry.cpp
320     text/TextBreakIterator.cpp
321     text/TextStream.cpp
322     text/WTFString.cpp
323
324     text/icu/UTextProvider.cpp
325     text/icu/UTextProviderLatin1.cpp
326     text/icu/UTextProviderUTF16.cpp
327
328     threads/BinarySemaphore.cpp
329     threads/Signals.cpp
330
331     unicode/UTF8.cpp
332 )
333
334 set(WTF_INCLUDE_DIRECTORIES
335     "${BMALLOC_DIR}"
336     "${WTF_DIR}"
337     "${CMAKE_BINARY_DIR}"
338     "${DERIVED_SOURCES_DIR}"
339     "${THIRDPARTY_DIR}"
340 )
341
342 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
343     "${WTF_DIR}/wtf"
344     "${WTF_DIR}/wtf/dtoa"
345     "${WTF_DIR}/wtf/persistence"
346     "${WTF_DIR}/wtf/text"
347     "${WTF_DIR}/wtf/text/icu"
348     "${WTF_DIR}/wtf/threads"
349     "${WTF_DIR}/wtf/unicode"
350 )
351
352 set(WTF_LIBRARIES
353     ${CMAKE_DL_LIBS}
354 )
355
356 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
357     list(APPEND WTF_HEADERS
358         spi/darwin/CommonCryptoSPI.h
359     )
360     list(APPEND WTF_INCLUDE_DIRECTORIES
361         "${WTF_DIR}/wtf/spi/darwin"
362     )
363 endif ()
364
365 if (NOT USE_SYSTEM_MALLOC)
366     list(APPEND WTF_LIBRARIES bmalloc)
367 endif ()
368
369 list(APPEND WTF_SOURCES
370     unicode/icu/CollatorICU.cpp
371 )
372 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
373     ${ICU_INCLUDE_DIRS}
374 )
375 list(APPEND WTF_LIBRARIES
376     ${ICU_DATA_LIBRARIES}
377     ${ICU_I18N_LIBRARIES}
378     ${ICU_LIBRARIES}
379 )
380
381 if (WIN32)
382     list(APPEND WTF_SOURCES
383         OSAllocatorWin.cpp
384         ThreadSpecificWin.cpp
385         ThreadingWin.cpp
386     )
387     list(APPEND WTF_LIBRARIES
388         winmm
389     )
390 else ()
391     list(APPEND WTF_SOURCES
392         OSAllocatorPosix.cpp
393         ThreadingPthreads.cpp
394     )
395 endif ()
396
397 WEBKIT_FRAMEWORK_DECLARE(WTF)
398 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
399
400 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
401 WEBKIT_FRAMEWORK(WTF)
402
403 if (MSVC)
404     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
405     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
406
407     add_custom_command(
408         TARGET WTF
409         PRE_BUILD
410         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
411         VERBATIM)
412
413     add_custom_command(
414         TARGET WTF
415         POST_BUILD
416         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
417         VERBATIM)
418 endif ()
419
420 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
421
422 file(COPY
423     ../Scripts/generate-unified-source-bundles.rb
424     DESTINATION
425     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
426 )