add debug-info to cmakelists

This commit is contained in:
2026-01-29 14:42:27 +01:00
parent 3ed3c3de12
commit 802e5e34aa

View File

@@ -1,4 +1,17 @@
cmake_minimum_required(VERSION 3.10)
project(PS1)
# generate compile_commands.json for clangd/LSP support
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set default build type to Debug if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
add_executable(ps1 src/driver.c)
# ensure debug symbols are included
target_compile_options(ps1 PRIVATE
$<$<CONFIG:Debug>:-g>
)