当前位置:网站首页>CMake Tutorial 巡礼(0)_总述
CMake Tutorial 巡礼(0)_总述
2022-07-30 00:42:00 【CarnivoreRabbit】
CMake Tutorial 巡礼(0)_ 总述
这是本系列的第一篇。
CMake是一种非常好且强大的跨平台C++编译工具。
Github上很多源代码都附有CMakeLists.txt,都是通过该工具进行编译。
在没有学习之前,这基本上就是本小白对这个工具的全部认知。
从今天开始,本小白决定从开始到结束,完成CMake Tutorial的练习,并对过程和心得进行记录。
这次的巡礼,小白决定采用最笨的方式来进行:翻译-练习-记录,以防漏过了一些信息。巡礼的主要内容都是来自CMake官方的Tutorial,所不同的是,小白会在适当的地方以“小白按”为开头,来插入一些小白自己的心得。
正因为是这样的行文逻辑,所以如果想要追求短平快掌握CMake的同学可以不用阅读以下内容了,本系列更适合跟读操作型的选手。按照步骤一步步向下操作,是本系列的风格。
接下来进入正题。
让我们打开CMake Tutorial
1 导语
The Cmake tutorial provides a step-by-step guide that covers common build system issues that CMake helps address. Seeing how various topics all work together in an example project can be very helpful.
CMake Tutorial 提供了“一步步“式的指导,覆盖了编译系统过程中CMake帮助处理的常见问题。通过一个示例项目,看到多种主题是如何一起工作的,(对我们学习)会很有帮助。
小白按:小白的英语水平非常一般。翻译起来会有浓浓的”机翻“味儿。请介意的同学不要介意(手动狗头)。
2 步骤
The tutorial source code examples are available in
this archive
. Each step has its own subdirectory containing code that may be used as a starting point. The tutorial examples are progressive so that each step provides the complete solution for the previous step.
Tutorial的源代码例程在这里(网址如若过期可以直接去官网找对应英文原文链接)可供下载。每一步都有它自己的子文件夹,子文件夹中包含的代码可以被用作练习的起点。Tutorial的例子是渐进式的,意思是每一步都接在前一步解决完成的基础之上。
- Step 1: A Basic Starting Point
- Build and Run
- Adding a Version Number and Configured Header File
- Specify the C++ Standard
- Rebuild- Step 2: Adding a Library
- Step 3: Adding Usage Requirements for a Library
- Step 4: Installing and Testing
- Install Rules
- Testing Support- Step 5: Adding System Introspection
- Step 6: Adding a Custom Command and Generated File
- Step 7: Packaging an Installer
- Step 8: Adding Support for a Testing Dashboard
- Step 9: Selecting Static or Shared Libraries
- Step 10: Adding Generator Expressions
- Step 11: Adding Export Configuration
- Step 12: Packaging Debug and Release
- 第一步:一个基础的起点
- 编译并运行
- 添加版本号并指定头文件
- 指定C++标准
- 重编译
- 第二步:添加一个库
- 第三步:为库添加使用需求
- 第四步:安装和测试
- 安装规则
- 测试支持
- 第五步:添加系统自察
- 第六步:添加自定义命令及生成文件
- 第七步:打包一个安装文件
- 第八步:为测试白板添加支持
- 第九步:选择静态或动态库
- 第十步:添加生成器表达式
- 第十一步:添加导出参数
- 第十二步:打包Debug及Release版本
小白按:以上是CMake Tutorial的导语部分,从这一部分我们可以看到这个Tutorial的一些基本内容,首先它是一个渐进式的学习过程,并且涵盖了不少在编译过程中实际上会遇到的一些问题。其中有些问题,小白是有一定概念的,而另一些问题可能小白还要去熟悉一下名词。按照 CMake Tutorial的统筹安排,这一系列的文章应该有十三篇,除去这一篇作为导语部分,剩下的十二篇都是干货。
这一部分就是我们接下来要学习的主要内容了,我们将在下一篇里首先对”一个基础的起点“这一部分进行学习。
【水平所限,错漏难免,创作不易,轻喷勿骂】
边栏推荐
- 【Flutter】Flutter inspector 工具使用详解,查看Flutter布局,widget树,调试界面等
- How to increase account weight?3 ways to operate your own media to help you get more revenue
- Worthington细胞分离技术丨基本原代细胞分离方法和材料
- Vmtouch - under Linux file cache management artifact
- 1592. 重新排列单词间的空格
- Music theory & guitar skills
- 如何在AWS里面的SQL server设置混合登陆
- 定时器学习
- Low dropout linear regulator MPQ2013A-AEC1 brand MPS domestic replacement
- Douyin short video traffic acquisition strategy, mastering these will definitely be a hit
猜你喜欢
谷歌浏览器(google)设置翻译中文,翻译选项不生效或没有弹出翻译选项
自媒体短视频怎么提高播放量?从这三个方面入手
Google Chrome (google) is set to translate Chinese, the translation option does not take effect or the translation option does not pop up
Finding a 2D Array
Worthington dissociating enzyme: detailed analysis of neutral protease (dispase)
[MySQL series] MySQL database foundation
自学HarmonyOS应用开发(47)- 自定义switch组件
Codeforces Round #805 (Div. 3) Summary
Worthington解离酶:胰蛋白酶及常见问题
servlet执行详解
随机推荐
[Experience] Experience Summary - Lessons Learned
【Flutter】Flutter inspector 工具使用详解,查看Flutter布局,widget树,调试界面等
The range of motion of the robot
Low dropout linear regulator MPQ2013A-AEC1 brand MPS domestic replacement
X64 mfc140u.dll文件缺失->应用程序无法正常启动(0xc000007b)解决方法
QTableWidget使用示例
How to realize the frame selection of objects in canvas (6)
"The lighthouse factory" of China path: smart roll out from point to surface
I.MX6U-驱动开发-3-新字符驱动
Worthington dissociating enzyme: detailed analysis of neutral protease (dispase)
【经验】经验总结-经验教训
what is a .pro file in qt
vmtouch——Linux下的文件缓存管理神器
STM32——OLED显示实验
7.28
2022/7/29 Exam Summary
[Flutter] Detailed explanation of the use of the Flutter inspector tool, viewing the Flutter layout, widget tree, debugging interface, etc.
Weekly recommended short video: What is R&D efficiency?It can achieve anti "involution"?
【mysql】Mysql公用表表达式with as
STM32 - OLED display experiment