C/C++ How do you set GDB debug flag (-g) with cmake?
转载: C/C++: How do you set GDB debug flag (-g) with cmake? – Bytefreaks.net
# Solution 1: Modify the CMakeLists.txt file
Add the following line to your CMakeLists.txt file to set the compilation mode to Debug (non-optimized code with debug symbols):
1set(CMAKE_BUILD_TYPE Debug)
Add the following...
more...