You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
556 B

cmake_minimum_required(VERSION 3.16)
project(dap_debug_example CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Full debug info, zero optimisation — ideal for stepping and inspection.
set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0")
add_executable(debugapp
src/main.cpp
src/calculator.cpp
)
target_include_directories(debugapp PRIVATE src)
target_compile_options(debugapp PRIVATE -g3 -O0 -Wall -Wextra)
# Generate compile_commands.json for clangd/LSP integration.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)