-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (27 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.22.1)
project(jvm CXX)
# Use C++20
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_options(-fno-gnu-keywords) # JS::Value has a method named typeof, which also happens to be a GNU keyword.
add_compile_options(-Wno-unknown-warning-option) # We don't really care about if an option doesn't exist
# Both GCC and clang complain about the same issue, but use different warning names.
# AK::StringView defines operator"" sv, they complain because it does not have an underscore.
add_compile_options(-Wno-user-defined-literals)
add_compile_options(-Wno-literal-suffix)
# Use Lagom from SerenityOS
include(FetchContent)
include(CMake/FetchLagom.cmake)
set(SOURCES
src/main.cpp
src/Interpreter/SymbolicatedConstantPool.cpp
src/Interpreter/SymbolicatedReference.cpp
src/Parser/Attribute.cpp
src/Parser/ClassParser.cpp
src/Parser/ConstantInfo.cpp
src/Parser/ConstantPool.cpp
)
add_executable(jvm ${SOURCES})
target_link_libraries(jvm Lagom::Core LibCore LibMain)
install(TARGETS jvm RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})