发布于 2015-07-24 00:51:21 | 134 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

CMake 安装编译工具

CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。


CMake 3.3.0 发布,值得关注的特性如下:

  • * The "if()" command learned a new "IN_LIST" operator that evaluates  to true if a given element is contained in a named list.

  • * The "add_dependencies()" command learned to allow dependencies to  be added to *interface libraries*. Dependencies added to an  interface library are followed transitively in its place since the  target itself does not build.

  • * The "find_library()", "find_path()", and "find_file()" commands now search in installation prefixes derived from the "PATH" environment variable.

  • * The "<LANG>_VISIBILITY_PRESET" and "VISIBILITY_INLINES_HIDDEN"  target properties now affect compilation in sources of all target  types.  See policy "CMP0063".

  • * A "<LANG>_INCLUDE_WHAT_YOU_USE" target property and supporting "CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE" variable were introduced to tell  the *Makefile Generators* and the "Ninja" generator to run "include-  what-you-use" along with the compiler for "C" and "CXX" languages.

更多内容请查看:发行说明

CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。

CMake 是一个跨平台的自动化建构系统,它使用一个名为 CMakeLists.txt 的文件来描述构建过程,可以产生标准的构建文件,如 Unix 的 Makefile 或Windows Visual C++ 的 projects/workspaces 。文件 CMakeLists.txt 需要手工编写,也可以通过编写脚本进行半自动的生成。CMake 提供了比 autoconfig 更简洁的语法。在 linux 平台下使用 CMake 生成 Makefile 并编译的流程如下:

  1. 编写 CmakeLists.txt

  2. 执行命令 cmake PATH 或者 ccmake PATH 生成 Makefile ( PATH CMakeLists.txt 所在的目录 )

  3. 使用 make 命令进行编译。



历史版本 :
CMake 3.9.6 发布,自动化构建系统
CMake 3.9.3 发布,自动化构建系统
CMake 3.9.2 发布,自动化构建系统
CMake 3.9.1 发布,自动化构建系统
CMake 3.8.2 发布,自动化构建系统
CMake 3.8.1 发布,自动化构建系统
CMake 3.8.0 发布,自动化构建系统
CMake 3.7.0 发布,自动化构建系统
CMake 3.5 发布,自动化构建系统
CMake 3.4.2 发布,自动化建构系统
CMake 3.4.0 发布,自动化建构系统
CMake 3.3.0 发布,自动化建构系统
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务