[cmake-developers] [wip/patch] Expose Ninja console pool feature for custom commands/targets

Ben Boeckel ben.boeckel at kitware.com
Tue Nov 4 00:53:07 EST 2014


On Mon, Nov 03, 2014 at 16:22:56 -0800, Peter Collingbourne wrote:
> This patch exposes the Ninja console pool feature via the add_custom_command
> and add_custom_target commands. Specifically, it introduces a USE_CONSOLE
> flag which can be used to communicate to the generator that the command
> would prefer to use the console. It has no effect on generators other than
> the Ninja generator.
> 
> The patch also causes the feature to be used with the built-in cache editor.

+1 to the feature. I think there are some bugs open on the tracker for
this we should ping when appropriate.

> Docs/tests to come. Any comments on the proposed approach are appreciated.

See inline below.

> -    doing_verbatim
> +    doing_nothing

A separate commit to rename this would be nice.

> +    else if(copy == "USE_CONSOLE")
> +      {
> +      doing = doing_nothing;
> +      console = true;
> +      }

Is there any reason this could not be implemented with a JOB_POOL target
property? This would allow custom commands to be placed into a pool with
JOB_POOLS other than the console pool.

>    cmTarget CreateGlobalTarget(const std::string& name, const char* message,
>      const cmCustomCommandLines* commandLines,
> -    std::vector<std::string> depends, const char* workingDir);
> +    std::vector<std::string> depends, const char* workingDir,
> +    bool console);

A separate commit to add this parameter would be nice so that the "make
current things console'd" is separate from "allow the user to make
targets console'd". This parameter might not even be necessary with a
generic JOB_POOL target property.

Thanks,

--Ben


More information about the cmake-developers mailing list