-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (21 loc) · 973 Bytes
/
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
project(MyPL_2023)
cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "-O0")
set(CMAKE_BUILD_TYPE Debug)
include_directories("src")
# include_directories("test")
# locate gtest
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(extension_tests tests/extension_tests.cpp
src/token.cpp src/mypl_exception.cpp src/lexer.cpp src/simple_parser.cpp
src/ast_parser.cpp src/print_visitor.cpp src/symbol_table.cpp
src/semantic_checker.cpp src/vm.cpp src/vm_instr.cpp src/var_table.cpp
src/code_generator.cpp)
target_link_libraries(extension_tests ${GTEST_LIBRARIES} pthread)
# create mypl target
add_executable(mypl src/token.cpp src/mypl_exception.cpp src/lexer.cpp
src/simple_parser.cpp src/ast_parser.cpp src/print_visitor.cpp
src/symbol_table.cpp src/semantic_checker.cpp src/vm_instr.cpp
src/vm.cpp src/var_table.cpp src/code_generator.cpp src/mypl.cpp)