the evil cmake -- gnu makefiles Debug Release adding post-fix
来源:互联网 发布:js modem 电话 编辑:程序博客网 时间:2024/05/21 09:15
summarize: this text discuss how to manage CMake project on building GNU makefile such as Debug and Release build, and how to add postfix on final targets.
whenever you CMakeLists.txt file is done in your project directory, use the cmake command with option -D and set the CMAKE_BUILD_TYPE to Debug, which create a debug version of makefile build, and set to Release will create a release version build, and so on. but you must create your makefile profiles on a standalone directory respectively for every build target, this means that you can't create a Debug version profiles and a Release profiles under the same build directory, you should always create your Debug build directory for your Debug version profiles, and create your Release build directory for you Relese version profiles. for example, to make your Debug version build profiles, you first create a new folder under your work directory such as makefile_debug
and then use the cd command step into the makefile_debug folder
under the directory, type the command(for windows mingw):
cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug
then under the makefile_debug folder, cmake will create a debug version of build profiles for you, and you can build your project by using:
make
which will use the gnu makefiles system to build the Debug target for you, that's it.
if you want to add post-fix on your final target files, try used the command:
SET(CMAKE_DEBUG_POSTFIX "_d")
which will add an '_d' post-fix to your target output file.
- the evil cmake -- gnu makefiles Debug Release adding post-fix
- the evil cmake -- string concatenation
- CMake区分debug、release版本
- CMAKE 编译Debug/Release版本
- cmake 设置 debug release模式
- cmake Debug模式和Release模式
- CMAKE 设置Build Type (Debug/Release)
- cmake Debug模式和Release模式
- The evil CMake -- File system, path notation, slash
- The evil CMake -- Compile bug, missing ')', error line number
- Cmake 实现debug和release lib依赖项处理
- Cmake:生成 debug 版和 release 版的程序
- cmake编译Debug和Release版本的注意点
- [cmake]如何设置Debug和Release编译模式
- debug release version through the crash address
- cmake debug
- release debug
- ---I will help debug the post
- 黑书之1.2.24 寻找魔法豌豆
- 三十六计之败战计
- glogin.sql 和 login.sql
- Ubuntu下安装JDK开发环境
- 星期天
- the evil cmake -- gnu makefiles Debug Release adding post-fix
- 成为Android高手的路径
- 5个Ajax最佳实践
- the evil cmake -- string concatenation
- 推荐系统:主要推荐方法
- Java GUI之创建一个长宽尺寸为屏幕尺寸一半的框架,并显示在屏幕的正中心
- 看图学中文版VS2010 Workflow 4.0 (三)
- JOJ2573:Product of two primes
- Spring里的IOC例子