2019-06-09 14:02:41 -07:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(lily)
|
|
|
|
|
2019-06-12 01:38:27 -07:00
|
|
|
find_package(LLVM REQUIRED CONFIG)
|
|
|
|
llvm_map_components_to_libnames(LLVM_LIBS core x86asmparser x86asmprinter x86codegen)
|
|
|
|
|
2019-06-09 14:02:41 -07:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2019-06-12 01:38:27 -07:00
|
|
|
add_executable(lily src/main.cpp src/parser.cpp src/parser.c src/type.cpp src/type_manager.cpp src/ast.cpp src/type_checker.cpp src/pattern.cpp src/gmachine.cpp src/compiler.cpp src/llvm.cpp)
|
2019-06-09 14:02:41 -07:00
|
|
|
target_include_directories(lily PUBLIC src)
|
2019-06-12 01:38:27 -07:00
|
|
|
target_include_directories(lily PUBLIC ${LLVM_INCLUDE_DIRS})
|
|
|
|
target_compile_definitions(lily PUBLIC ${LLVM_DEFINITIONS})
|
|
|
|
target_link_libraries(lily ${LLVM_LIBS})
|