-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (58 loc) · 1.63 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
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-register")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.2)
project(Prysme)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
BISON_TARGET(parser
src/pry_parser.yy
${CMAKE_CURRENT_BINARY_DIR}/pry_parser.tab.cpp)
FLEX_TARGET(scanner
src/pry_lexer.l
${CMAKE_CURRENT_BINARY_DIR}/pry_lexer.yy.cpp)
ADD_FLEX_BISON_DEPENDENCY(scanner parser)
add_executable(prysme
src/main.cpp
src/pry_driver
src/pry_scanner
src/variable/row
src/variable/table
src/variable/variable
src/variable/already_defined_exception
src/variable/not_found_exception
src/variable/constant_exception
src/variable/primitive_type
src/function/row
src/function/table
src/function/function
src/function/already_defined_exception
src/function/not_found_exception
src/tree/list
src/tree/scope
src/node/algebra_exception
src/node/assignment
src/node/bool_comparator
src/node/condition
src/node/declarement
src/node/display_variable_table
src/node/display_variable
src/node/for
src/node/function_call
src/node/function_declare
src/node/math
src/node/node
src/node/primitive
src/node/scope
src/node/variable
src/node/while
${FLEX_scanner_OUTPUTS}
${BISON_parser_OUTPUTS}
)
target_link_libraries(prysme ${FLEX_LIBRARIES} ${BISON_LIBRARIES})
target_include_directories(prysme
PRIVATE
src
.
${CMAKE_CURRENT_BINARY_DIR})
install (TARGETS prysme RUNTIME DESTINATION bin)