lily/CMakeLists.txt

13 lines
599 B
CMake

cmake_minimum_required(VERSION 3.0)
project(lily)
find_package(LLVM REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS core x86asmparser x86asmprinter x86codegen)
set(CMAKE_CXX_STANDARD 14)
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)
target_include_directories(lily PUBLIC src)
target_include_directories(lily PUBLIC ${LLVM_INCLUDE_DIRS})
target_compile_definitions(lily PUBLIC ${LLVM_DEFINITIONS})
target_link_libraries(lily ${LLVM_LIBS})