mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-15 09:34:30 +08:00
mdbx-cmake: использование CMAKE_C_STANDARD
при выборе стандарта C.
This commit is contained in:
parent
9d79d2ba95
commit
c716531bd4
@ -566,9 +566,15 @@ endif()
|
|||||||
list(FIND CMAKE_C_COMPILE_FEATURES c_std_11 HAS_C11)
|
list(FIND CMAKE_C_COMPILE_FEATURES c_std_11 HAS_C11)
|
||||||
list(FIND CMAKE_C_COMPILE_FEATURES c_std_23 HAS_C23)
|
list(FIND CMAKE_C_COMPILE_FEATURES c_std_23 HAS_C23)
|
||||||
if(NOT DEFINED MDBX_C_STANDARD)
|
if(NOT DEFINED MDBX_C_STANDARD)
|
||||||
|
if(DEFINED ENV{CMAKE_C_STANDARD})
|
||||||
|
set(CMAKE_C_STANDARD $ENV{CMAKE_C_STANDARD})
|
||||||
|
endif()
|
||||||
|
if(DEFINED CMAKE_C_STANDARD)
|
||||||
|
set(MDBX_C_STANDARD ${CMAKE_C_STANDARD})
|
||||||
|
elseif(
|
||||||
|
MSVC
|
||||||
# MSVC >= 19.28 (Microsoft Visual Studio 16.8) is mad! It unable process
|
# MSVC >= 19.28 (Microsoft Visual Studio 16.8) is mad! It unable process
|
||||||
# Windows SDK headers in the C11 mode!
|
# Windows SDK headers in the C11 mode!
|
||||||
if(MSVC
|
|
||||||
AND MSVC_VERSION GREATER 1927
|
AND MSVC_VERSION GREATER 1927
|
||||||
AND NOT MSVC_VERSION GREATER 1929)
|
AND NOT MSVC_VERSION GREATER 1929)
|
||||||
set(MDBX_C_STANDARD 99)
|
set(MDBX_C_STANDARD 99)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user