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