From cefd3fb80e02afb8a7b36556fb41dde51a314b22 Mon Sep 17 00:00:00 2001 From: Cvelth Date: Fri, 24 Apr 2020 13:20:42 +0300 Subject: [PATCH] DOCTEST_CONFIG_USE_STD_HEADERS in MSVC++ (#30) * replace with * Use provided by doctest macro instead of explicit include (#1) * dEfine `DOCTEST_CONFIG_USE_STD_HEADERS` globally --- test/CMakeLists.txt | 1 + test/source/greeter.cpp | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fbc94d1..4b276ed 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,6 +48,7 @@ if (NOT TEST_INSTALLED_VERSION) target_compile_options(Greeter PUBLIC -Wall -pedantic -Wextra -Werror) elseif(MSVC) target_compile_options(Greeter PUBLIC /W4 /WX) + target_compile_definitions(GreeterTests PUBLIC DOCTEST_CONFIG_USE_STD_HEADERS) endif() endif() diff --git a/test/source/greeter.cpp b/test/source/greeter.cpp index a965ae4..ca8834d 100644 --- a/test/source/greeter.cpp +++ b/test/source/greeter.cpp @@ -1,11 +1,6 @@ #include #include -#if defined(_WIN32) || defined(WIN32) -// apparently this is required to compile in MSVC++ -# include -#endif - TEST_CASE("Greeter") { using namespace greeter;