初始化构建配置

This commit is contained in:
2025-08-03 00:02:00 +08:00
commit 82456e77c9
7 changed files with 103 additions and 0 deletions

20
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.24)
set(APP_NAME "zswm")
# generate compile_commands.json for clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# compile flags
add_compile_options(-g)
add_compile_options(-Wall)
project(${APP_NAME}
VERSION 0.0.1
LANGUAGES C
)
add_executable(${APP_NAME} main.c)
# use C17
set_property(TARGET ${APP_NAME} PROPERTY C_STANDARD 17)