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