Fix #253 (#254)
* Use Windows.h instead of windows.h
Fixes part of #253.
* Remove `VC_EXTRA_LEAN`.
Fixes part of #253. `VC_EXTRA_LEAN` doesn't appear anywhere in Windows.h
(at least on my machine, only `WIN32_LEAN_AND_MEAN` does) so it seems
safe to remove it.
* Ignore Wunused-macros warning for DOCTEST_LIBRARY_IMPLEMENTATION.
Removing the macro lead to compilation errors so its definitely a false
positive.
diff --git a/doctest/doctest.h b/doctest/doctest.h
index 7a175ee..1638b53 100644
--- a/doctest/doctest.h
+++ b/doctest/doctest.h
@@ -2696,13 +2696,18 @@
#endif // DOCTEST_SINGLE_HEADER
#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER)
-#ifndef DOCTEST_LIBRARY_IMPLEMENTATION
-#define DOCTEST_LIBRARY_IMPLEMENTATION
#ifndef DOCTEST_SINGLE_HEADER
#include "doctest_fwd.h"
#endif // DOCTEST_SINGLE_HEADER
+DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-macros")
+
+#ifndef DOCTEST_LIBRARY_IMPLEMENTATION
+#define DOCTEST_LIBRARY_IMPLEMENTATION
+
+DOCTEST_CLANG_SUPPRESS_WARNING_POP
+
DOCTEST_CLANG_SUPPRESS_WARNING_PUSH
DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas")
DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded")
@@ -2823,9 +2828,6 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // WIN32_LEAN_AND_MEAN
-#ifndef VC_EXTRA_LEAN
-#define VC_EXTRA_LEAN
-#endif // VC_EXTRA_LEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif // NOMINMAX
diff --git a/doctest/parts/doctest.cpp b/doctest/parts/doctest.cpp
index 042d188..5acb487 100644
--- a/doctest/parts/doctest.cpp
+++ b/doctest/parts/doctest.cpp
@@ -1,11 +1,16 @@
#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER)
-#ifndef DOCTEST_LIBRARY_IMPLEMENTATION
-#define DOCTEST_LIBRARY_IMPLEMENTATION
#ifndef DOCTEST_SINGLE_HEADER
#include "doctest_fwd.h"
#endif // DOCTEST_SINGLE_HEADER
+DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-macros")
+
+#ifndef DOCTEST_LIBRARY_IMPLEMENTATION
+#define DOCTEST_LIBRARY_IMPLEMENTATION
+
+DOCTEST_CLANG_SUPPRESS_WARNING_POP
+
DOCTEST_CLANG_SUPPRESS_WARNING_PUSH
DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas")
DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded")
@@ -126,9 +131,6 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // WIN32_LEAN_AND_MEAN
-#ifndef VC_EXTRA_LEAN
-#define VC_EXTRA_LEAN
-#endif // VC_EXTRA_LEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif // NOMINMAX
diff --git a/examples/executable_dll_and_plugin/main.cpp b/examples/executable_dll_and_plugin/main.cpp
index 0955091..930efc0 100644
--- a/examples/executable_dll_and_plugin/main.cpp
+++ b/examples/executable_dll_and_plugin/main.cpp
@@ -24,7 +24,7 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN
-#include <windows.h>
+#include <Windows.h>
DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END
#ifdef _MSC_VER
#define LoadDynamicLib(lib) LoadLibrary(lib ".dll")