[CMake] Parallel jobs failed for cmake

Bill Hoffman bill.hoffman at kitware.com
Thu Dec 10 15:48:05 EST 2015


On 12/10/2015 12:19 AM, Igor Sobinov wrote:
> 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
> igor 5467 0.0 0.0 101184 1060 pts/3 S+ 08:10 0:00 | \_ make release
Looks like you created the build_release target as a custom command that 
does:
make release

This will strip the -j off of the make process and you get the warning. 
  If you are going to call make recursively like that you have to use 
$(MAKE) so that all the right env stuff gets passed down.  CMake does 
this with its calls to make.

You should be able to do what we do in ExternalProject and use $(MAKE). 
  I would have to see your CMakeLists.txt code and the custom command to 
help more.

-Bill



More information about the CMake mailing list