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.
________________________________
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to