Use dirent_portable.h only in MSVC

This commit is contained in:
Furkan Usta 2020-05-02 15:16:50 +03:00
parent 60ee5fc844
commit 977e1a94b2
3 changed files with 13 additions and 3 deletions

View File

@ -9,7 +9,12 @@
#define JSON_TEST_NUMBERS #define JSON_TEST_NUMBERS
#endif #endif
#include "dirent_portable.h" #ifndef _MSC_VER
#include <dirent.h>
#else
// Microsoft can't be bothered to provide standard utils.
#include <dirent_portable.h>
#endif
#include "simdjson.h" #include "simdjson.h"
// ulp distance // ulp distance

View File

@ -12,7 +12,12 @@
#define JSON_TEST_STRINGS #define JSON_TEST_STRINGS
#endif #endif
#include "dirent_portable.h" #ifndef _MSC_VER
#include <dirent.h>
#else
// Microsoft can't be bothered to provide standard utils.
#include <dirent_portable.h>
#endif
#include "simdjson.h" #include "simdjson.h"
char *fullpath; char *fullpath;

View File

@ -1,4 +1,4 @@
add_library(simdjson-windows-headers INTERFACE) add_library(simdjson-windows-headers INTERFACE)
if(MSVC) if(MSVC)
target_include_directories(simdjson-windows-headers INTERFACE .) target_include_directories(simdjson-windows-headers INTERFACE .)
endif() endif()