diff options
| author | Jérôme Leclercq <[email protected]> | 2023-03-01 17:59:50 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-01 17:59:50 +0100 |
| commit | 62b27bdee263831066a0cffd555e9c67915f0cf0 (patch) | |
| tree | bab32cb8514d5cf9f3512262f1f75a7fdd5b962f /xmake/plugins/project/vstudio/impl | |
| parent | aeb7ae95327b68b3d5d814ae6308940397e6394e (diff) | |
vstudio project: fix /GR- handling
- Fixes /GR- handling
Diffstat (limited to 'xmake/plugins/project/vstudio/impl')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 13 |
1 files 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("<ExternalTemplatesDiagnostics%s>true</ExternalTemplatesDiagnostics>", condition) else vcxprojfile:print("<ExternalTemplatesDiagnostics%s>false</ExternalTemplatesDiagnostics>", condition) @@ -457,8 +457,15 @@ function _make_source_options_cl(vcxprojfile, flags, condition) vcxprojfile:print("<RuntimeLibrary%s>MultiThreaded</RuntimeLibrary>", condition) end + -- make RuntimeTypeInfo + if flagstr:find("[%-/]GR%-") then + vcxprojfile:print("<RuntimeTypeInfo%s>false</RuntimeTypeInfo>", condition) + elseif flagstr:find("[%-/]GR") then + vcxprojfile:print("<RuntimeTypeInfo%s>true</RuntimeTypeInfo>", 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("<MinimalRebuild%s>false</MinimalRebuild>", condition) if not flagstr:find("[%-/]MP1") then vcxprojfile:print("<MultiProcessorCompilation%s>true</MultiProcessorCompilation>", 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) |
