On 07/09/2014 04:30 PM, Steve Dougherty wrote:
> I've attached an implementation that uses cmsysTerminal_cfprintf.
> 
> Is it acceptable to decouple outputting this line from cmCTest::Log? Currently
> cmCTestLog is a macro that uses cmCTest::Log, which uses C++ ostreams.

It will have to go through the log API because HANDLER_OUTPUT does
not always go to std::cout.  It looks like cmCTest needs to expose
a way to determine whether 'StreamOut == &std::cout'.  If so, then
you could flush cout, write to stdout with cmsysTerminal_cfprintf,
and then fflush(stdout).

> Would it be better to move the color logic and manipulation to something 
> shared
> between Log and cmsysTerminal_cfprintf, and add a Log that can use color?

cmsysTerminal is in a separate KWSys library that we import to
the Source/kwsys directory.  If something were to be shared then
it would have to stay in that library.  Some refactoring of
cfprintf may be needed to fix this issue too:

 http://www.cmake.org/Bug/view.php?id=12991#c28687

Note that because color in Windows consoles requires state changes
instead of using escape sequences it is not possible to achieve a
single atomic write with color.

> Is it preferable to keep the user-facing string on one line, or break it up 
> for
> line length?

Unless the numbers are really big I do not see how this summary
line can be very long.

-Brad

-- 

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