[cmake-developers] [wip/patch] Expose Ninja console pool feature for custom commands/targets
Ben Boeckel
ben.boeckel at kitware.com
Wed Nov 5 16:49:52 EST 2014
On Wed, Nov 05, 2014 at 13:12:13 -0800, Peter Collingbourne wrote:
> I've added documentation and tests and addressed Ben's comments, and published
> the staging branch 'console-pool'. PTAL.
Thanks for splitting the commits.
For the testing of it, since only Ninja supports it, maybe it would be
possible to run a program which exits testing for isatty(STDIN_FILENO)
or isatty(STDOUT_FILENO).
Looking at it again, it strikes me that maybe USES_CONSOLE would be
better since it's more declarative (telling CMake about the command)
than imperative (telling the command it may use the console).
USES_CONSOLE may also be better and generators such as VS might know to
error with "I don't offer a terminal to use" or tools such as Eclipse to
hide these targets from their lists (though how CMake communicates the
requirement is an open question). ...Which makes me think that
MAY_USE_CONSOLE would be useful, but I don't think CMake should be
saddled with the job of telling the command whether a terminal exists or
not (and documented as such). "TERMINAL" rather than "CONSOLE" may also
be more accurate (I feel "console" is being used because that happens to
be the Ninja builtin pool name).
Thoughts?
--Ben
More information about the cmake-developers
mailing list