build options

Matthew Woehlke mw_triad at users.sourceforge.net
Fri Nov 14 16:17:49 GMT 2014


On 2014-11-14 07:30, René J.V. Bertin wrote:
> OTOH, I think that the default for targets like test/check and 
> install ought to be -j1, and it may be asking too much from make (or
> ninja) to guess whether parallel execution is appropriate.

For a long running test suite, if it can run in parallel, really, that
would be better.

I don't see why install needs to be serial. If it's actually written as
a target depending on each installed file, probably those also have
correct dependencies on e.g. the directories existing first, and so
parallel won't hurt (besides oversaturating I/O). In most cases though I
suspect install isn't written in a way that the build tool can run it in
parallel anyway, making this moot.

Note that the above talks about general cases. If you're talking about
build trees generated by CMake, both test and install are already
necessarily serial (at least from the perspective of make/ninja) since
both are a single command to invoke CMake/CTest to do the real work.
(CTest has parallel ability that is orthogonal to the build tool.)

> Last time I check, cmake didn't generate an install/fast target when
> using ninja. And that's really a nice one when tweaking large
> projects ...

What's slow these days about plain 'install' (in ninja, anyway)? IIRC
'install' has switched to checking just time stamps and so it should be
about as fast as possible while retaining some chance of being correct.

If there's something lacking here, you should take it up with the CMake
folks...

-- 
Matthew




More information about the KDevelop mailing list