开发者

How to control build mode(debug or release) in cmake?

Anyone knows?

Seems by default all libraries/executables are built in debug mo开发者_运维问答de.


Can be controlled by setting CMAKE_BUILD_TYPE variable, see cmake docs.


an alternative solution is: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") or set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") if you are using C++ or C.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜