summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/vstudio/impl
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2021-12-11 23:44:24 +0100
committerJérôme Leclercq <[email protected]>2021-12-11 23:44:24 +0100
commite0a66639122aef90577f67a1e2b7de664fe31e89 (patch)
treef2e2ab8c358ca1a68874995b14a89633ee023404 /xmake/plugins/project/vstudio/impl
parent4592135696009bd89d2ed50a29cbcc82bcc6efae (diff)
Project: fix common flag search
was wrongly handling the case where a flag was present multiple times
Diffstat (limited to 'xmake/plugins/project/vstudio/impl')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index d56c1015d..94dd7150e 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -550,7 +550,7 @@ function _make_common_items(vcxprojfile, vsinfo, target, vcxprojdir)
-- make common flags
targetinfo.commonflags = {}
for _, flag in ipairs(first_flags) do
- if flags_stats[flag] == files_count then
+ if flags_stats[flag] >= files_count then
table.insert(targetinfo.commonflags, flag)
end
end
@@ -560,7 +560,7 @@ function _make_common_items(vcxprojfile, vsinfo, target, vcxprojdir)
for sourcefile, flags in pairs(targetinfo.sourceflags) do
local otherflags = {}
for _, flag in ipairs(flags) do
- if flags_stats[flag] ~= files_count then
+ if flags_stats[flag] < files_count then
table.insert(otherflags, flag)
end
end