我如何使用--build选项查看cmake发出的命令 [英] How do I see the commands issued by cmake with --build option

查看:63
本文介绍了我如何使用--build选项查看cmake发出的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行 cmake --build。--target INSTALL命令时,如何查看发出的命令?似乎没有--versbose之类的选项。 cmake帮助说 cmake --build是基础构建工具的接口,但没有说明已发出的命令转储。

How could I see the commands issued when I run "cmake --build . --target INSTALL" command? There doesn't seem to be an option like --versbose or something. The cmake help says that "cmake --build" is an interface to the underlying build tool, but doesn't say anything about the dump of commands issued.

原因我需要这是因为,当我尝试在命令行上运行msbuild时,它失败并显示一条错误消息,指出目标INSTALL在项目中不存在。但是,cmake成功。因此,我想cmake也可能会使用msbuild本身,尽管有一些特定的选项。

The reason I need this is because, when I try to run msbuild on commandline, it fails with an error saying the target INSTALL doesn't exist in the project. However, cmake succeeds. So, I guess, cmake also might be using msbuild itself, albeit with some specific options.

推荐答案

您可以将其他选项传递给带有-开关的本机生成工具,即:

You can pass additional options to the native build tool with the -- switch, i.e.:

cmake --build . --target INSTALL -- /verbosity:detailed

这篇关于我如何使用--build选项查看cmake发出的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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