summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-12 20:27:49 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-12 20:27:49 +0800
commit61d670dda6f95aa414b4ea4a7dcaba25890b9e6b (patch)
tree29d0b10fb2558a99ff45c27587abd2f09ca718b5 /CMakeLists.txt
parentf146dac784325c9403499046f52f70e3596ae345 (diff)
add Location class
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 9 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 473eb3d..a7ab1cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,28 +8,27 @@ add_definitions(${LLVM_DEFINITIONS})
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
-bison_target(pcc_parser Parser.y ${CMAKE_CURRENT_BINARY_DIR}/Parser.cc)
-flex_target(pcc_lexer Lexer.l ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cc)
-add_flex_bison_dependency(pcc_lexer pcc_parser)
-
-add_definitions(-DPCC_OSNAME="${CMAKE_SYSTEM}")
-
set(PCC_SOURCE
Context.cc
Driver.cc
- Lexer.cc
Log.cc
main.cc
- Parser.cc
Version.cc)
+bison_target(pcc_parser Parser.y ${CMAKE_CURRENT_BINARY_DIR}/Parser.cc)
+flex_target(pcc_lexer Lexer.l ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cc)
+add_flex_bison_dependency(pcc_lexer pcc_parser)
+
+add_definitions(-DPCC_OSNAME="${CMAKE_SYSTEM}")
+
list(APPEND PCC_SOURCE
node/BaseNode.cc
node/LiteralNode.cc)
+
list(APPEND PCC_SOURCE
- ${BISON_pcc_parser_OUTPUT}
- ${FLEX_pcc_lexer_OUTPUT})
+ ${BISON_pcc_parser_OUTPUTS}
+ ${FLEX_pcc_lexer_OUTPUTS})
add_executable(pcc ${PCC_SOURCE})
target_include_directories(pcc PRIVATE