[CMake] Compilation speed with CMake/NMake combination, making
it faster?
Bill Hoffman
bill.hoffman at kitware.com
Tue Dec 11 08:14:20 EST 2007
Christian Ehrlicher wrote:
>>>
>>>> * We're using an NMake build tree, is NMake particularly
>>>> slow? Do any of the other makes work more efficiently?
>>> Be aware that nmake builds are much slower than using devenv, as nmake
>>> starts a cl.exe process for every single file,
>>> whereas devenv calls cl.exe with several source files. This costs, due
>>> to the high process overhead on Windows.
>> I understand that.
> It's not a nmake problem but a problem of cmake. cmake does not support batched build - already opened a bug long time ago because of this.
>
>
I am not sure how much faster a batch build would be. The real issue is
the dual or more core machines. Even with a batch build and cl, it
still only uses one processor, where devenv uses more. I use gmake and
cl to get around this with -j N. However, gmake is slower than nmake
because it uses the POSIX stat which is VERY slow on Windows. Someday I
am going to hack gmake to use the Windows native calls to stat files. I
almost think that would be time better spent than adding batch cl calls
to CMake. I would like to see some bench marks on cl batch builds. It
will not be trivial to implement and I don't think it would be worth the
effort unless it has a big gain.
-Bill
More information about the CMake
mailing list