aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorov-4 <hausemasterstream@gmail.com>2026-01-29 10:20:58 +0000
committerov-4 <hausemasterstream@gmail.com>2026-01-29 10:20:58 +0000
commitc2a3cecc1ab2d3f27dcea40a6f0f353b0306d66a (patch)
tree3adfa6ed51620adcf6b129eade1622b01527c8a9 /CMakeLists.txt
parent3f48a1d3af588242cd745e344b6b0b02cfb26131 (diff)
Added INPUT, OUTPUT and DECLARE
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
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})