]> git.saurik.com Git - apple/javascriptcore.git/blob - CMakeLists.txt
JavaScriptCore-1097.3.3.tar.gz
[apple/javascriptcore.git] / CMakeLists.txt
1 SET(JavaScriptCore_INCLUDE_DIRECTORIES
2 "${CMAKE_BINARY_DIR}"
3 "${JAVASCRIPTCORE_DIR}"
4 "${JAVASCRIPTCORE_DIR}/API"
5 "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
6 "${JAVASCRIPTCORE_DIR}/assembler"
7 "${JAVASCRIPTCORE_DIR}/bytecode"
8 "${JAVASCRIPTCORE_DIR}/bytecompiler"
9 "${JAVASCRIPTCORE_DIR}/dfg"
10 "${JAVASCRIPTCORE_DIR}/heap"
11 "${JAVASCRIPTCORE_DIR}/debugger"
12 "${JAVASCRIPTCORE_DIR}/interpreter"
13 "${JAVASCRIPTCORE_DIR}/jit"
14 "${JAVASCRIPTCORE_DIR}/llint"
15 "${JAVASCRIPTCORE_DIR}/parser"
16 "${JAVASCRIPTCORE_DIR}/profiler"
17 "${JAVASCRIPTCORE_DIR}/runtime"
18 "${JAVASCRIPTCORE_DIR}/tools"
19 "${JAVASCRIPTCORE_DIR}/yarr"
20 "${WTF_DIR}"
21 "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
22 "${CMAKE_SOURCE_DIR}/Source"
23 )
24
25 SET(JavaScriptCore_SOURCES
26 API/JSBase.cpp
27 API/JSCallbackConstructor.cpp
28 API/JSCallbackFunction.cpp
29 API/JSCallbackObject.cpp
30 API/JSClassRef.cpp
31 API/JSContextRef.cpp
32 API/JSObjectRef.cpp
33 API/JSProfilerPrivate.cpp
34 API/JSStringRef.cpp
35 API/JSValueRef.cpp
36 API/JSWeakObjectMapRefPrivate.cpp
37 API/OpaqueJSString.cpp
38
39 bytecode/CallLinkInfo.cpp
40 bytecode/CallLinkStatus.cpp
41 bytecode/CodeBlock.cpp
42 bytecode/DFGExitProfile.cpp
43 bytecode/ExecutionCounter.cpp
44 bytecode/GetByIdStatus.cpp
45 bytecode/JumpTable.cpp
46 bytecode/LazyOperandValueProfile.cpp
47 bytecode/MethodCallLinkInfo.cpp
48 bytecode/MethodCallLinkStatus.cpp
49 bytecode/MethodOfGettingAValueProfile.cpp
50 bytecode/Opcode.cpp
51 bytecode/PolymorphicPutByIdList.cpp
52 bytecode/PredictedType.cpp
53 bytecode/PutByIdStatus.cpp
54 bytecode/SamplingTool.cpp
55 bytecode/StructureStubInfo.cpp
56
57 bytecompiler/BytecodeGenerator.cpp
58 bytecompiler/NodesCodegen.cpp
59
60 dfg/DFGAbstractState.cpp
61 dfg/DFGAssemblyHelpers.cpp
62 dfg/DFGByteCodeParser.cpp
63 dfg/DFGCapabilities.cpp
64 dfg/DFGCFAPhase.cpp
65 dfg/DFGCorrectableJumpPoint.cpp
66 dfg/DFGCSEPhase.cpp
67 dfg/DFGDriver.cpp
68 dfg/DFGFixupPhase.cpp
69 dfg/DFGGraph.cpp
70 dfg/DFGJITCompiler.cpp
71 dfg/DFGNodeFlags.cpp
72 dfg/DFGOSREntry.cpp
73 dfg/DFGOSRExit.cpp
74 dfg/DFGOSRExitCompiler.cpp
75 dfg/DFGOSRExitCompiler32_64.cpp
76 dfg/DFGOSRExitCompiler64.cpp
77 dfg/DFGOperations.cpp
78 dfg/DFGPhase.cpp
79 dfg/DFGPredictionPropagationPhase.cpp
80 dfg/DFGRedundantPhiEliminationPhase.cpp
81 dfg/DFGRepatch.cpp
82 dfg/DFGSpeculativeJIT.cpp
83 dfg/DFGSpeculativeJIT32_64.cpp
84 dfg/DFGSpeculativeJIT64.cpp
85 dfg/DFGThunks.cpp
86 dfg/DFGVirtualRegisterAllocationPhase.cpp
87
88 heap/BlockAllocator.cpp
89 heap/CopiedSpace.cpp
90 heap/ConservativeRoots.cpp
91 heap/DFGCodeBlocks.cpp
92 heap/HandleSet.cpp
93 heap/HandleStack.cpp
94 heap/Heap.cpp
95 heap/MachineStackMarker.cpp
96 heap/MarkedAllocator.cpp
97 heap/MarkedBlock.cpp
98 heap/MarkedSpace.cpp
99 heap/MarkStack.cpp
100 heap/WeakSet.cpp
101 heap/WeakHandleOwner.cpp
102 heap/WeakBlock.cpp
103
104 debugger/Debugger.cpp
105 debugger/DebuggerActivation.cpp
106 debugger/DebuggerCallFrame.cpp
107
108 interpreter/AbstractPC.cpp
109 interpreter/CallFrame.cpp
110 interpreter/Interpreter.cpp
111 interpreter/RegisterFile.cpp
112
113 jit/ExecutableAllocator.cpp
114 jit/HostCallReturnValue.cpp
115 jit/JITArithmetic32_64.cpp
116 jit/JITArithmetic.cpp
117 jit/JITCall32_64.cpp
118 jit/JITCall.cpp
119 jit/JIT.cpp
120 jit/JITExceptions.cpp
121 jit/JITOpcodes32_64.cpp
122 jit/JITOpcodes.cpp
123 jit/JITPropertyAccess32_64.cpp
124 jit/JITPropertyAccess.cpp
125 jit/JITStubs.cpp
126 jit/ThunkGenerators.cpp
127
128 parser/Lexer.cpp
129 parser/Nodes.cpp
130 parser/Parser.cpp
131 parser/ParserArena.cpp
132 parser/SourceProviderCache.cpp
133
134 profiler/Profile.cpp
135 profiler/ProfileGenerator.cpp
136 profiler/ProfileNode.cpp
137 profiler/Profiler.cpp
138
139 runtime/ArgList.cpp
140 runtime/Arguments.cpp
141 runtime/ArrayConstructor.cpp
142 runtime/ArrayPrototype.cpp
143 runtime/BooleanConstructor.cpp
144 runtime/BooleanObject.cpp
145 runtime/BooleanPrototype.cpp
146 runtime/CallData.cpp
147 runtime/CommonIdentifiers.cpp
148 runtime/Completion.cpp
149 runtime/ConstructData.cpp
150 runtime/DateConstructor.cpp
151 runtime/DateConversion.cpp
152 runtime/DateInstance.cpp
153 runtime/DatePrototype.cpp
154 runtime/Error.cpp
155 runtime/ErrorConstructor.cpp
156 runtime/ErrorInstance.cpp
157 runtime/ErrorPrototype.cpp
158 runtime/ExceptionHelpers.cpp
159 runtime/Executable.cpp
160 runtime/FunctionConstructor.cpp
161 runtime/FunctionPrototype.cpp
162 runtime/GCActivityCallback.cpp
163 runtime/GetterSetter.cpp
164 runtime/Identifier.cpp
165 runtime/InitializeThreading.cpp
166 runtime/InternalFunction.cpp
167 runtime/JSActivation.cpp
168 runtime/JSAPIValueWrapper.cpp
169 runtime/JSArray.cpp
170 runtime/JSCell.cpp
171 runtime/JSDateMath.cpp
172 runtime/JSFunction.cpp
173 runtime/JSBoundFunction.cpp
174 runtime/JSGlobalData.cpp
175 runtime/JSGlobalObject.cpp
176 runtime/JSGlobalObjectFunctions.cpp
177 runtime/JSGlobalThis.cpp
178 runtime/JSLock.cpp
179 runtime/JSNotAnObject.cpp
180 runtime/JSObject.cpp
181 runtime/JSONObject.cpp
182 runtime/JSPropertyNameIterator.cpp
183 runtime/JSStaticScopeObject.cpp
184 runtime/JSString.cpp
185 runtime/JSStringJoiner.cpp
186 runtime/JSValue.cpp
187 runtime/JSVariableObject.cpp
188 runtime/JSWrapperObject.cpp
189 runtime/LiteralParser.cpp
190 runtime/Lookup.cpp
191 runtime/MathObject.cpp
192 runtime/NativeErrorConstructor.cpp
193 runtime/NativeErrorPrototype.cpp
194 runtime/NumberConstructor.cpp
195 runtime/NumberObject.cpp
196 runtime/NumberPrototype.cpp
197 runtime/ObjectConstructor.cpp
198 runtime/ObjectPrototype.cpp
199 runtime/Operations.cpp
200 runtime/Options.cpp
201 runtime/PropertyDescriptor.cpp
202 runtime/PropertyNameArray.cpp
203 runtime/PropertySlot.cpp
204 runtime/RegExp.cpp
205 runtime/RegExpCache.cpp
206 runtime/RegExpConstructor.cpp
207 runtime/RegExpCachedResult.cpp
208 runtime/RegExpMatchesArray.cpp
209 runtime/RegExpObject.cpp
210 runtime/RegExpPrototype.cpp
211 runtime/ScopeChain.cpp
212 runtime/SmallStrings.cpp
213 runtime/StrictEvalActivation.cpp
214 runtime/StringConstructor.cpp
215 runtime/StringObject.cpp
216 runtime/StringPrototype.cpp
217 runtime/StringRecursionChecker.cpp
218 runtime/Structure.cpp
219 runtime/StructureChain.cpp
220 runtime/TimeoutChecker.cpp
221 runtime/UString.cpp
222
223 tools/CodeProfile.cpp
224 tools/CodeProfiling.cpp
225
226 yarr/YarrCanonicalizeUCS2.cpp
227 yarr/YarrPattern.cpp
228 yarr/YarrInterpreter.cpp
229 yarr/YarrJIT.cpp
230 yarr/YarrSyntaxChecker.cpp
231 )
232
233 SET(JavaScriptCore_LUT_FILES
234 runtime/ArrayConstructor.cpp
235 runtime/ArrayPrototype.cpp
236 runtime/BooleanPrototype.cpp
237 runtime/DateConstructor.cpp
238 runtime/DatePrototype.cpp
239 runtime/ErrorPrototype.cpp
240 runtime/JSGlobalObject.cpp
241 runtime/JSONObject.cpp
242 runtime/MathObject.cpp
243 runtime/NumberConstructor.cpp
244 runtime/NumberPrototype.cpp
245 runtime/ObjectConstructor.cpp
246 runtime/ObjectPrototype.cpp
247 runtime/RegExpConstructor.cpp
248 runtime/RegExpObject.cpp
249 runtime/RegExpPrototype.cpp
250 runtime/StringConstructor.cpp
251 runtime/StringPrototype.cpp
252 )
253
254 SET(JavaScriptCore_LIBRARIES
255 ${WTF_LIBRARY_NAME}
256 )
257
258
259 # GENERATOR 1-A: LUT creator
260 FOREACH (_file ${JavaScriptCore_LUT_FILES})
261 GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
262 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
263 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
264 ENDFOREACH ()
265
266
267 # GENERATOR 1-B: particular LUT creator (for 1 file only)
268 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
269 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
270
271 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
272 ADD_CUSTOM_COMMAND(
273 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
274 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
275 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
276 VERBATIM)
277 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
278
279
280 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
281 ADD_CUSTOM_COMMAND(
282 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
283 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
284 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
285 VERBATIM)
286 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
287
288 IF (WTF_CPU_ARM)
289 LIST(APPEND JavaScriptCore_SOURCES
290 assembler/ARMAssembler.cpp
291 assembler/ARMv7Assembler.cpp
292 assembler/MacroAssemblerARM.cpp
293 )
294 ELSEIF (WTF_CPU_MIPS)
295 ELSEIF (WTF_CPU_X86)
296 ELSEIF (WTF_CPU_X86_64)
297 ELSE ()
298 MESSAGE(FATAL_ERROR "Unknown CPU")
299 ENDIF ()
300
301
302 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
303
304
305 ADD_SUBDIRECTORY(shell)
306
307 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
308 INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
309 ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
310 ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
311 TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
312 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
313 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
314
315 IF (JavaScriptCore_LINK_FLAGS)
316 ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
317 ENDIF ()
318
319 IF (SHARED_CORE)
320 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
321 INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
322 ENDIF ()