make -k not working

Brad King brad.king at kitware.com
Wed Mar 29 20:23:33 CEST 2006


Matt Rogers wrote:
> On Wed, Mar 29, 2006 at 07:38:07PM +0200, Thiago Macieira wrote:
> 
>>I've also noticed that make -k isn't working in the cmake builds. Whenever 
>>it finds an error, it halts the compilation completely, instead of 
>>ignoring (like I told it to). What's even more interesting, going to 
>>another directory, completely unrelated to the error, also doesn't work.
>>
>>Also, it's quite possible that the dependencies are blocking a full 
>>parallel build, since the inability to link one library is stopping the 
>>build to proceed and compile the next library's source files.
>>
>>[snip build errors]
> 
> 
> use -i instead of -k. it's what's being used for the dashboards and it
> works. However, I don't know why -k is not working

Using "make -k" says "build everything whose dependencies built 
successfully", and "make -i" says "build everything no matter what".

When a compilation error prevents some library A from building then any 
library B that depends on (links to) library A will not attempt to 
build.  Technically library B's object files could be built but library 
B could still not be linked under "make -k".

The reason things seem to stop early for CMake-generated projects is 
that in order to handle inter-target dependencies and generated sources 
properly each target is built by its own make process.  A top-level make 
process knows only of the inter-target dependencies and runs a sub-make 
for each one.  This is similar to how Visual Studio works.  If a target 
fails then any target that depends on it cannot be built according to 
"make -k".

-Brad


More information about the Kde-buildsystem mailing list