mdbx-cmake: crutch for MSVC 19.28 (Visual Studio 16.8).

Change-Id: I8fdb665d103031dc5e0c4b7963bc5eb65853a82f
This commit is contained in:
Leonid Yuriev 2020-11-17 13:59:29 +03:00
parent 015ed5bc98
commit 11fde67edc

View File

@ -340,10 +340,12 @@ if(NOT DEFINED MDBX_CXX_STANDARD)
set(MDBX_CXX_STANDARD 98) set(MDBX_CXX_STANDARD 98)
endif() endif()
endif() endif()
if(NOT HAS_C11 LESS 0) # MSVC >= 19.28 (Microsoft Visual Studio 16.8) is mad!
set(MDBX_C_STANDARD 11) # It unable process Windows SDK headers in the C11 mode!
else() if(HAS_C11 LESS 0 OR (MSVC AND MSVC_VERSION GREATER 1927))
set(MDBX_C_STANDARD 99) set(MDBX_C_STANDARD 99)
else()
set(MDBX_C_STANDARD 11)
endif() endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND EXISTS "${MDBX_SOURCE_DIR}/ntdll.def") if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND EXISTS "${MDBX_SOURCE_DIR}/ntdll.def")