visual-studio-2010 - 在 Visual Studio 2010 上并行编译 Qt MOC 和 UI 文件

标签 visual-studio-2010 qt

是否可以从 Visual Studio 2010 项目并行编译 Qt 的 MOC 和 UI 文件?

我是否必须在特定于 qmake 的 make 文件上使用 jom 执行并行构建,而不是为项目中的每个 UI/MOC 文件添加自定义构建工具命令?

使用/MP 标志不会并行编译 MOC 和 UI 文件,因为它们使用自定义构建工具。仅同时调用标准编译器

最佳答案

引自 Qt4 with Visual Studio: Multicore Processors :

Multicore processors

If you have a multicore processor and VS 2008 Express or higher you can build programs on all cores.

Visual C++ 2008’s /MP flag tells the compiler to compile files in the same project in parallel. I typically get linear speedups on the compile phase. The link phase is still sequential, but on most projects compilation dominates.

Add these line to the .pro file for release version:

QMAKE_CXXFLAGS_RELEASE += -MP[processMax] Then rebuild the application.

关于visual-studio-2010 - 在 Visual Studio 2010 上并行编译 Qt MOC 和 UI 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5462415/

相关文章:

c++ - Qt5 中的内存泄漏?如何删除 QMimeData?

c# - 如何在不同的解决方案之间共享同一个 Visual Studio 项目?不同的 app.config 和 settings.settings

visual-studio - 链接 : fatal error LNK1104: cannot open file 'D:\...\MyProj.exe'

python - 通过向量大小为 vtkUnstructuredGrid 着色

linux - atof 在 QApplication 之后截断小数部分

c++ - 当用户选择一个项目时 QListWidget 移动

c++ - 基于 Qt 的 UI 是否足够可靠以用于医疗设备?

c# - .NET 中的 SVN 用于小型项目

c# - 错误 MSB3171 : Problem generating manifest

c++ - 在成员函数内的 lambda 捕获列表中使用成员变量