且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CMake构建模式RelWithDebInfo

更新时间:2023-10-22 23:22:28

我错过了什么吗? 编译所有发布代码很有意义 作为RelWithDebInfo?

Am I missing something, or does it not make sense to compile all release code as RelWithDebInfo?

这取决于您对客户对调试信息的信任程度.

It depends on how much you trust your customer with the debugging information.

其他信息:

gcc将调试信息编码为目标代码.

gcc encodes the debugging information into the object code.

这是gcc的pdb等效项:

Here is the pdb equivalent for gcc:

如何在构建之外生成gcc调试符号目标?

请注意,cmake似乎不支持这种方法.

Note, that cmake doesn't appear to support this approach out of the box.