[cmake-developers] Introducing: message(DEBUG)

Brad King brad.king at kitware.com
Mon Mar 5 10:28:42 EST 2012


On 3/5/2012 10:22 AM, Rolf Eike Beer wrote:
>> Rather than being a conditional version of STATUS I think full stack
>> information is useful for debugging.  Add to the cmake::MessageType
>> enumeration a DEBUG value and teach cmake::IssueMessage to handle it.
>> The output should look like an error or warning but with "CMake Debug"
>> as the header instead of "CMake Error" or "CMake Warning".
>
> I would like to have that switchable in some way. E.g. for Boost_DEBUG I
> don't have stack traces at the moment, but the contents are the
> information I need. Stacktraces are useful, but not always.

I'm not opposed to a switch but extra verbosity rarely hurts debug
output IMO.  Even a switch at the call site may be the wrong place
because it is up to the viewer of the message whether the full
context is important.  Perhaps the switch can be based on something
similar to the context filters (see below).

>> Once the decision to display the message has a cmListFileBacktrace
>> instance available for the context then you can have fancier rules
>> for deciding what messages to display.
>
> I don't think I fully understand what you are trying to say here.

Elsewhere in this thread discussion proposed filters on messages
based on their context.  Filters based on the full backtrace
should be possible and would give a lot of control.

-Brad



More information about the cmake-developers mailing list