From 977e1a94b25d3784319f9884ed771ec7609cef33 Mon Sep 17 00:00:00 2001 From: Furkan Usta Date: Sat, 2 May 2020 15:16:50 +0300 Subject: [PATCH] Use dirent_portable.h only in MSVC --- tests/numberparsingcheck.cpp | 7 ++++++- tests/stringparsingcheck.cpp | 7 ++++++- windows/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/numberparsingcheck.cpp b/tests/numberparsingcheck.cpp index c9481801..2dc10214 100644 --- a/tests/numberparsingcheck.cpp +++ b/tests/numberparsingcheck.cpp @@ -9,7 +9,12 @@ #define JSON_TEST_NUMBERS #endif -#include "dirent_portable.h" +#ifndef _MSC_VER +#include +#else +// Microsoft can't be bothered to provide standard utils. +#include +#endif #include "simdjson.h" // ulp distance diff --git a/tests/stringparsingcheck.cpp b/tests/stringparsingcheck.cpp index 690d25c1..37c13324 100644 --- a/tests/stringparsingcheck.cpp +++ b/tests/stringparsingcheck.cpp @@ -12,7 +12,12 @@ #define JSON_TEST_STRINGS #endif -#include "dirent_portable.h" +#ifndef _MSC_VER +#include +#else +// Microsoft can't be bothered to provide standard utils. +#include +#endif #include "simdjson.h" char *fullpath; diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 49f28664..464d2e52 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,4 +1,4 @@ add_library(simdjson-windows-headers INTERFACE) if(MSVC) target_include_directories(simdjson-windows-headers INTERFACE .) -endif() \ No newline at end of file +endif()