mdbx-cmake: allow predefine MDBX_C_STANDARD.

Change-Id: I9895c8afff7fd80bd25292faef0e88fe2002ff21
This commit is contained in:
Leonid Yuriev 2020-11-28 13:07:58 +03:00
parent 9e5ea95f0f
commit 5282f99bd6

View File

@ -340,6 +340,7 @@ if(NOT DEFINED MDBX_CXX_STANDARD)
set(MDBX_CXX_STANDARD 98) set(MDBX_CXX_STANDARD 98)
endif() endif()
endif() endif()
if(NOT DEFINED MDBX_C_STANDARD)
# MSVC >= 19.28 (Microsoft Visual Studio 16.8) is mad! # MSVC >= 19.28 (Microsoft Visual Studio 16.8) is mad!
# It unable process Windows SDK headers in the C11 mode! # It unable process Windows SDK headers in the C11 mode!
if(HAS_C11 LESS 0 OR (MSVC AND MSVC_VERSION GREATER 1927)) if(HAS_C11 LESS 0 OR (MSVC AND MSVC_VERSION GREATER 1927))
@ -347,6 +348,7 @@ if(HAS_C11 LESS 0 OR (MSVC AND MSVC_VERSION GREATER 1927))
else() else()
set(MDBX_C_STANDARD 11) set(MDBX_C_STANDARD 11)
endif() 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")
if(MSVC) if(MSVC)