-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (70 loc) · 2.06 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.18)
project(Lolbison)
find_package(BISON)
find_package(FLEX)
set(HEADERS
${Lolbison_SOURCE_DIR}/driver.hh
${Lolbison_SOURCE_DIR}/parser.hh
)
BISON_TARGET(
MyParser
parser.y
${Lolbison_SOURCE_DIR}/parser.cpp
DEFINES_FILE ${Lolbison_SOURCE_DIR}/parser.hh
)
FLEX_TARGET(
MyScanner
scanner.l
${Lolbison_SOURCE_DIR}/scanner.cpp
)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
add_executable(
lolbison
main.cpp
driver.cpp
${BISON_MyParser_OUTPUTS}
${FLEX_MyScanner_OUTPUTS}
expressions/binary_ops/BinaryAnd.cpp
expressions/binary_ops/BinaryDiv.cpp
expressions/binary_ops/BinaryEq.cpp
expressions/binary_ops/BinaryMax.cpp
expressions/binary_ops/BinaryMin.cpp
expressions/binary_ops/BinaryMod.cpp
expressions/binary_ops/BinaryMul.cpp
expressions/binary_ops/BinaryNeq.cpp
expressions/binary_ops/BinaryOp.cpp
expressions/binary_ops/BinaryOr.cpp
expressions/binary_ops/BinarySub.cpp
expressions/binary_ops/BinarySum.cpp
expressions/binary_ops/BinaryXor.cpp
expressions/ArrayAccess.cpp
expressions/BooleanLiteral.cpp
expressions/Identifier.cpp
expressions/It.cpp
expressions/Join.cpp
expressions/LogicalNot.cpp
expressions/NumberLiteral.cpp
expressions/StringLiteral.cpp
statements/loop_components/DecrementLoopHead.cpp
statements/loop_components/IncrementLoopHead.cpp
statements/loop_components/LoopCondition.cpp
statements/loop_components/LoopHead.cpp
statements/loop_components/LoopUntil.cpp
statements/loop_components/LoopWhile.cpp
statements/ArrayAssign.cpp
statements/ArrayDecl.cpp
statements/ArrayNewIndex.cpp
statements/Break.cpp
statements/ExprStatement.cpp
statements/IfThen.cpp
statements/Loop.cpp
statements/Print.cpp
statements/VarAssign.cpp
statements/VarDecl.cpp
objects/BooleanObject.cpp
objects/NilObject.cpp
objects/NumberObject.cpp
objects/StringObject.cpp
Program.cpp
)
target_include_directories(lolbison PRIVATE ${Lolbison_SOURCE_DIR})