/show 在 g++ 中包含等效选项 [英] /show include equivalent option in g++

查看:21
本文介绍了/show 在 g++ 中包含等效选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我看到 VC++ 包含一个名为/show include 的选项,用于列出每个翻译单元中包含文件的层次结构.这似乎是一个非常有用的选项 - 在大型项目中优化/改进编译时间.


I see that VC++ includes an option called /show include to list you the hierarchy of include files in each translation unit. This seems to be a very helpful option - to optimise/improve the compilation time in a large scale project.

问题
在 GNU g++ 编译器中是否有任何等效的选项来获得这些(类似的输出)?

Question
Is there any equivalent option in GNU g++ compiler to get these (similar output)?

推荐答案

有多种选项可以控制这一点.

There's a variety of options for controlling this.

-MD 将列出文件,-MMD 将列出非系统文件作为编译的副作用

-MD will list files, -MMD will list non-system files as side effects of compilation

-M, -MM 将生成列表而不是编译.

-M, -MM will generate lists instead of compiling.

-MQ、-MG、-MP 和 -MT 生成 makefile 目标片段.-MF 允许您指定输出文件名.

-MQ, -MG, -MP and -MT generate makefile target fragments. -MF allows you to specify an output filename.

这篇关于/show 在 g++ 中包含等效选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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