The Architecture of Open Source Applications - CMake
来源:互联网 发布:sql exists in的区别 编辑:程序博客网 时间:2024/05/16 17:00
CMake的历史
最早接触CMake还是在使用OpenCV处理视频和图像的时候,CMake解决了在Windows和Linux等多平台的编译问题。
CMake源自VTK构建系统:在Unix平台生成Makefile,在Windows平台生成NMake文件,这样就可以利用各个平台现有的编译器来编译。但是VTK的架构不支持诸如libtiff/libjpeg等库,这样在Windows上无法为其创建一个简单已用的IDE,只能在命令行操作不符合Windows平台程序员的习惯。
CMake的产生解决了VTK存在的问题,其特性包括:
* Cmake本身仅依赖于C++编译器
* 在Windows上生成Visual Studio编译所需的配置文件
* 简单易用的GUI
* 自动进行系统的检测、依赖关系的检测
CMake
CMake的执行分为两个过程:配置和生成
配置过程:系统检测、环境变量的配置、依赖关系的检测
生成过程:生成平台相关的编译所需文件(作为Visual Studio或者gcc的输入)
Lessons Learned
* 向后兼容
* 语言选择问题:应该尽量选择已有的语言来解决复杂的诸如词法分析的问题,而不是自己从头开发一个(现在是基于lex/yacc)
* CMake本身可以支持插件,但由于平台问题,这些插件很有可能在有些平台上失效,故而导致整个编译失败。因此,现在的CMake并不容易扩展,这就避免了由于插件导致的种种的问题。
* 减少对外开放的接口,而对于内部接口不需要维护其向后兼容性。
Reference
http://www.aosabook.org/en/cmake.html
- The Architecture of Open Source Applications - CMake
- The Architecture of Open Source Applications - nginx
- The Architecture of Open Source Applications: Nginx
- The Architecture of Open Source Applications: Asterisk
- The Architecture of Open Source Applications: Audacity
- The Architecture of Open Source Applications
- The Architecture of Open Source Applications---VTK
- The Architecture of Open Source Applications -- llvm
- Introduction of 《 The Architecture of Open Source Applications 》
- The Architecture of Open Source Applications: The Bourne-Again Shell
- 推荐一本好书《The Architecture of Open Source Applications 》
- The Architecture of Open Source Applications 开源软件体系架构
- <<the architecture of open source applications>> 中关于虚拟机复制与迁移(上)
- <<the architecture of open source applications>> 中关于虚拟机复制与迁移(中)
- <<the architecture of open source applications>> 中关于虚拟机复制与迁移(下)
- The Architecture of Open Source Applications-知名开源项目各种架构分析-前言
- The Architecture of Open Source Application
- The history of open source
- 精通CSS.DIV网页样式与布局(五) ——设置表格与表单样式
- The Architecture of Open Source Applications: The Bourne-Again Shell
- C#连接Access出现“本机上未注册Microsoft.Jet .OLEDB.4.0”错误
- js城市省份二级联动
- SQL 常用命令学习
- The Architecture of Open Source Applications - CMake
- 自制 Word、Excel 批转 PDF 工具
- 文件比对.
- 浅谈微博输入框一些小功能-- @及#中弹出框基于光标的定位问题
- 数组中三个只出现一次的数字
- C#基础
- Java中的Iterator模式(迭代器模式)
- 牛人 blog 链接!(持续更新)
- zoj3647 Gao the Grid----方格中的三点共线