Qt Creator uses skills to improve compilation speed [using jom parameters] https://blog.csdn.net/hsshh1988/article/details/52604196

https://blog.csdn.net/hsshh1988/article/details/52604196

Qt Creator does not support pre-compilation when compiling android projects. The default cpu single-core compilation, the project is slightly larger, which makes the compilation process extremely slow and affects efficiency.

However, Qt Creator comes with multi-core compilation tool support, but it is not enabled by default, and it needs to be configured in the project to take effect.

The steps are as follows [Take this machine and project as an example]:

1. Check if the jom tool has been installed: C:\Qt\Qt5.4.1\Tools\QtCreator\bin\jom.exe

2. Add parameter -j 4 to the project [4 is the number of cpu cores, mine is i5, only four cores]


After adding parameters, you can recompile the project and try it out. You can open the task manager when compiling, and you can see that all the cpu cores can be fully utilized.

Before, it took more than 50 minutes for my machine [cpu i5-4590/memory 8G/mechanical hard disk] to reprogram all the projects. After enabling multi-core, it only took about 13 minutes.


PS. If the compiler uses ms vc++, you only need to add QMAKE_CXXFLAGS += /MP to the .pro file

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324691164&siteId=291194637