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

Michael Scott michael.scott250 at gmail.com
Wed Oct 21 18:01:38 EDT 2015


> I think having local CMAKE_WARN_DEPRECATED/CMAKE_ERROR_DEPRECATED vars
> can be left as specific to the message() command (and perhaps other
> IssueMessage callers as deemed appropriate per-case).  Otherwise we
> should just have one global setting.
Okay that sounds good to me, makes the implementation simpler.

> We just need to make sure the process exit code is changed.
If this is the case then just ensuring that IssueMessage sets the fatal 
error occurred flag, on a (upgraded or not) author or deprecated error 
as planned, may achieve this as it looks like cmake::Generate changes 
its return code if the error flag is set, but perhaps I'm mistaken or 
other code paths don't have this behaviour. So I probably wouldn't feel 
confident on relying on just setting the flag in IssueMessage.

> We may not have to update all callers to
> achieve this; it would only be an optimization.  OTOH perhaps we
> should defer this part until after the main warning control
> command-line options are worked out.
That sounds sensible, I'll make the proposed changes to the cmake and 
cmMessageCommand classes first, get some adequate tests in and then move 
on to updating the callers. I don't think it'll be a massive task to 
update the callers so I'm not particularly worried about that part, 
hopefully there won't be any surprises though.

I'm aiming to get a first patch proposal done by the end of this week.

Cheers,
Michael






More information about the cmake-developers mailing list