-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·31 lines (31 loc) · 1.36 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
cmake_minimum_required(VERSION 3.10.2)
project(python_interpreter)
set(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
include_directories(
${PROJECT_SOURCE_DIR}/generated/
${PROJECT_SOURCE_DIR}/third_party/
${PROJECT_SOURCE_DIR}/third_party/runtime/src
${PROJECT_SOURCE_DIR}/src/
)
set(src_dir
${PROJECT_SOURCE_DIR}/generated/Python3Lexer.cpp
${PROJECT_SOURCE_DIR}/generated/Python3Parser.cpp
${PROJECT_SOURCE_DIR}/generated/Python3Listener.cpp
${PROJECT_SOURCE_DIR}/generated/Python3BaseListener.cpp
${PROJECT_SOURCE_DIR}/src/Int.cpp
${PROJECT_SOURCE_DIR}/src/dvar.cpp
)
file(GLOB antlr4-cpp-src
${PROJECT_SOURCE_DIR}/third_party/runtime/src/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/atn/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/dfa/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/misc/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/support/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/tree/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/tree/pattern/*.cpp
${PROJECT_SOURCE_DIR}/third_party/runtime/src/tree/xpath/*.cpp
)
add_library (antlr4-cpp-runtime ${antlr4-cpp-src})
add_executable(code ${src_dir} src/main.cpp)
target_link_libraries(code antlr4-cpp-runtime)