Add OM_SUPPRESS_DEPRECATED to allow suppressing deprecated warnings which can break builds where warnings are treated as errors

This commit is contained in:
Martin Marinov
2020-05-12 21:06:40 +01:00
parent 6e3f0dab76
commit a756bff460

View File

@@ -83,7 +83,12 @@
# endif
#endif
#if defined(_MSC_VER)
//! define OM_SUPPRESS_DEPRECATED to suppress deprecated code warnings
#if defined(OM_SUPPRESS_DEPRECATED)
#pragma message( \
"OpenMesh deprecated code warnings suppressed, please fix your code soon")
# define OM_DEPRECATED(msg)
#elif defined(_MSC_VER)
# define OM_DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__GNUC__)
# if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 /* Test for GCC >= 4.5.0 */