on Mon Nov 21 2016, Brad King <brad.king-AT-kitware.com> wrote:

> On 11/21/2016 11:06 AM, Dave Abrahams wrote:
>> the documentation for JOB_POOLS is sparse
>
> Yes, it is bare-bones reference documentation for someone that already
> knows how Ninja job pools work.  

I know perfectly well how Ninja job pools work.  The docs in CMake are
inadequate for understanding how CMake interacts with them.

> A sufficiently motivated contributor could add more to the
> `Help/generator/Ninja.rst` document in a new "Job Pools" section.

I do appreciate the hint, Brad, but I'm currently unable to make
contributions to arbitrary open-source projects.

>> I understand the principle at work, but it's really unclear
>> how JOB_POOL_LINK and JOB_POOL_COMPILE are supposed to work when set
>> per-target.
>
> They assign link rules and compile rules for that target to the
> named pool.  Each pool can have a different size assigned in the
> global JOB_POOLS property.  Different targets could be in different
> pools, though typically the global settings are sufficient.

Ah.

>> I presume means compilation of languages that CMake knows about?
>
> Yes.  It is for the compilation and linking commands that CMake
> generates.
>
>> what about custom targets?
>
> We currently have no interface to assign custom commands or
> custom targets to any pool, simply because no one implemented
> such support.  It would have to be a new optional argument to
> the add_custom_command and add_custom_target commands.

Wow, that's too bad.  It gets kinda awkward when my Swift build, which
uses distcc over 100 cpus for C++ compilation, tries to do 100 parallel
swift compilations (not supported by distcc) on my poor local 4-core
machine.

I may have to resort to postprocessing the generated Ninja files if
I can't modify CMake.

-- 
-Dave
-- 

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-developers

Reply via email to