Move windows.h reduction logic into windows.h proxy header

Fixes #965 (at least the primary problem, the separate warnings can
be taken care of later)
This commit is contained in:
Martin Hořeňovský 2017-07-31 08:35:27 +02:00
parent d118ce191d
commit 0a3f899d6a
2 changed files with 13 additions and 13 deletions

View File

@ -22,12 +22,6 @@
#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
# define CATCH_PLATFORM_WINDOWS # define CATCH_PLATFORM_WINDOWS
# if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)
# define CATCH_DEFINES_NOMINMAX
# endif
# if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN)
# define CATCH_DEFINES_WIN32_LEAN_AND_MEAN
# endif
#endif #endif
#endif // TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED #endif // TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED

View File

@ -8,11 +8,17 @@
#ifndef TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED #ifndef TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED
#define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED #define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED
#ifdef CATCH_DEFINES_NOMINMAX #include "catch_platform.h"
# define NOMINMAX
#endif #if defined(CATCH_PLATFORM_WINDOWS)
#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN # if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX)
# define WIN32_LEAN_AND_MEAN # define CATCH_DEFINED_NOMINMAX
# define NOMINMAX
# endif
# if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN)
# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
#endif #endif
#ifdef __AFXDLL #ifdef __AFXDLL
@ -21,10 +27,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef CATCH_DEFINES_NOMINMAX #ifdef CATCH_DEFINED_NOMINMAX
# undef NOMINMAX # undef NOMINMAX
#endif #endif
#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN #ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN
# undef WIN32_LEAN_AND_MEAN # undef WIN32_LEAN_AND_MEAN
#endif #endif