summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-14 12:43:16 +0800
committerruki <[email protected]>2017-07-14 12:43:16 +0800
commitf39f4a27d43a1f63d56ae3c9f7fc34b5158e299a (patch)
tree37d3667077443d79f9f1425d8aa9d54b42ff8599 /xmake/modules/core
parentbe1cbe6488d15f3f802539dacc74bc98471268f0 (diff)
fix has_flags when generating vs201x project
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/cl.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 300ab8be9..45b49e85c 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -156,8 +156,11 @@ function nf_vectorext(self, extension)
, avx2 = "-arch:AVX2"
}
- -- make it
- return maps[extension]
+ -- check it
+ local flag = maps[extension]
+ if flag and self:has_flags(flag) then
+ return flag
+ end
end
-- make the language flag