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

Michael Scott michael.scott250 at gmail.com
Wed Jul 8 16:01:38 EDT 2015


> Since AUTHOR_WARNING is a superset of DEPRECATION_WARNING I think
> -W[no-]dev can influence CMAKE_WARN_DEPRECATED.  Please also add
> -W[no-]error=dev to turn AUTHOR_WARNING into an error and also make
> it influence CMAKE_ERROR_DEPRECATED.  Then -Wdeprecated and friends
> can still be used to control the DEPRECATION messages separately.

Making dev influence deprecation variables is not a problem. To support 
-Werror=dev we'll need a new variable I'm thinking though, something 
like a boolean CMAKE_SUPPRESS_DEVELOPER_ERRORS?

What should be the expected behaviour when combining dev and deprecated 
now, as they affect each other. If for example the user used the options 
"-Wno-deprecated -Wdev" in a cmake invocation, the most logical to me 
would be that this causes CMAKE_SUPPRESS_DEVELOPER_WARNINGS to be TRUE 
and CMAKE_WARN_DEPRECATED to be FALSE, but implementing that might make 
the code more complicated than I'd hoped.

Cheers,
Michael



More information about the cmake-developers mailing list