mdbx-cmake: sync the compiler.cmake module with other projects.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-02-02 16:48:25 +03:00
parent d498c2580b
commit ac02490c97

View File

@ -499,7 +499,7 @@ option(ENABLE_BACKTRACE "Enable output of fiber backtrace information in 'show
is output with resolved function (symbol) names. Otherwise only frame is output with resolved function (symbol) names. Otherwise only frame
addresses are printed." OFF) addresses are printed." OFF)
set(HAVE_BFD False) set(HAVE_BFD FALSE)
if(ENABLE_BACKTRACE) if(ENABLE_BACKTRACE)
if(NOT (X86_32 OR X86_64) OR NOT CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG}) if(NOT (X86_32 OR X86_64) OR NOT CMAKE_COMPILER_IS_GNU${CMAKE_PRIMARY_LANG})
# We only know this option to work with gcc # We only know this option to work with gcc
@ -658,6 +658,7 @@ macro(setup_compile_flags)
if(NOT MSVC_VERSION LESS 1910) if(NOT MSVC_VERSION LESS 1910)
add_compile_flags("CXX" "/Zc:__cplusplus") add_compile_flags("CXX" "/Zc:__cplusplus")
endif() endif()
add_compile_flags("C;CXX" "/W4")
add_compile_flags("C;CXX" "/utf-8") add_compile_flags("C;CXX" "/utf-8")
else() else()
if(CC_HAS_WALL) if(CC_HAS_WALL)