-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (39 loc) · 1.08 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
37
38
39
40
41
42
43
44
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
PROJECT ("WAIN")
SET (TARGET "wain")
SET (SRC_SECTION
src/section/section.cpp
src/section/section_v1.cpp
src/section/instruction.cpp
src/section/init_expr.cpp
src/section/type_section.cpp
src/section/import_section.cpp
src/section/function_section.cpp
src/section/table_section.cpp
src/section/memory_section.cpp
src/section/global_section.cpp
src/section/export_section.cpp
src/section/element_section.cpp
src/section/code_section.cpp
src/section/data_section.cpp
)
SET (SRC_INTERPRETER
src/interpreter/interpreter.cpp
src/interpreter/stack.cpp
)
SET (SRC_FILES
src/main.cpp
src/loader/loader.cpp
src/memory/memory.cpp
src/type.cpp
src/module.cpp
${SRC_INTERPRETER}
${SRC_SECTION}
)
ADD_EXECUTABLE (${TARGET} ${SRC_FILES})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
COMPILE_FLAGS "-std=c++11 -g"
)
TARGET_INCLUDE_DIRECTORIES(${TARGET} PRIVATE src/ src/interpreter src/loader src/memory src/section)
INCLUDE (CTest)
ADD_TEST(NAME test COMMAND wain ./hell/hell.wasm)