B3/Air should use bubble sort for their insertion sets, because it's faster than...
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_HEADERS
2     ASCIICType.h
3     Assertions.h
4     Atomics.h
5     Bag.h
6     BagToHashMap.h
7     BitVector.h
8     Bitmap.h
9     BubbleSort.h
10     BumpPointerAllocator.h
11     ByteOrder.h
12     CompilationThread.h
13     Compiler.h
14     Condition.h
15     CryptographicUtilities.h
16     CryptographicallyRandomNumber.h
17     CurrentTime.h
18     DataLog.h
19     DateMath.h
20     Dominators.h
21     DecimalNumber.h
22     DeferrableRefCounted.h
23     Deque.h
24     DisallowCType.h
25     DoublyLinkedList.h
26     FastMalloc.h
27     FeatureDefines.h
28     FilePrintStream.h
29     FlipBytes.h
30     Forward.h
31     FunctionDispatcher.h
32     Functional.h
33     GetPtr.h
34     GraphNodeWorklist.h
35     GregorianDateTime.h
36     HashCountedSet.h
37     Hasher.h
38     HashFunctions.h
39     HashIterators.h
40     HashMap.h
41     HashMethod.h
42     HashSet.h
43     HashTable.h
44     HashTraits.h
45     HexNumber.h
46     IteratorAdaptors.h
47     IteratorRange.h
48     ListHashSet.h
49     Lock.h
50     Locker.h
51     MD5.h
52     MainThread.h
53     MallocPtr.h
54     MathExtras.h
55     MediaTime.h
56     MessageQueue.h
57     MetaAllocator.h
58     MetaAllocatorHandle.h
59     Noncopyable.h
60     NumberOfCores.h
61     OSAllocator.h
62     OSRandomSource.h
63     PageAllocation.h
64     PageBlock.h
65     PageReservation.h
66     ParallelHelperPool.h
67     ParallelJobs.h
68     ParallelJobsGeneric.h
69     ParallelJobsLibdispatch.h
70     ParallelJobsOpenMP.h
71     ParallelVectorIterator.h
72     ParkingLot.h
73     PassRefPtr.h
74     Platform.h
75     PrintStream.h
76     ProcessID.h
77     RAMSize.h
78     RandomNumber.h
79     RandomNumberSeed.h
80     RawPointer.h
81     RedBlackTree.h
82     Ref.h
83     RefCounted.h
84     RefCountedLeakCounter.h
85     RefCounter.h
86     RefPtr.h
87     RetainPtr.h
88     RunLoop.h
89     SHA1.h
90     SharedTask.h
91     SaturatedArithmetic.h
92     ScopedLambda.h
93     SegmentedVector.h
94     StackBounds.h
95     StackStats.h
96     StaticConstructors.h
97     StdLibExtras.h
98     Stopwatch.h
99     StringExtras.h
100     StringPrintStream.h
101     ThreadIdentifierDataPthreads.h
102     ThreadSafeRefCounted.h
103     ThreadSpecific.h
104     Threading.h
105     ThreadingPrimitives.h
106     TinyPtrSet.h
107     VMTags.h
108     ValueCheck.h
109     Vector.h
110     VectorTraits.h
111     WTFThreadData.h
112     WeakPtr.h
113     WordLock.h
114     WorkQueue.h
115     dtoa.h
116
117     dtoa/bignum-dtoa.h
118     dtoa/bignum.h
119     dtoa/cached-powers.h
120     dtoa/diy-fp.h
121     dtoa/double-conversion.h
122     dtoa/double.h
123     dtoa/fast-dtoa.h
124     dtoa/fixed-dtoa.h
125     dtoa/strtod.h
126     dtoa/utils.h
127
128     text/AtomicString.h
129     text/AtomicStringImpl.h
130     text/AtomicStringTable.h
131     text/Base64.h
132     text/CString.h
133     text/IntegerToStringConversion.h
134     text/LChar.h
135     text/StringBuffer.h
136     text/StringCommon.h
137     text/StringHash.h
138     text/StringImpl.h
139     text/StringView.h
140     text/SymbolImpl.h
141     text/SymbolRegistry.h
142     text/UniquedStringImpl.h
143     text/WTFString.h
144
145     threads/BinarySemaphore.h
146
147     unicode/CharacterNames.h
148     unicode/Collator.h
149     unicode/UTF8.h
150 )
151
152 set(WTF_SOURCES
153     Assertions.cpp
154     Atomics.cpp
155     BitVector.cpp
156     CompilationThread.cpp
157     CryptographicUtilities.cpp
158     CryptographicallyRandomNumber.cpp
159     CurrentTime.cpp
160     DataLog.cpp
161     DateMath.cpp
162     DecimalNumber.cpp
163     FastBitVector.cpp
164     FastMalloc.cpp
165     FilePrintStream.cpp
166     FunctionDispatcher.cpp
167     GregorianDateTime.cpp
168     HashTable.cpp
169     Lock.cpp
170     MD5.cpp
171     MainThread.cpp
172     MediaTime.cpp
173     MetaAllocator.cpp
174     NumberOfCores.cpp
175     OSRandomSource.cpp
176     PageBlock.cpp
177     ParallelHelperPool.cpp
178     ParallelJobsGeneric.cpp
179     ParkingLot.cpp
180     PrintStream.cpp
181     RAMSize.cpp
182     RandomNumber.cpp
183     RefCountedLeakCounter.cpp
184     RefCounter.cpp
185     RunLoop.cpp
186     SHA1.cpp
187     SixCharacterHash.cpp
188     StackBounds.cpp
189     StackStats.cpp
190     StringPrintStream.cpp
191     Threading.cpp
192     WTFThreadData.cpp
193     WordLock.cpp
194     WorkQueue.cpp
195     dtoa.cpp
196
197     dtoa/bignum-dtoa.cc
198     dtoa/bignum.cc
199     dtoa/cached-powers.cc
200     dtoa/diy-fp.cc
201     dtoa/double-conversion.cc
202     dtoa/fast-dtoa.cc
203     dtoa/fixed-dtoa.cc
204     dtoa/strtod.cc
205
206     text/AtomicString.cpp
207     text/AtomicStringImpl.cpp
208     text/AtomicStringTable.cpp
209     text/Base64.cpp
210     text/CString.cpp
211     text/StringBuilder.cpp
212     text/StringImpl.cpp
213     text/StringStatics.cpp
214     text/StringView.cpp
215     text/SymbolRegistry.cpp
216     text/WTFString.cpp
217
218     threads/BinarySemaphore.cpp
219
220     unicode/UTF8.cpp
221 )
222
223 set(WTF_INCLUDE_DIRECTORIES
224     "${BMALLOC_DIR}"
225     "${WTF_DIR}"
226     "${WTF_DIR}/wtf"
227     "${WTF_DIR}/wtf/dtoa"
228     "${WTF_DIR}/wtf/text"
229     "${WTF_DIR}/wtf/threads"
230     "${WTF_DIR}/wtf/unicode"
231     "${THIRDPARTY_DIR}"
232     "${CMAKE_BINARY_DIR}"
233     "${DERIVED_SOURCES_DIR}"
234 )
235
236 set(WTF_LIBRARIES
237     ${CMAKE_DL_LIBS}
238 )
239
240 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
241     list(APPEND WTF_HEADERS
242         spi/darwin/CommonCryptoSPI.h
243     )
244     list(APPEND WTF_INCLUDE_DIRECTORIES
245         "${WTF_DIR}/wtf/spi/darwin"
246     )
247 endif ()
248
249 # FIXME: Port bmalloc to Windows. https://bugs.webkit.org/show_bug.cgi?id=143310
250 if (NOT WIN32)
251     list(APPEND WTF_LIBRARIES bmalloc)
252 endif ()
253
254 list(APPEND WTF_SOURCES
255     unicode/icu/CollatorICU.cpp
256 )
257 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
258     ${ICU_INCLUDE_DIRS}
259 )
260 list(APPEND WTF_LIBRARIES
261     ${ICU_I18N_LIBRARIES}
262     ${ICU_LIBRARIES}
263 )
264
265 if (WIN32)
266     list(APPEND WTF_SOURCES
267         OSAllocatorWin.cpp
268         ThreadSpecificWin.cpp
269         ThreadingWin.cpp
270     )
271 else ()
272     list(APPEND WTF_HEADERS
273         ThreadIdentifierDataPthreads.h
274     )
275     list(APPEND WTF_SOURCES
276         OSAllocatorPosix.cpp
277         ThreadIdentifierDataPthreads.cpp
278         ThreadingPthreads.cpp
279     )
280 endif ()
281
282 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
283
284 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
285 include_directories(${WTF_INCLUDE_DIRECTORIES})
286 include_directories(SYSTEM ${WTF_SYSTEM_INCLUDE_DIRECTORIES})
287 add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
288 target_link_libraries(WTF ${WTF_LIBRARIES})
289 set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
290 set_target_properties(WTF PROPERTIES FOLDER "JavaScriptCore")
291
292 if (MSVC)
293     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
294     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
295 endif ()
296
297 if (WTF_POST_BUILD_COMMAND)
298     add_custom_command(TARGET WTF POST_BUILD COMMAND ${WTF_POST_BUILD_COMMAND} VERBATIM)
299 endif ()
300
301 if (WTF_OUTPUT_NAME)
302     set_target_properties(WTF PROPERTIES OUTPUT_NAME ${WTF_OUTPUT_NAME})
303 endif ()
304
305 WEBKIT_FRAMEWORK(WTF)