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

I tried installing CMake 3.17.3 and call it with --log-level=TRACE and --log-level=VERBOSE, but the messages never showed up. In the end, after waiting an hour with this, I figured out the best of the best is just to use an if defined checking if VERBOSE environment variable is defined:

if (DEFINED ENV{VERBOSE})
    MESSAGE(STATUS "Doing message for debug")
endif()
1 Like