From 62b27bdee263831066a0cffd555e9c67915f0cf0 Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Wed, 1 Mar 2023 17:59:50 +0100 Subject: vstudio project: fix /GR- handling - Fixes /GR- handling --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index e4bfddae3..ad0c6df5f 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -408,7 +408,7 @@ function _make_source_options_cl(vcxprojfile, flags, condition) end -- make ExternalTemplatesDiagnostics - if flagstr:find("[%-/]external:templates-") then + if flagstr:find("[%-/]external:templates%-") then vcxprojfile:print("true", condition) else vcxprojfile:print("false", condition) @@ -457,8 +457,15 @@ function _make_source_options_cl(vcxprojfile, flags, condition) vcxprojfile:print("MultiThreaded", condition) end + -- make RuntimeTypeInfo + if flagstr:find("[%-/]GR%-") then + vcxprojfile:print("false", condition) + elseif flagstr:find("[%-/]GR") then + vcxprojfile:print("true", condition) + end + -- handle multi processor compilation - if flagstr:find("[%-/]Gm-") or not flagstr:find("[%-/]Gm") then + if flagstr:find("[%-/]Gm%-") or not flagstr:find("[%-/]Gm") then vcxprojfile:print("false", condition) if not flagstr:find("[%-/]MP1") then vcxprojfile:print("true", condition) @@ -484,7 +491,7 @@ function _make_source_options_cl(vcxprojfile, flags, condition) -- make AdditionalOptions local excludes = { "Od", "Os", "O0", "O1", "O2", "Ot", "Ox", "W0", "W1", "W2", "W3", "W4", "WX", "Wall", "Zi", "ZI", "Z7", "MT", "MTd", "MD", "MDd", "TP", - "Fd", "fp", "I", "D", "Gm-", "Gm", "MP", "external:W0", "external:W1", "external:W2", "external:W3", "external:W4", "external:templates-?", "external:I", + "Fd", "fp", "I", "D", "Gm%-", "Gm", "GR%-", "GR", "MP", "external:W0", "external:W1", "external:W2", "external:W3", "external:W4", "external:templates%-?", "external:I", "std:c11", "std:c17", "std:c%+%+11", "std:c%+%+14", "std:c%+%+17", "std:c%+%+20", "std:c%+%+latest", "nologo", "wd(%d+)" } local additional_flags = _exclude_flags(flags, excludes) -- cgit v1.3.1