发布于 2015-11-13 00:57:24 | 142 次阅读 | 评论: 0 | 来源: 网友投递
CMake 安装编译工具
CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。
CMake 3.4.0 发布,该版本增加新的测试操作器用于 if() 命令,主要更新内容如下:
* The "if()" command learned a new "TEST" operator that evaluates to
true if a given test name has been defined by the "add_test()"
command. See policy "CMP0064".
* The "install(DIRECTORY)" command "DESTINATION" option learned to
support "generator expressions".
* The "install(FILES)" command "DESTINATION" option learned to
support "generator expressions".
* CMake learned to honor "*.manifest" source files with MSVC tools.
Manifest files named as sources of ".exe" and ".dll" targets will be
merged with linker-generated manifests and embedded in the binary.
弃用的特性
* The "CMakeExpandImportedTargets" module is now documented as
deprecated. See module documentation for an explanation.
* The "CMAKE_USE_RELATIVE_PATHS" variable no longer has any effect.
Previously it was partially implemented and unreliable.
更多内容请看:KitWare blog
CMake 是一个跨平台的自动化建构系统,它使用一个名为 CMakeLists.txt 的文件来描述构建过程,可以产生标准的构建文件,如 Unix 的 Makefile 或Windows Visual C++ 的 projects/workspaces 。文件 CMakeLists.txt 需要手工编写,也可以通过编写脚本进行半自动的生成。CMake 提供了比 autoconfig 更简洁的语法。