[CMake] Re: [vtk-developers] deprecated CRT routines in MSVS8

Andy Cedilnik andy.cedilnik at kitware.com
Tue Aug 2 09:15:34 EDT 2005


Hi Goodwin, Yianis,

Maybe we should do this on CMake level. I would say that by default C
should not be deprecated. Then we could have a cmake variable let say
CMAKE_SECURE_API or something that would disable this behavior.

What do you think?

       Andy

Goodwin Lawlor wrote:

> Hi,
>
> You can also add to vtkWin32Header.h
>
> #  pragma warning ( disable : 4996 ) /* depreciated functions */
>
> which clears up most of the warnings (not for the Utilities)
>
> hth
>
> Goodwin
>
> Yianis Nikolaou wrote:
>
>> hi,
>>
>> as you probably know, in MS Visual Studio 8 a bunch of CRT routines
>> have been marked with a DEPRECATED keyword
>> (for example strcpy, sprintf etc. see also
>> http://msdn2.microsoft.com/library/wd3wzwts(en-us,vs.80).aspx
>> <http://msdn2.microsoft.com/library/wd3wzwts%28en-us,vs.80%29.aspx>)
>> and the compiler generates a zillion warnings when I compile VTK
>>
>> Could you please add in CmakeLists.txt
>>
>> ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
>>
>> to disable these warnings by default when using the above compiler?
>>
>> thank you in advance
>>
>> yianis nikolaou
>


-- 
Andy Cedilnik
Kitware Inc.



More information about the CMake mailing list