Add semantic passes
This commit is contained in:
@ -5,24 +5,24 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(Boost CONFIG COMPONENTS process program_options REQUIRED)
|
||||
# find_package(Boost CONFIG COMPONENTS process program_options REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
|
||||
include_directories(${Boost_INCLUDE_DIR})
|
||||
# include_directories(${Boost_INCLUDE_DIR})
|
||||
|
||||
FLEX_TARGET(lexer source/lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
|
||||
BISON_TARGET(parser source/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
|
||||
FLEX_TARGET(lexer source/lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/lexer.cc)
|
||||
BISON_TARGET(parser source/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/parser.cc)
|
||||
add_flex_bison_dependency(lexer parser)
|
||||
|
||||
add_executable(elna cli/main.cpp
|
||||
source/ast.cpp include/elna/source/ast.hpp
|
||||
source/types.cpp include/elna/source/types.hpp
|
||||
source/driver.cpp include/elna/source/driver.hpp
|
||||
source/symbol_table.cpp include/elna/source/symbol_table.hpp
|
||||
source/result.cpp include/elna/source/result.hpp
|
||||
source/semantic.cpp include/elna/source/semantic.hpp
|
||||
add_executable(elna cli/main.cc
|
||||
source/ast.cc include/elna/source/ast.h
|
||||
source/types.cc include/elna/source/types.h
|
||||
source/driver.cc include/elna/source/driver.h
|
||||
source/symbol_table.cc include/elna/source/symbol_table.h
|
||||
source/result.cc include/elna/source/result.h
|
||||
source/semantic.cc include/elna/source/semantic.h
|
||||
${BISON_parser_OUTPUTS} ${FLEX_lexer_OUTPUTS}
|
||||
)
|
||||
target_include_directories(elna PRIVATE ${CMAKE_CURRENT_BINARY_DIR} include)
|
||||
target_link_libraries(elna LINK_PUBLIC ${Boost_LIBRARIES})
|
||||
# target_link_libraries(elna LINK_PUBLIC ${Boost_LIBRARIES})
|
||||
|
Reference in New Issue
Block a user