summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/make/makefile.lua4
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/plugins/project/make/makefile.lua b/xmake/plugins/project/make/makefile.lua
index f9f0581c0..601f920c9 100644
--- a/xmake/plugins/project/make/makefile.lua
+++ b/xmake/plugins/project/make/makefile.lua
@@ -109,7 +109,7 @@ function _make_common_flags(target, sourcekind, sourcebatch)
-- make common flags
local commonflags = {}
for _, flag in ipairs(first_flags) do
- if flags_stats[flag] == files_count then
+ if flags_stats[flag] >= files_count then
table.insert(commonflags, flag)
end
end
@@ -119,7 +119,7 @@ function _make_common_flags(target, sourcekind, sourcebatch)
for sourcefile, flags in pairs(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
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