Added NOMINMAX and WIN32_LEAN_AND_MEAN defines before including windows.h
This stops the `windows.h` header from defining `min` and `max` macros and including lot of Windows APIs that are not needed by Catch.
This commit is contained in:
parent
b0de6c938a
commit
b3907a78e1
4 changed files with 44 additions and 7 deletions
|
@ -41,9 +41,12 @@ namespace Catch {
|
|||
|
||||
#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) /////////////////////////////////////////
|
||||
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
# ifdef CATCH_DEFINES_NOMINMAX
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
# ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
|
||||
#ifdef __AFXDLL
|
||||
#include <AfxWin.h>
|
||||
|
@ -51,6 +54,13 @@ namespace Catch {
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
# ifdef CATCH_DEFINES_NOMINMAX
|
||||
# undef NOMINMAX
|
||||
# endif
|
||||
# ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
|
||||
namespace Catch {
|
||||
namespace {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue