From 8ee55898d04dbdfec07ded66fc1362fe10fbb8f4 Mon Sep 17 00:00:00 2001 From: David Cole <david.cole@kitware.com> Date: Wed, 15 Aug 2007 09:25:58 -0400 Subject: [PATCH] COMP: Suppress Microsoft deprecation warnings when building kwsys .c and .cxx files. This way, other projects that include kwsys will not see the warnings in kwsys .c and .cxx files, but they can still see the warnings in their own source files if they want to... --- Configure.h.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Configure.h.in b/Configure.h.in index 989bbe2e..5fa67f0d 100644 --- a/Configure.h.in +++ b/Configure.h.in @@ -22,6 +22,14 @@ # define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT #endif +/* If we are building a kwsys .c or .cxx file, suppress the Microsoft + deprecation warnings. */ +#if defined(KWSYS_NAMESPACE) +# define _CRT_SECURE_NO_DEPRECATE +# define _CRT_NONSTDC_NO_DEPRECATE +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Whether Large File Support is requested. */ #define @KWSYS_NAMESPACE@_LFS_REQUESTED @KWSYS_LFS_REQUESTED@ -- GitLab