From c2a3cecc1ab2d3f27dcea40a6f0f353b0306d66a Mon Sep 17 00:00:00 2001 From: ov-4 Date: Thu, 29 Jan 2026 10:20:58 +0000 Subject: Added INPUT, OUTPUT and DECLARE --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a2342e1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.13) +project(cps_compiler) + +find_package(LLVM REQUIRED CONFIG) +message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") +message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") + +include_directories(${LLVM_INCLUDE_DIRS}) +add_definitions(${LLVM_DEFINITIONS}) + +set(CMAKE_CXX_STANDARD 17) + +include_directories(include) + +add_library(CPSLexer lib/Lexer/Lexer.cc) +add_library(CPSParser lib/Parser/Parser.cc) +add_library(CPSCodeGen lib/CodeGen/CodeGen.cc) + +llvm_map_components_to_libnames(llvm_libs core support native irreader) + +add_executable(cpsc tools/driver/main.cc) +target_link_libraries(cpsc CPSCodeGen CPSParser CPSLexer ${llvm_libs}) -- cgit v1.3.1-4-g156e