[cmake-developers] CMake, Ninja generator, and ExternalProjects
Williams, Norman K
norman-k-williams at uiowa.edu
Fri Jul 25 17:05:38 EDT 2014
I’ve been using the Ninja generator on Linux and OS X lately, because it handles command output during parallel builds better.
But big ‘SuperBuild’ projects — Slicer being exhibit A — which builds using the CMake ExternalProjects Module, have a couple of annoyances.
1. Since Ninja buffers command output, you won’t see the output of an ExternalProject build until it’s completed. This can take considerable time for larger projects.
2. Ninja gets the number of processes from the OS, and executes that many processes, even if it’s been called from another instance of Ninja. It doesn’t have GnuMake’s process pool and inter-instance communication.
Cmake could generate ninja build files that would address these problems, somewhat. Ninja has a –l <load> flag that won’t start new jobs if the load is greater than <load>. There’s also the ‘console pool’ facility that would allow ExternalProject builds to display output, though that would get back to the Gmake issue of different processes interleaving output.
Obviously, Ninja could be fixed to behave better when run recursively, either by implementing Gmake style intra-instance communication. But I’m not sure that fits their design and performance goals. I’ve raised it on the Ninja list…
Perhaps I’m simply bumping up against the limits of the ExternalProject module — since ExternalProjects are essentially walled off from their parent Cmake projects and can be built according to any recipe, it may be too much to hope for much in the way of Ninja project optimization.
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140725/55d63892/attachment.html>
More information about the cmake-developers
mailing list