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