[Insight-developers] Re: Suppressing Deprecation Warnings

Brad King brad.king at kitware.com
Fri Dec 28 13:33:23 EST 2007


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


More information about the Insight-developers mailing list