summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-17 20:12:32 +0800
committerGitHub <[email protected]>2022-03-17 20:12:32 +0800
commit797901082d0b18f5652c83226cb6c6cc33931354 (patch)
tree707fa6693a51592cd3f73119b3418c831c93f9c5
parent6675ca4e481faf8c799069763259bb78d07aeddf (diff)
parentcd5d862ab891bcf29e66646ed6ca8bd32262f93b (diff)
Merge pull request #2173 from xq114/dev
fix vs generator
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
index f836632fb..688a12f13 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua
@@ -980,7 +980,12 @@ function _build_common_items(vsinfo, target)
local sourceflags = {}
for _, sourcebatch in pairs(targetinfo.sourcebatches) do
local sourcekind = sourcebatch.sourcekind
- if (sourcekind == "cc" or sourcekind == "cxx" or sourcekind == "mrc") then
+ if (sourcekind == "as" or sourcekind == "mrc") then
+ -- no common flags for as/mrc files
+ for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
+ sourceflags[sourcefile] = targetinfo.sourceflags[sourcefile]
+ end
+ elseif (sourcekind == "cc" or sourcekind == "cxx") then
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local flags = targetinfo.sourceflags[sourcefile]
local otherflags = {}