[CMake] build times increase 1.5x from cmake 2.8.12 to 3

Miller Henry MillerHenry at JohnDeere.com
Fri Mar 23 15:41:12 EDT 2018


I have a fairly large project that I'm trying to update from building with cmake 2.8.12 to 3.10.2. When I make the change my build times go up by half on our Jenkins ci build system.  The build machines are 32 core and my build time goes from 59m 38s to 1h 28m 33s. When I try this locally the time goes from 80 minutes to 84 minutes (a 6 core machine, but I'm running Debug while the ci system is running RelWithDebInfo so the times cannot be compared).  My current effort is targeting 3.10.2, but I've had similar results with 3.2 and 3.9.

I compared command line of just one file and it looks like the only significant difference is 2.8.12 was passing -MMD to gcc, while 3.10.2 is using -MD. I'm suspecting that this is the significant difference. Is there a way to get cmake to use -MMD? Or better yet, since our CI machines never do an incremental build is there a way to turn off dependency generation that might speed my build up more?  We are using the ninja Generator.

Of course I just sampled one of our 17000 build steps to decide the above was the problem. It is entirely possible that I'm off base and something else is the issue. If you have an idea of where I should look instead I'm open to that.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180323/c67f54a2/attachment.html>


More information about the CMake mailing list