summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2020-11-24 13:55:01 +0100
committerJérôme Leclercq <[email protected]>2020-11-24 13:55:01 +0100
commit559298e63f4e840a0e35645f85cf770219fd26c7 (patch)
tree690a6c495f7b1ff36e38f4b99de3af928f28c3e8 /xmake/plugins
parent5dbf5a1ca7af00442614e21d63969b579cea5ac2 (diff)
vsproj: Handle /Gm(-) and /MP
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index 8188d401c..965559cbd 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -313,6 +313,14 @@ function _make_source_options(vcxprojfile, flags, condition)
vcxprojfile:print("<RuntimeLibrary%s>MultiThreaded</RuntimeLibrary>", condition)
end
+ -- handle multi processor compilation
+ if flagstr:find("[%-/]Gm-") or not flagstr:find("[%-/]Gm") then
+ vcxprojfile:print("<MinimalRebuild%s>false</MinimalRebuild>", condition)
+ if flagstr:find("[%-/]MP") then
+ vcxprojfile:print("<MultiProcessorCompilation%s>true</MultiProcessorCompilation>", condition)
+ end
+ end
+
-- make AdditionalIncludeDirectories
if flagstr:find("[%-/]I") then
local dirs = {}
@@ -331,7 +339,7 @@ function _make_source_options(vcxprojfile, flags, condition)
-- make AdditionalOptions
local additional_flags = {}
- local excludes = {"Od", "Os", "O0", "O1", "O2", "Ot", "Ox", "W0", "W1", "W2", "W3", "WX", "Wall", "Zi", "ZI", "Z7", "MT", "MTd", "MD", "MDd", "TP", "Fd", "fp", "I", "D"}
+ local excludes = {"Od", "Os", "O0", "O1", "O2", "Ot", "Ox", "W0", "W1", "W2", "W3", "WX", "Wall", "Zi", "ZI", "Z7", "MT", "MTd", "MD", "MDd", "TP", "Fd", "fp", "I", "D", "Gm-", "Gm"}
for _, flag in ipairs(flags) do
local excluded = false
for _, exclude in ipairs(excludes) do