[CMake] Doesn't "make -k" work with CMake?

Andreas Pakulat apaku at gmx.de
Mon Aug 16 08:25:04 EDT 2010


On 16.08.10 14:06:21, Johan Holmberg wrote:
> I have been working on porting some applications built with CMake, and
> initially I get a lot of compile errors.

Maybe you should fix them? Usually compile-errors that occur on the first
make call, but not subsequent ones are indications for lack of dependencies
between certain files/targets.

> I work on Linux and have been using the Makefile:s generated by CMake to
> build, using "make -k" at the top build directory.
> 
> I assumed the the "-k" flag would take care of building "as much as
> possible" globally in my whole build tree.

It does, but a file can only be compiled when all its dependencies are
being fulfilled. Which might not be the case for you, e.g. if app A depends
on lib B, the generated Makefile's won't be starting to compile A before B
is completely build.

> And can I get the same effect as "make -k" in some other way?

You are getting the effect of make -k, its just that make won't build
anything whose dependencies are not built/fulfilled yet.
 
>  I have now switched to trying to use "make -i", but as far as I
> understand it does *too much*, e.g. trying to link a program where
> some object files failed (maybe I can live with that ...).

Instead of trying to workaround you should be fixing the reasons for the
initial compile errors. Then there's no reason to worry about wether -i
works by accident or not.

Andreas

-- 
Exercise caution in your daily affairs.


More information about the CMake mailing list