How to see "message(VERBOSE ...)" output?

According to https://cmake.org/cmake/help/latest/command/message.html I can use message(VERBOSE "some text") to log “Detailed informational messages intended for project users”. But somehow I can’t manage to get these messages to display.

What I’ve tried so far:

  • cmake -v ..
  • cmake --verbose=3 ..
  • cmake -DVERBOSE=1 ..
  • env VERBOSE=1 cmake ..
  • cmake --debug-output .. (this gives way too much output, but my verbose messages are still not shown)

What options or settings do I need to use to see these messages that are logged with mode “VERBOSE”? I’m using CMake 3.17 under RHEL 7.

Thanks, Oliver

The answer is right there on the linked site:

The --log-level command-line option to each of these tools can be used to control which messages will be shown. To make a log level persist between CMake runs, the CMAKE_MESSAGE_LOG_LEVEL variable can be set instead. Note that the command line option takes precedence over the cache variable.

Huh, thanks a lot! Somehow I missed the --log-level command line option.