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 外,上海交通大学 IPADS 组新人培训也提供了大约一小时的视频教程。
CMake
Why CMake
Similar to GNU make, CMake is a cross-platform tool designed to build, test and package software. It uses CMakeLists.txt to define build configuration, and have more functionalities compared to GNU make. It is highly recommanded to learn GNU Make and get familiar with Makefile first before learning CMake.
How to learn CMake
Compare to Makefile, CMakeLists.txt is more obscure and difficult to understand and use. Nowadays many IDEs (e.g., Visual Studio, CLion) offer functionalities to generate CMakeLists.txt automaticly, but it's still necessary to manage basic usage of CMakeLists.txt. Besides Official CMake Tutorial, this one-hour video tutorial (in Chinese) presented by IPADS group at SJTU is also a good learning resource.