mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-27 11:17:07 +08:00
mdbx-cmake: очистка условий включения стандартов C и C++.
This commit is contained in:
parent
bd7b272bca
commit
9b9d6c6d65
@ -804,13 +804,15 @@ macro(target_setup_options TARGET)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION $<BOOL:${INTERPROCEDURAL_OPTIMIZATION}>)
|
||||
endif()
|
||||
if(NOT MDBX_C_STANDARD EQUAL 11 OR (NOT C_FALLBACK_GNU11 AND NOT C_FALLBACK_11))
|
||||
if(NOT C_FALLBACK_GNU11 AND NOT C_FALLBACK_11)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
C_STANDARD ${MDBX_C_STANDARD} C_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
if(MDBX_BUILD_CXX)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
CXX_STANDARD ${MDBX_CXX_STANDARD} CXX_STANDARD_REQUIRED ON)
|
||||
if(NOT CXX_FALLBACK_GNU11 AND NOT CXX_FALLBACK_11)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
CXX_STANDARD ${MDBX_CXX_STANDARD} CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
if(MSVC AND NOT MSVC_VERSION LESS 1910)
|
||||
target_compile_options(${TARGET} INTERFACE "/Zc:__cplusplus")
|
||||
endif()
|
||||
|
@ -386,7 +386,7 @@ endif()
|
||||
if(CMAKE_CXX_COMPILER_LOADED)
|
||||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_11 HAS_CXX11)
|
||||
if(HAS_CXX11 LESS 0)
|
||||
if (MSVC)
|
||||
if(MSVC)
|
||||
check_cxx_compiler_flag("/std:c++11" CXX_FALLBACK_11)
|
||||
else()
|
||||
check_cxx_compiler_flag("-std=gnu++11" CXX_FALLBACK_GNU11)
|
||||
@ -401,7 +401,7 @@ endif()
|
||||
if(CMAKE_C_COMPILER_LOADED)
|
||||
list(FIND CMAKE_C_COMPILE_FEATURES c_std_11 HAS_C11)
|
||||
if(HAS_C11 LESS 0)
|
||||
if (MSVC)
|
||||
if(MSVC)
|
||||
check_c_compiler_flag("/std:c11" C_FALLBACK_11)
|
||||
else()
|
||||
check_c_compiler_flag("-std=gnu11" C_FALLBACK_GNU11)
|
||||
|
Loading…
x
Reference in New Issue
Block a user