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

Adam Strzelecki ono at java.pl
Mon Sep 22 12:26:45 EDT 2014


> What if stdout's buffer happens to fill up and flush anyway?

I think I can provide other terminal-less solution via filtering stdout and stderr via pipe and background thread.

I got some proof-of-concept program already. Idea is:

stdout & stderr are duped and proxied by some background thread.

(1) When background thread finds a line beginning with '--' on stdout then it writes it to real stdout without trailing new line, and stores it in some lookup variable

(2a) When something new that comes to stdout begins exactly the same as previous line (previous line is prefix of new coming line) then only the difference suffix is wrote out to stdout

(2b) Otherwise when anything new comes to stderr or stdout that does not start exactly as previous line then suspended new line and new coming text is wrote to real stderr/stdout

This should effectively compact all successive try & success/fail lines together is there was no other output in between them. Also this will require absolutely no changes in .cmake files or any cmake commands.

WDYT?

--Adam


More information about the cmake-developers mailing list