[CMake] slow CMake performance configuring builds on remote SMB servers

Bill Hoffman hoffman.mlist at gmail.com
Fri Mar 23 07:41:35 EST 2007


Philip Lowman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>   
>>>       
>> Is it mostly sending time in try-compile stuff?  If so, it might be
>> possible that we could add some sort of cmake temp directory that was
>> not under the build tree to run try-compile tests in.  Then that could
>> be set to a local disk.   Once you have run CMake the first time, is it
>> fast after that?
>>     
>
> That's the weird thing, it definitely is slow during the initial
> compilation tests but after everything has been configured for the first
> time even when I click "configure" again (and I have changed no cache
> variables) it still takes about a minute to finish and about another 30
> seconds after I click "generate" to write out the 25 or so VCproj files.
>
> Does CMake do anything weird during it's configuration phase like write
> out temporary files?  Laying aside the initial compile checks which may
> be occuring on the network drive (but if so, could be optimized to occur
> in temp space on the C: ) what other file writes does CMake do prior to
> generating the Makefiles?
>   
Most files cmake writes out are copy if different.  So, cmake writes a 
file, then diff's it with the
file that was already there, and if they are different it gets rid of 
the original and moves the new
file into place.   This is to avoid too many reloads and other side 
effects of changing all the
files all the time.   It would be a lot of work, but I suppose you might 
be able to build the whole
tree in some staging area, then move it later.   But, that sounds very 
difficult.   It may just be
that running cmake over network drives on windows is slow....

-Bill



More information about the CMake mailing list