ctest: Fix progress summary line erasure on Windows

We only print progress output when VT100 escapes are supported,
even on Windows, so we can erase the line there too.

Fixes: #27814
Issue: #26924
This commit is contained in:
Derek Huang authored and Brad King committed 2026-05-13 14:37:51 -04:00
1 parent 05c103d92a
commit 8736d42793
1 file changed
+3 -3
+3 -3
View File
@@ -3411,9 +3411,9 @@ void cmCTest::Log(LogType logType, std::string msg, bool suppress)
}
std::cout << msg;
#ifndef _WIN32
printf("\x1B[K"); // move caret to end
#endif
// ProgressOutputSupportedByConsole() already verified VT100 support.
// Erase the rest of the line before printing the message.
printf("\x1B[K");
std::cout.flush();
return;
}