📜  cmake 保持调试符号 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:44.207000             🧑  作者: Mango

代码示例1
#Add the following line to your CMakeLists.txt file to set the compilation mode to Debug (non-optimized code with debug symbols):

set(CMAKE_BUILD_TYPE Debug)
#Add the following line to your CMakeLists.txt file to set the compilation mode to RelWithDebInfo (optimized code with debug symbols):

set(CMAKE_BUILD_TYPE RelWithDebInfo)