This adds /permissive- to recent visual studio builds (#1596)

* This adds /permissive-.

* Typo.

* Trying this simple fix.
This commit is contained in:
Daniel Lemire 2021-06-01 10:57:37 -04:00 committed by GitHub
parent 4f8bdf517a
commit 939b6b854a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -119,6 +119,9 @@ We recommend Visual Studio 2019 or better on a 64-bit system.")
# are unsupported.
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4714?view=vs-2019
target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl /w34714)
if(MSVC_VERSION GREATER 1910)
target_compile_options(simdjson-internal-flags INTERFACE /permissive-)
endif()
endif()
if(SIMDJSON_VISUAL_STUDIO_BUILD_WITH_DEBUG_INFO_FOR_PROFILING)
add_link_options(/DEBUG)

View File

@ -112,13 +112,8 @@ char *optarg; /* argument associated with option */
extern char __declspec(dllimport) *__progname;
#endif
// D. Lemire (April 2020): adding __clang__
// D. Lemire (June 2020): adding __MINGW32__ and __MINGW64__
#if defined(__CYGWIN__) || defined(__clang__) || defined(__MINGW32__) || defined(__MINGW64__)
// next line modified D. Lemire (last modified on June 1st 2021)
static char EMSG[] = "";
#else
#define EMSG ""
#endif
static int getopt_internal(int, char * const *, const char *,
const struct option *, int *, int);