[Solved] Use of multi-core for compiling on Windows for MSVC
-
wrote on 11 May 2011, 09:25 last edited by
I am wondering, if there is not a way to compile with MSVC on Windows and using multiple cores.
I had to compile Qt on Linux a couple of times lately. The use of multiple cores with "make -j<x>" came in quite handy. Today I have configured a cross-compile with "nmake -j<x>" and nmake complained. Now the compilation takes for ever while 3 of 4 cores are idle.What am I missing?
-
wrote on 11 May 2011, 09:51 last edited by
native nmake does not support this - unfortunately.
There is a modified version, called "jom", made by our beloved Trolls. Some infos in this older blog post "Speeding up Visual C++ Qt Builds":http://labs.qt.nokia.com/2009/03/27/speeding-up-visual-c-qt-builds/ and in the gitorious repos at http://qt.gitorious.org/qt-labs/jom
-
wrote on 11 May 2011, 09:54 last edited by
Have you tried to build Qt to see how many cores are used?
Since with my system the VS2010's nmake by default is using both the cores available, so i guess you don't need anything. -
wrote on 11 May 2011, 10:00 last edited by
@Volker
Thanks for hint. I will follow up.@Zlatomir
I am using VS2005 on Win7 (64bit). In general I can use the parallel building process with my own source.
The Qt compilation I am doing from the command prompt after using configure. There you have to start nmake and that is the point I got stuck. -
wrote on 11 May 2011, 12:05 last edited by
Then use jom, or for VS2005 you can also add -MP to the QMAKE_CFLAGS from qmake.conf file located in mkspecs\win32-msvc2005
//i didn't try this - because i didn't use that VS and 2010 use both my cores by default -
wrote on 11 May 2011, 12:18 last edited by
For those of you looking for the same solution.
[quote author="Volker" date="1305107505"]
There is a modified version, called "jom", made by our beloved Trolls. Some infos in this older blog post "Speeding up Visual C++ Qt Builds":http://labs.qt.nokia.com/2009/03/27/speeding-up-visual-c-qt-builds/ and in the gitorious repos at http://qt.gitorious.org/qt-labs/jom[/quote]Go directly to the gitorious repos. The download link on the blog delivers an old exe.
Or use the "FTP site directly":ftp://ftp.qt.nokia.com/jom/It works great !!!
A suggestion for Qt: Include it in the distribution.
-
wrote on 6 Sept 2012, 12:07 last edited by
<Zlatomir>
I have tried both nmake (VS2010) and jom.
jom keeps the laptop doing some 100% usage almost all the time.
nmake was not able to do more than 35% at any time and was doing 20% most of the times.
i got a i7 with 8 cores, all engaged 100% and even the fan on the back of the laptop.
jom is good, .. so jom.
regards-