Skip to content

message: Restore explicit flushing of messages on stderr

Brad King requested to merge brad.king/cmake:message-flush into master

In the cmake command-line tool, the message() command with no message mode argument prints the message stderr using the C++ cerr stream. Since !6105 (merged) and an update by !6369 (merged), we print the newline at the end of the message using just \n. We've now observed some cases of output on stdout and stderr getting jumbled when the two go to the same file descriptor. Previously the newline was printed with endl, which implicitly flushes. Flush explicitly to restore that behavior.

Fixes: #23155 (closed)
Backport: release

Edited by Brad King

Merge request reports