View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012882CMakeCMakepublic2012-01-18 09:482012-07-09 06:52
Assigned ToBrad King 
StatusclosedResolutionno change required 
PlatformWindowsOSXPOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0012882: MinGW makefile project cannot be build in parallel mode
DescriptionI generated a MakeFile Project (MinGW) and I'd like to speed up the
build process using -j N option. So I launched:
"make -j 2 all".
Unfortunately I noticed that the Makefile, generated by CMake self,
contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2
won't be executed in parallel mode.
On the other hand if I manually launch
make -j 2 -f CMakeFiles\Makefile2 all, the project will be built in parallel mode reducing the needed time from 25 min to 14 min.
Steps To Reproduce1 - Generate a MinGW Makefile on a Windows machine
2 - Build the project launching make -j 2 all
TagsNo tags attached.
Attached Files


Brad King (manager)
2012-01-18 09:58

GNU make is supposed to pass top-level flags down in the environment (IIRC, it is a variable called "MAKEFLAGS"). At least at one time the MinGW make did not know how to share parallel jobs with child make processes. I do not know if this is still true.

If you have MSYS installed I think the "MSYS Makefiles" generator works in parallel.
Bill Hoffman (manager)
2012-01-18 10:55

This is a limitation of gmake on windows. See this thread: [^]

The jobserver which handles parallel make for recursive calls to make is just not implemented. The person on the list did an implementation, and I think you can get his patch and build it yourself. However, there are some licenses issues that are being worked out so that it can be part of gmake upstream.
Bill Hoffman (manager)
2012-01-19 12:33

Looks like this is now in CVS gmake: [^]
I am guessing this has not yet made it into mingw yet, and you would have to build from source.
Galeazzi (reporter)
2012-01-20 02:50

I applied the patch discussed here: [^] and it worked fine. As far as I'm concerned this bug can be closed.
Brad King (manager)
2012-01-20 08:25

Fantastic, thanks for reporting back!
David Cole (manager)
2012-07-09 06:52

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-01-18 09:48 Galeazzi New Issue
2012-01-18 09:58 Brad King Note Added: 0028353
2012-01-18 10:55 Bill Hoffman Note Added: 0028354
2012-01-19 12:33 Bill Hoffman Note Added: 0028364
2012-01-20 02:50 Galeazzi Note Added: 0028369
2012-01-20 08:25 Brad King Note Added: 0028373
2012-01-20 08:25 Brad King Status new => resolved
2012-01-20 08:25 Brad King Resolution open => no change required
2012-01-20 08:25 Brad King Assigned To => Brad King
2012-07-09 06:52 David Cole Note Added: 0029957
2012-07-09 06:52 David Cole Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team