summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-08 15:38:35 +0000
committerpeter <peter@pmikkelsen.com>2026-08-08 15:38:35 +0000
commitb1d9069f57439bed333d83c7041871c54f0b8d97 (patch)
tree10048b0fc474a6e9ff91affc44455191a651cd5e /CMakeLists.txt
parent059ecb51f46d5c86f8d9abbe3914d0a028725957 (diff)
Initial import of code
FossilOrigin-Name: 1bd90d4b94de6d63bd8639b8eae399c3dabf321e704ff08c03e99bbe6dfb7764
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..fd1839b
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 3.25)
+
+project(aplwc
+ VERSION 0.0.1
+ LANGUAGES C
+)
+
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_C_EXTENSIONS OFF)
+
+add_library(common INTERFACE)
+target_include_directories(common INTERFACE
+ "src"
+)
+target_compile_options(common INTERFACE
+ $<$<CONFIG:Debug>:
+ -Wall
+ -Wextra
+ -Wpedantic
+ -Werror
+ -fsanitize=address,undefined
+ >
+)
+target_link_options(common INTERFACE
+ $<$<CONFIG:Debug>:
+ -fsanitize=address,undefined
+ >
+)
+
+add_library(aplwc
+ src/errors.c
+ src/libmain.c
+ src/malloc.c
+)
+target_link_libraries(aplwc PRIVATE common)
+
+add_executable(aplwc-repl
+ src/main.c
+)
+target_link_libraries(aplwc-repl PRIVATE common aplwc)