[CMake] Using parallel jobs with CMake generated makefile for Fortran program

Bill Hoffman bill.hoffman at kitware.com
Wed Oct 10 20:36:56 EDT 2012


On 10/10/2012 5:45 PM, Neal Kruis wrote:
> Hey, all,
>
> The CMake generated Makefile is much slower than my handwritten
> Makefile. A quick test shows build times for both CMake and handwritten
> makefiles with and without the -j flag:
>
> CMake: "make -j all" = 7min
> CMake: "make all" = 7min
> Handwritten: "make -j all" = 2min
> Handwritten: "make all" = 4min
>
> In general, CMake is much slower and doesn't seem to utilize parallel jobs.
>
> Can anyone explain why I'm not seeing any improvements?
>
>
> For more details see the question I posted on stackoverflow:
>
> http://stackoverflow.com/questions/12807806/parallel-jobs-using-a-cmake-generated-makefile-no-speed-improvement
>
> You can read about it and answer it there or here (I'll make sure the
> answer is posted to both locations).
>
> Thanks much!
>
Is this on windows?  If so it is because the windows version of gmake 
does not have a job server and recursive makefiles are not parallel.   I 
am assuming that when you wrote make.exe that means windows.   I think 
CVS gmake has a jobs server now.   The cygwin gmake also supports the 
job server.

This link might help you:

http://lists.gnu.org/archive/html/make-w32/2011-07/msg00002.html

-Bill



More information about the CMake mailing list