wraith-lang/CMakeLists.txt

29 lines
617 B
CMake

cmake_minimum_required(VERSION 2.8.12)
project(WRAITH_LANG C)
set(CMAKE_C_STANDARD 99)
find_package(BISON)
find_package(FLEX)
find_package(LLVM)
include_directories(${CMAKE_SOURCE_DIR})
BISON_TARGET(Parser wraith.y ${CMAKE_CURRENT_BINARY_DIR}/y.tab.c COMPILE_FLAGS -d)
FLEX_TARGET(Scanner wraith.lex ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c)
ADD_FLEX_BISON_DEPENDENCY(Scanner Parser)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(
wraith_compile
ast.c
stack.c
${BISON_Parser_OUTPUTS}
${FLEX_Scanner_OUTPUTS}
compiler.c
)
target_link_libraries(wraith_compile PUBLIC LLVM)