[cmake-developers] Introducing: message(DEBUG)

Eric Noulard eric.noulard at gmail.com
Mon Mar 5 10:30:25 EST 2012


2012/3/5 Rolf Eike Beer <eike at sf-mail.de>:
>> On 3/3/2012 5:25 AM, Rolf Eike Beer wrote:
>>> +  else if (*i == "DEBUG")
>>> +    {
>> ...
>>> +    status = true;
>>
>> 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.

Then may be you can have a bunch of control var for that:
CMAKE_DEBUG_MESSAGES_STACKTRACE ON/OFF
CMAKE_DEBUG_MESSAGES_FILEPREFIX  ON/OFF
CMAKE_DEBUG_MESSAGES_USERPREFIX <stringvalue>

then you display some prefix depending on ON/OFF value and if
USERPREFIX is set.

>> 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.

May be something like my previous proposal?

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org



More information about the cmake-developers mailing list