Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,105
    • Issues 4,105
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !6913

message: Restore explicit flushing of messages on stderr

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Brad King requested to merge brad.king/cmake:message-flush into master Jan 27, 2022
  • Overview 5
  • Commits 1
  • Pipelines 3
  • Changes 1

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 Jan 27, 2022 by Brad King
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: message-flush