make 和 cmake 的区别

概要

make 和 cmake 的区别学习

博客

博客地址:IT老兵驿站

正文

“The build process has one step if you use a Makefile, namely typing “make” at the command line. For CMake, there are two steps: First, you need to setup your build environment (either by typing cmake <source_dir> in your build directory or by running some GUI client). This creates a makefile or something equivalent, depending on the build system of your choice (e.g. Make on *nix, VC++ or MinGW on Windows, etc). The build system can be passed to CMake as a parameter. However, CMake makes reasonable default choices depending on your system configuration. Second, you perform the actual build in the selected build system.”

参考上文所说,cmake 是两步,通过执行cmake <source_dir>(根据CMakeLists.txt文件的配置), 先根据环境生成 Makefile 文件,然后正常使用 make 去进行编译。

传统的make,我这里的理解是通过configure去扫描软件的依赖,然后根据Makefile.in(往往是通过automake等工具所生成的),生成Makefile

cmake更多是帮助进行跨平台的编译。

初步理解是这样,等待以后来完善。

参考

https://www.quora.com/What-is-the-difference-between-CMake-and-make
https://prateekvjoshi.com/2014/02/01/cmake-vs-make/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值