Re: [CMake] CPack Multicore Usage

2017-07-24 Thread Chuck Atkins
>
> cause cpack does not "rebuild" the software again, it uses the compiled
> software and just starts the "install" into its _CPack_Packages
> subdirectories
>

Just running `cpack` does not.  However, CMake does generate a "package"
make target that is tied into your dependencies, so if instead of running
`make -jN; cpack` you could also run 'make -jN package' which will run the
build, since it's a dependency of the package target.

- Chuck
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CPack Multicore Usage

2017-07-24 Thread Jörg Kreuzberger
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.atk...@kitware.com>
Gesendet:   Fr 21.07.2017 21:32
Betreff:Re: [CMake] CPack Multicore Usage
An: Konstantin Tokarev <annu...@yandex.ru>; 
CC: Jörg Kreuzberger <j.kreuzber...@procitec.de>; cmake@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.
> 
> 
> 
>

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CPack Multicore Usage

2017-07-21 Thread Chuck Atkins
> > 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.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CPack Multicore Usage

2017-07-20 Thread Konstantin Tokarev


20.07.2017, 11:22, "Jörg Kreuzberger" :
> Hi
>
> My Project is compiling multicore without any problems using Unix makefiles 
> or ninja.
>
> In calls to cpack only one core is used if Makefiles are used. Is there any 
> option to enable multicore?

Yes, you should run make -jN, where N is a number of your cores or slightly 
larger

> If i use ninja in cpack builds, the cpack build is broken, cause there seems 
> no dependencies considered?
>
> Is ninja use in cpack intended? Or are there any contraints using ninja and 
> cpack?
>
> Greetz, Joerg
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

-- 
Regards,
Konstantin
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] CPack Multicore Usage

2017-07-20 Thread Jörg Kreuzberger
Hi

My Project is compiling multicore without any problems using Unix makefiles or 
ninja.

In calls to cpack only one core is used if Makefiles are used. Is there any 
option to enable multicore?
If i use ninja in cpack builds, the cpack build is broken, cause there seems no 
dependencies considered?

Is ninja use in cpack intended? Or are there any contraints using ninja and 
cpack?

Greetz, Joerg

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake