[CMake] Parallel jobs failed for cmake

Bill Hoffman bill.hoffman at kitware.com
Mon Dec 14 10:59:45 EST 2015


On 12/14/2015 1:34 AM, Igor Sobinov wrote:
>
> Thanks, that's clear.
>
> So, If I write in makefile
No not really clear.  The problem is NOT in your makefile.  The problem 
is in your custom command that calls make again.  That is where the 
problem is.  In your custom command (which you have not provided the 
code for), it is clear that you call make without $(MAKE)

If you go back to your second post on this topic:
igor 5460 0.0 0.0 101152 972 pts/3 S+ 08:10 0:00 | \_ make build_release -j5
igor 5466 0.0 0.0 106096 1164 pts/3 S+ 08:10 0:00 | \_ /bin/sh -c cd 
/home/igor/build_root/release_target; make release

Right there is the problem.  The custom command does this:
/bin/sh -c cd /home/igor/build_root/release_target; make release

It needs to do this:

/bin/sh -c cd /home/igor/build_root/release_target; $(MAKE) release

You will need to escape the $ to get this right.

You can check the generated makefile if you are having trouble.

-Bill


More information about the CMake mailing list