add debug-info to cmakelists
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user