Message tool window
The Message tool window shows the build output. You can choose to have it visible for every build or to appear only if a warning or an error occurs.
Two options are available from the Settings menu:
Always Show on Build (default)
Select this option to force the Messages tool window to stay visible for every build. In case it was closed manually, the window will be reopened for the next build.
Auto-Hide and Show on Warning/Error
Select this option to let the Messages tool window appear only if a warning/error occurred during the compilation. If the window was opened manually, CLion will hide it for the next build.
If you disable both options, then CLion will not force the Messages tool window to open unless there is a warning/error. Otherwise, the window remains in the state you previously forced (opened or closed).