diff options
| author | ruki <[email protected]> | 2018-06-07 00:41:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-06-06 22:06:22 +0800 |
| commit | 9567b4e22325d2e22bde33f9b9273b0408cd1d33 (patch) | |
| tree | 5331fd16b162151586f0b7b50aced3380c41c9b0 | |
| parent | ef2499fe3cefcee0182c1da11742ebc5b0736b70 (diff) | |
fix rule for vs201x
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 9c580599b..37d47e22e 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -70,9 +70,13 @@ function _make_targetinfo(mode, arch, target) -- save compiler flags targetinfo.compflags = {} - for _, sourcefile in ipairs(target:sourcefiles()) do - local compflags = compiler.compflags(sourcefile, {target = target}) - targetinfo.compflags[sourcefile] = compflags + for _, sourcebatch in pairs(target:sourcebatches()) do + if not sourcebatch.rulename then + for _, sourcefile in ipairs(sourcebatch.sourcefiles) do + local compflags = compiler.compflags(sourcefile, {target = target}) + targetinfo.compflags[sourcefile] = compflags + end + end end -- save linker flags |
