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

Brad King brad.king at kitware.com
Mon Nov 16 10:31:43 EST 2015


On 11/13/2015 04:51 PM, Michael Scott wrote:
> Here's the original patch split up into smaller more specific patches. 
> Let me know if there's any issues or if everything's okay, so I can 
> continue with the rest of the intended changes.

Thanks.  That is much easier to review and see the purpose of each hunk.

I've revised the patches slightly.  See attached series.  In particular,
I moved the hunk below forward to "Modify dev warning options to affect
deprecated warnings", the commit where it actually becomes needed
because the default changes.

Please precede this commit with a change that includes this hunk and
an explicit change to the default.  That way we call out the change
to the default with an explicit commit that is separate from the
additional new behavior of making -Wdev affect -Wdeprecated.

Please add a Help/release/dev/cmake-W-options.rst file with release
notes for these changes.  Mention the change in default deprecation
warnings in the release notes.  Look back at commit c96fe0b4 for the
release notes we almost used for 3.4.

The current caching logic still needs some work.  It looks like both
CMAKE_WARN_DEPRECATED and CMAKE_SUPPRESS_DEVELOPER_WARNINGS end up
in the cache right now even if no explicit options were given.  This
means that adding "-Wno-dev" on a non-initial configuration will not
disable deprecation warnings because CMAKE_WARN_DEPRECATED is already
cached even though no explicit -W option was given before.  Please
revise the logic so that these variables are cached only if the
corresponding options are explicitly set.

Also I'm not sure what to do about persistence of the option check
boxes in cmake-gui when selecting a different build tree.  As a user
I may expect those options to be loaded from the current cache in each
build tree I select.

Thanks,
-Brad

diff --git a/Tests/RunCMake/message/nomessage.cmake b/Tests/RunCMake/message/nomessage.cmake
index 582ab4d..0ff951a 100644
--- a/Tests/RunCMake/message/nomessage.cmake
+++ b/Tests/RunCMake/message/nomessage.cmake
@@ -1,3 +1,4 @@
+set(CMAKE_WARN_DEPRECATED OFF)

 message(DEPRECATION "This is not issued")

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Tests-Revise-message-in-RunCMake.CommandLine-Wdev-ca.patch
Type: text/x-diff
Size: 2041 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0008.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Make-message-suppression-more-consistent.patch
Type: text/x-diff
Size: 10294 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0009.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Explicitly-enable-author-dev-warnings-by-default.patch
Type: text/x-diff
Size: 3919 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0010.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Refactor-the-W-options-parser-to-be-generic.patch
Type: text/x-diff
Size: 9356 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0011.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Add-W-options-to-control-deprecated-warning-messages.patch
Type: text/x-diff
Size: 6315 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0012.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Consistent-documentation-for-deprecation-message-var.patch
Type: text/x-diff
Size: 1530 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0013.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Modify-dev-warning-options-to-affect-deprecated-warn.patch
Type: text/x-diff
Size: 6077 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0014.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-cmake-gui-Add-option-to-suppress-deprecation-warning.patch
Type: text/x-diff
Size: 5970 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151116/d8997e36/attachment-0015.patch>


More information about the cmake-developers mailing list