mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:04:13 +08:00
mdbx-cmake: initial support for C++23.
This commit is contained in:
parent
630ef98951
commit
c456625ef2
@ -334,12 +334,16 @@ list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_11 HAS_CXX11)
|
|||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_14 HAS_CXX14)
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_14 HAS_CXX14)
|
||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_17 HAS_CXX17)
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_17 HAS_CXX17)
|
||||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_20 HAS_CXX20)
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_20 HAS_CXX20)
|
||||||
|
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_23 HAS_CXX23)
|
||||||
if(NOT DEFINED MDBX_CXX_STANDARD)
|
if(NOT DEFINED MDBX_CXX_STANDARD)
|
||||||
if(DEFINED ENV{CMAKE_CXX_STANDARD})
|
if(DEFINED ENV{CMAKE_CXX_STANDARD})
|
||||||
set(CMAKE_CXX_STANDARD $ENV{CMAKE_CXX_STANDARD})
|
set(CMAKE_CXX_STANDARD $ENV{CMAKE_CXX_STANDARD})
|
||||||
endif()
|
endif()
|
||||||
if(DEFINED CMAKE_CXX_STANDARD)
|
if(DEFINED CMAKE_CXX_STANDARD)
|
||||||
set(MDBX_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
set(MDBX_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
||||||
|
elseif(NOT HAS_CXX23 LESS 0
|
||||||
|
AND NOT (CMAKE_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12))
|
||||||
|
set(MDBX_CXX_STANDARD 23)
|
||||||
elseif(NOT HAS_CXX20 LESS 0
|
elseif(NOT HAS_CXX20 LESS 0
|
||||||
AND NOT (CMAKE_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
|
AND NOT (CMAKE_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9))
|
||||||
set(MDBX_CXX_STANDARD 20)
|
set(MDBX_CXX_STANDARD 20)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user