Cmake是什么?
(摘自官网https://cmake.org/)
CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.
(翻译)
CMake是一个开源的,跨平台的工具套件,用以构建,测试和打包代码。CMake利用简单的平台和独立于编译器的配置文件来控制编译过程,并生成可用于选定编译环境的makefile文件和工作空间(workspace). CMake工作套件由Kitware创建,用以满足开源软件(如ITK,VTL等)对强大的,跨平台的构建环境的需求。
为什么要使用Cmake?
-
CMake 带来效率
CMake 使程序员可以专注于代码而不用费事去折腾编译系统 -
CMake 很强大
Cmake 支持多种开发环境和编译环境
CMake 支持多种编程语言 C/C++/CUDA/Fortran/Python,
Cmake 支持持续集成
Cmake 支持将第三方库引入项目 -
Cmake俨然成为了C++ 项目开发的标准
安装Cmake
deepin
sudo apt install cmake