[CMake] CPack Multicore Usage

Jörg Kreuzberger j.kreuzberger at procitec.de
Mon Jul 24 04:07:14 EDT 2017


I think i had a wrong understanding of the cpack process itself.
so i did a cmake configure and called cpack to build the software and generate the packages (deb, tgz)
but better would be to
configure, build with make -jx and then call cpack, cause cpack does not "rebuild" the software again, it uses the compiled software and just starts the "install" into its _CPack_Packages subdirectories

Thank for your patience :-)


-----Ursprüngliche Nachricht-----
Von:	Chuck Atkins <chuck.atkins at kitware.com>
Gesendet:	Fr 21.07.2017 21:32
Betreff:	Re: [CMake] CPack Multicore Usage
An:	Konstantin Tokarev <annulen at yandex.ru>; 
CC:	Jörg Kreuzberger <j.kreuzberger at procitec.de>; cmake at cmake.org; 
>  
> > In calls to cpack only one core is used if Makefiles are used. Is there any 
> option to enable multicore?
> 
> It depends on what your trying to achieve.  Typically the bottleneck for CPack 
> is in the compression step of the resulting tar (or rpm, etc.).  In that case, 
> CMake is limited by the libarchive, libz, libbz2, liblzma, etc. implementations 
> it's linked to, which are typically single threaded.  It's really no different 
> than taking an install tree and running "tar -czf foo.tgz /path/t/foo-prefix".  
> So in that sense, even if you can parallelizes the "temporary" install step 
> where it collects the files to packages, actually generating and compressing 
> the package, which is the costly part, will likely remain a single process.
> 
> 
> 
>



More information about the CMake mailing list