[CMake] Obtaining improved GNU make performance on Makefiles generated by cmake

Bill Hoffman bill.hoffman at kitware.com
Tue Mar 18 10:06:36 EDT 2008


Bill Hoffman wrote:

> 
> 
> We used to have something that removed many implicit rules.  I think 
> that got lost in some version of CMake, it is hard to test...   I did 
> find that there is a command line option to gmake, -r that turns off 
> implicit rules. I am seeing a speed up with gmake -r.   Would it work to 
> turn off all implicit rules instead of the .PHONY stuff?  CMake does not 
> use any implicit rules anyway.  I think the only way to turn them off is 
> to redefine them as empty rules.  This works for all make, and not just 
> gmake.  I am trying to figure out what implicit rules need to be turned 
> off and how to turn them off.  Any ideas?
> 
> 

I played around with make -d and -p and found that the .SUFFIXES rule 
that was supposed to be removing the implicit rules for gmake was not 
working for everything.   SCCS and RCS were being checked for a bunch of 
stuff.   Anyway, try this and see if it improves the issue you were seeing:


$ cvs commit -m "ENH: try to improve make speed by getting rid of some 
implicit rules that were still around." cmLocalUnixMakefileGenerator3.cxx
/cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v  <-- 
cmLocalUnixMakefileGenerator3.cxx
new revision: 1.241; previous revision: 1.240

-Bill



More information about the CMake mailing list