Debugging · Modern CMake - GitLab
cliutils.gitlab.io › modern-cmake › chapters-B build --trace-source=CMakeLists.txt If you add --trace-expand, the variables will be expanded into their values. Building in debug mode For single-configuration generators, you can build your code with -DCMAKE_BUILD_TYPE=Debug to get debugging flags. In multi-configuration generators, like many IDEs, you can pick the configuration in the IDE.
Debugging – More Modern CMake
hsf-training.github.io › hsf-training-cmakeGo to code/04-debug, and build in debug mode. Our program has a bug. out in a debugger. cmake -S. cmake --buildbuild-debug gdb build-debug/simple_example Now, since we think there’s a problem in my_sin, let’s set a breakpoint in my_sin. I’m providing the gdb commands on the left, and lldb commands on the right. # GDB # LLDB