MSVC: Disable non-conforming conversion from string literal to char*

C++11 forbids conforming compilers from performing the deprecated
conversion from a string literal to non-const char* or wchar_t*. Most
compilers however still do it by default because not doing it breaks
lots of legacy code. We don't have any of this legacy code anymore, so
we can disable the conversion.
liquid_container
Nicolas Hake 2016-02-08 16:51:59 +01:00
parent 142b7ea7c3
commit 3fb3f45a35
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ if(USE_GCC_STD_14)
endif()
if(MSVC)
# Disable non-standard conversion from string literal to (nonconst) char*
list(APPEND OC_CXX_FLAGS /Zc:strictStrings)
list(APPEND OC_CXX_FLAGS /MP)
list(REMOVE_ITEM OC_CXX_FLAGS_DEBUG /Gm)