默认为 Release 版的 Makefile。 要生成 Debug 版时,方法如下:

cmake -DCMAKE_BUILD_TYPE=Debug ..

参考:

CMAKE_BUILD_TYPE
https://cmake.org/cmake/help/v3.6/variable/CMAKE_BUILD_TYPE.html

CMAKE_CONFIGURATION_TYPES
https://cmake.org/cmake/help/v3.6/variable/CMAKE_CONFIGURATION_TYPES.html#variable:CMAKE_CONFIGURATION_TYPES

Logo

更多推荐