什么是CMake安装时间? [英] what is the CMake install time?

查看:215
本文介绍了什么是CMake安装时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

官方文档中的报价 http:// www。 cmake.org/cmake/help/v3.0/command/install.html
指定要在安装时运行的规则。

a quote from the official documentation http://www.cmake.org/cmake/help/v3.0/command/install.html "Specify rules to run at install time."

什么是安装时间

我的问题:我在Linux上,软件是从只是依赖和数据的软件包安装的。没有CMake可以在这里做任何事情。因此,软件的安装时间超出了cmake的范围。

The problem for me: I am on Linux, software is installed from packages that are just dependencies and data. There is no CMake that can do anything here. So installation time of software is out of scope from cmake. So what exactly do they mean?

推荐答案

构建CMake项目大致可分为三个阶段:

Building a CMake project can roughly be divided into three phases:


  • 配置时间。这包括运行 cmake 本身时发生的一切。

  • 构建时间。这包括从CMake生成的文件(例如,当运行 make 时)实际构建项目时发生的一切。

  • 安装时间。这包括运行由CMake生成的 INSTALL 目标时发生的一切(例如,当运行 make install 时) li>
  • Configure time. This includes everything that happens while running cmake itself.
  • Build time. This includes everything that happens while actually building your project from the files generated by CMake (like, when running make).
  • Install time. This includes everything that happens when running the INSTALL target generated by CMake (like, when running make install).

请注意,最后一个阶段是可选的。如果你不想支持调用 make install ,但更喜欢另一个部署机制,你只需要不使用 install 命令,并且 INSTALL 目标。

Note that the last phase is optional. If you do not want to support calling make install but prefer another deployment mechanism, you simply don't use the install command in your CMake script and no INSTALL target will be generated.

这篇关于什么是CMake安装时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆