mdbx-cmake: включение стандарта C23.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2024-10-08 23:08:52 +03:00
parent d40e4db13a
commit d2b74e4da5
2 changed files with 13 additions and 5 deletions

View File

@@ -384,9 +384,13 @@ endif()
if(CMAKE_CXX_COMPILER_LOADED)
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_11 HAS_CXX11)
if(HAS_CXX11 LESS 0)
check_cxx_compiler_flag("-std=gnu++11" CXX_FALLBACK_GNU11)
if(NOT CXX_FALLBACK_GNU11)
check_cxx_compiler_flag("-std=c++11" CXX_FALLBACK_11)
if (MSVC)
check_cxx_compiler_flag("/std:c++11" CXX_FALLBACK_11)
else()
check_cxx_compiler_flag("-std=gnu++11" CXX_FALLBACK_GNU11)
if(NOT CXX_FALLBACK_GNU11)
check_cxx_compiler_flag("-std=c++11" CXX_FALLBACK_11)
endif()
endif()
endif()
endif()