[cmake-developers] Add command line options for deprecation message control

Michael Scott michael.scott250 at gmail.com
Sat Sep 19 18:32:53 EDT 2015


Investigating the issue a bit more, I can see why it's happening for the 
given example. When I made those changes, I only modified the "message" 
CMake command, to check the CMAKE_WARN/ERROR_DEPRECATED and 
CMAKE_SUPPRESS_DEVELOPER_WARNINGS variables before outputting the 
message. The message command uses cmake::IssueMessage to actually output 
the required message. What I wasn't aware of was that other commands and 
code also use the IssueMessage for outputting author and deprecated 
messages. As the IssueMessage command doesn't check those variables, or 
the new warning levels map, before outputting the message, that's why 
we're seeing this behaviour.

What I wanted to check before coming up with a fix, is whether the -W 
options are intended to only be applicable for the message command (and 
so the current behaviour is correct), or whether they should affect all 
author and deprecated messages output by other parts of CMake?

If the current behaviour isn't correct, then one thing to have a good 
think about, is how to handle turning warnings into errors when 
-Werr-dev or -Werr-deprecated (and also the required behaviour when 
-Wno- is used). As some users of IssueMessage do different things if an 
error occurs (and is output), *after* IssueMessage is called. So there 
might need to be a way to signal to the caller when a warning has been 
upgraded to an error because of the users options perhaps?

Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150919/39be29d0/attachment.html>


More information about the cmake-developers mailing list