Restore VS runtime override (with an option to disable it)

This commit is contained in:
SirLynix 2022-07-27 23:02:43 +02:00
parent d783418a63
commit b0cff13562
1 changed files with 10 additions and 0 deletions

View File

@ -125,6 +125,12 @@ option("embed-resources")
set_description("Turn builtin resources into includable headers")
option_end()
option("override_runtime")
set_default(true)
set_showmenu(true)
set_description("Override vs runtime to MD in release and MDd in debug")
option_end()
option("usepch")
set_default(false)
set_showmenu(true)
@ -197,6 +203,10 @@ end
if is_plat("windows") then
if has_config("override_runtime") then
set_runtimes(is_mode("debug") and "MDd" or "MD")
end
add_defines("_CRT_SECURE_NO_WARNINGS")
add_cxxflags("/bigobj", "/permissive-", "/Zc:__cplusplus", "/Zc:externConstexpr", "/Zc:inline", "/Zc:lambda", "/Zc:preprocessor", "/Zc:referenceBinding", "/Zc:strictStrings", "/Zc:throwingNew")
add_cxflags("/w44062") -- Enable warning: switch case not handled