[CMake] Specifying multiple build threads on windows

Bill Hoffman bill.hoffman at kitware.com
Mon Jan 25 09:55:22 EST 2010


John Drescher wrote:
>> Can you please help as how I could specify the number of threads to be used
>> in the command line builds i.e. something like
>>
>> (For nmake)
>>
>> Cmd > nmake –j5
>>
>> (For Visual Studio 2008)
>>
>> cmd> cmake –-build . –j5
>>
> 
> Use vcbuild or msbuild
> 

You can use jom, or gmake.

Jom is an nmake replacement that can do parallel builds done by the Qt 
folks, the download can be found here:
ftp://ftp.qt.nokia.com/jom/jom.zip

For gmake, you need cygwin installed, but you need to use the gmake from 
here:

Older cygwin:
http://www.cmake.org/files/cygwin/make.exe
Cygwin 1.7:
http://www.cmake.org/files/cygwin/make.exe-cygwin1.7

For gmake use the Unix Makefiles generator, and make sure make is in 
your PATH.  For jom use the NMake Makefiles generator, and then run jom. 
  CMake CVS has a jom generator, but the NMake Makefiles one should work 
fine.

-Bill

-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573


More information about the CMake mailing list