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:
Martin Hořeňovský
2016-12-16 14:46:26 +01:00
parent b0de6c938a
commit b3907a78e1
4 changed files with 44 additions and 7 deletions

View File

@@ -68,6 +68,13 @@ You may also suppress any of these features by using the `_NO_` form, e.g. `CATC
All C++11 support can be disabled with `CATCH_CONFIG_NO_CPP11`
# Windows header clutter
On Windows Catch includes `windows.h`. To minimize global namespace clutter in the implementation file, it defines `NOMINMAX` and `WIN32_LEAN_AND_MEAN` before including it. You can control this behaviour via two macros:
CATCH_CONFIG_NO_NOMINMAX // Stops Catch from using NOMINMAX macro
CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN // Stops Catch from using WIN32_LEAN_AND_MEAN macro
---
[Home](Readme.md)
[Home](Readme.md)