From ba299b59eb992dfbd3fc08fb062b451562b671db Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 15 Oct 2021 16:22:20 +0200 Subject: zencore: added ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END These should be used around third party header includes to ensure they don't fire warnings we want to have enabled for our code --- zencore/include/zencore/zencore.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index 136ed2944..3367b39ef 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -62,6 +62,23 @@ #if ZEN_COMPILER_MSC # pragma warning(disable : 4324) // warning C4324: '': structure was padded due to alignment specifier +# pragma warning(default : 4668) // warning C4668: 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' +#endif + +#ifndef ZEN_THIRD_PARTY_INCLUDES_START +# if ZEN_COMPILER_MSC +# define ZEN_THIRD_PARTY_INCLUDES_START __pragma(warning(push)) __pragma(warning(disable : 4668)) +# else +# define ZEN_THIRD_PARTY_INCLUDES_START +# endif +#endif + +#ifndef ZEN_THIRD_PARTY_INCLUDES_END +# if ZEN_COMPILER_MSC +# define ZEN_THIRD_PARTY_INCLUDES_END __pragma(warning(pop)) +# else +# define ZEN_THIRD_PARTY_INCLUDES_END +# endif #endif ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3