[Insight-developers] Re: Suppressing Deprecation Warnings

Bill Lorensen bill.lorensen at gmail.com
Fri Dec 28 13:52:28 EST 2007


Actually, the deprecated method in the transforms is a protected method.
There are no current tests that exercise this code.

Bill

On Dec 28, 2007 1:49 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:

> I propose that we use:
> ITK_LEGACY_REMOVE:BOOL=ON, then any tests that use it will not compile.
>
> For tests that are testing the legacy code we use the new ITK_LEGACY_TEST.
>
> Bill
>
>   On Dec 28, 2007 1:41 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>
> > The problem  is the warnings occur even if the method is not used.
> >
> >
> > On Dec 28, 2007 1:33 PM, Brad King <brad.king at kitware.com> wrote:
> >
> > > Bill Lorensen wrote:
> > > > Yes, I think you are correct. I turned on the REMOVE to test to see
> > > if
> > > > it worked. I recall that it did not the first time I tried it.
> > > [snip]
> > > > On Dec 27, 2007 3:03 PM, Luis Ibanez < luis.ibanez at kitware.com
> > > > <mailto:luis.ibanez at kitware.com>> wrote:
> > > >     Shouldn't it be:
> > > >           ITK_LEGACY_REMOVE:BOOL=OFF
> > > >           ITK_LEGACY_SILENT:BOOL=ON
> > > >     to make sure that deprecated code is
> > > >     still compiled and tested ?
> > >
> > > I've added the ITK_LEGACY_TEST feature previously discussed:
> > >
> > > /cvsroot/Insight/Insight/Code/Common/itkMacro.h,v  <--   itkMacro.h
> > > new revision: 1.83; previous revision: 1.82
> > >
> > > Instead of removing deprecated methods or silencing the warnings we
> > > should do
> > >
> > >   #define ITK_LEGACY_TEST
> > >
> > > at the top (before any #includes) of test source files that call
> > > deprecated methods.  Ideally these source files should be present
> > > exclusively to test deprecated code.
> > >
> > > We have to build the dashboards *without* ITK_LEGACY_SILENT to make
> > > sure
> > > we are not using any legacy methods in non-legacy ITK code.  Any
> > > remaining warnings should be addressed by either fixing the offending
> > > code or moving the test into its own source as noted above.
> > >
> > > -Brad
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071228/895b199e/attachment.htm


More information about the Insight-developers mailing list