最近调试cmake维护的代码,需要用gdb进行debug。 在编译的时候,使用如下命令: cmake -DCMAKE_BUILD_TYPE=Debug/Release path 第三个参数path是指项目的顶层路径