mdbx-cmake: очистка условий включения стандартов C и C++.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2024-11-09 23:02:56 +03:00
parent bd7b272bca
commit 9b9d6c6d65
2 changed files with 7 additions and 5 deletions

View File

@ -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)
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()