cs-self-learning/docs/必学工具/CMake.md
harrisonhu66 02874de71d
Update CMake.md
最近读的CMake好书,想分享一下
2025-07-18 18:11:31 +08:00

12 lines
1.1 KiB
Markdown

# CMake
## 为什么学习 CMake
CMake 是类似于 GNU make 的跨平台自动软件构建工具,使用 CMakeLists.txt 定义构建规则,相比于 make 它提供了更多的功能,在各种软件构建上广泛使用。**强烈建议学习使用 GNU Make 和熟悉 `Makefile` 后再学习 CMake**。
## 如何学习 CMake
`CMakeLists.txt``Makefile` 更为抽象,理解和使用难度也更大。现阶段很多 IDE (如 Visual Studio, CLion) 提供了自动生成 `CMakeLists.txt` 的功能,但掌握 `CMakeLists.txt` 的基本用法仍然很有必要。除了 [CMake 官方 Tutorial](https://cmake.org/cmake/help/latest/guide/tutorial/index.html) 外,上海交通大学 IPADS 组新人培训也提供了[大约一小时的视频教程](https://www.bilibili.com/video/BV14h41187FZ)。
**偏好更系统的学习**
[Modern CMake for C++: Discover a better approach to building, testing, and packaging your software](https://www.amazon.com/Modern-CMake-Discover-approach-packaging/dp/1801070059)系统的介绍了软件构建,还提供软件构建各个方面的深入阅读材料.