How to compile on multiple cores using mingw inside QTCreator

后端 未结 7 1241
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 22:54

I have a quad-core i7 CPU on my windows desktop. I am trying to get mingw32-make to compile using as many core as possible. I have added -j8 into the \"Make Arguments\" fiel

7条回答
  •  忘掉有多难
    2020-12-29 23:28

    In Qt Creator go to Projects -> Build & Run -> your specific MinGW build setup -> Build Environment (this is on the screen below General / Build steps / Clean steps..) and then add a variable MAKEFLAGS and set it to -j8. I tested this on my two core machine with -j4 and QtCreator 4.4.1 and with MinGW 5.3.0. When compiling my processor runs at 100 % performance as can be seen in the Task Manager. Without this option it was about 25 % so I assume it works exactly as expected. The build is now much faster.

提交回复
热议问题