[cmake-developers] [PATCH] stage/compact-status-log

Brad King brad.king at kitware.com
Mon Sep 22 10:07:30 EDT 2014


On 09/21/2014 12:45 PM, Adam Strzelecki wrote:
> I have pushed new branch stage/compact-status-log for review.

Neat.

> Idea behind is to reduce cmake output when we are in terminal.
> When we are outputting message "Trying feature" we can later
> remove it when new output comes using ANSI escape codes.
> This is done by appending (but not flushing) \e[9999D\e[K
> to stdout.

What if stdout's buffer happens to fill up and flush anyway?
I think the text needs to be buffered somewhere for CMake
to decide whether to clear it.  The message()s have to be
paired somehow so that we clear the first one only if the
second one is the very next message to print.

> NOTE this behavior only applies to terminal (isatty check),
> so when piping cmake output to file is works as before.

Look at Source/kwsys/Terminal.c for detection of whether we
are actually working with a terminal capable of VT100 escapes.

Thanks,
-Brad




More information about the cmake-developers mailing list