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