This repository has been archived by the owner on May 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
115 lines (87 loc) · 3.28 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
cmake_minimum_required(VERSION 3.5)
project(Automata VERSION 1.1.0)
#include(CTest)
#enable_testing()
set(CMAKE_CXX_FLAGS_INIT "-Werror -Wall -Wextra -Wpedantic -march=native")
set(CMAKE_CXX_STANDARD 14)
# Ba1INF
set(DFA_sources
"src/Finite_Automata/DFA.cpp"
"src/Finite_Automata/RE.cpp"
"src/Finite_Automata/ENFA.cpp"
"src/Finite_Automata/Node.cpp"
"src/Finite_Automata/transition.cpp"
"src/Finite_Automata/transitionNFA.cpp"
)
set(NFA_sources
"src/Finite_Automata/DFA.cpp"
"src/Finite_Automata/NFA.cpp"
"src/Finite_Automata/RE.cpp"
"src/Finite_Automata/ENFA.cpp"
"src/Finite_Automata/Node.cpp"
"src/Finite_Automata/transition.cpp"
"src/Finite_Automata/transitionNFA.cpp"
)
set(MSSC_sources
"src/Finite_Automata/ENFA.cpp"
"src/Finite_Automata/DFA.cpp"
"src/Finite_Automata/RE.cpp"
"src/Finite_Automata/Node.cpp"
"src/Finite_Automata/transition.cpp"
"src/Finite_Automata/transitionNFA.cpp"
)
set(RE_sources
"src/Finite_Automata/RE.cpp"
"src/Finite_Automata/ENFA.cpp"
"src/Finite_Automata/DFA.cpp"
"src/Finite_Automata/Node.cpp"
"src/Finite_Automata/transition.cpp"
"src/Finite_Automata/transitionNFA.cpp"
)
set(STATE_ELIMINATION_sources
"src/Finite_Automata/ENFA.cpp"
"src/Finite_Automata/DFA.cpp"
"src/Finite_Automata/RE.cpp"
"src/Finite_Automata/Node.cpp"
"src/Finite_Automata/transition.cpp"
"src/Finite_Automata/transitionNFA.cpp"
)
# Ba2INF
set(CFG_sources
"src/Context_Free/CFG.cpp"
"src/Context_Free/Variable.cpp"
)
set(PDA_sources
"src/Context_Free/PDA.h"
"src/Context_Free/PDA.cpp"
"src/Context_Free/CFG.h"
"src/Context_Free/CFG.cpp"
"src/Context_Free/State.cpp"
"src/Context_Free/Transition.cpp"
"src/Context_Free/Variable.h"
"src/Context_Free/Variable.cpp"
)
set(LL1_sources
"src/Context_Free/CFG.cpp"
"src/Context_Free/Variable.cpp"
)
add_executable(DFA ${DFA_sources} Test_files/DFA_test.cpp)
add_executable(NFA ${NFA_sources} Test_files/NFA_test.cpp)
add_executable(SSC ${NFA_sources} Test_files/SSC_test.cpp)
add_executable(MSSC ${MSSC_sources} Test_files/MSSC_test.cpp)
add_executable(PA ${DFA_sources} Test_files/Product_test.cpp)
add_executable(RE ${RE_sources} Test_files/REGEX_test.cpp)
add_executable(TFA ${DFA_sources} Test_files/TFA_test.cpp)
add_executable(STATE_ELIM ${STATE_ELIMINATION_sources} Test_files/StateElimination_test.cpp)
add_executable(CFG ${CFG_sources} Test_files/CFG_test.cpp)
add_executable(CNF ${CFG_sources} Test_files/CNF_test.cpp)
add_executable(CYK ${CFG_sources} Test_files/CYK_test.cpp)
add_executable(PDA ${PDA_sources} Test_files/PDA_test.cpp)
add_executable(LL1 ${CFG_sources} Test_files/LL1_test.cpp)
INSTALL(TARGETS DFA NFA SSC MSSC PA RE TFA CFG CNF CYK PDA LL1 DESTINATION "${CMAKE_BINARY_DIR}/installed")
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/installed" CACHE PATH "default install path" FORCE)
endif()
# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
# include(CPack)