summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-11-05 00:57:10 +0800
committerruki <[email protected]>2022-11-05 00:57:10 +0800
commit4889bfdb1fc75dfaa90a702f26d07715cb592d15 (patch)
tree8eed62eb4c116e9068a1a151924e4db63f7ac0c1 /xmake/modules/core/tools/cl.lua
parent5cf20abdd48b4dfe645a9564975f4367e4494240 (diff)
add set_exceptions
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 7cce576ae..a20e4d85b 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -298,6 +298,19 @@ function nf_sysincludedir(self, dir)
end
end
+-- make the exception flag
+--
+-- e.g.
+-- set_exceptions("cxx")
+-- set_exceptions("no-cxx")
+function nf_exception(self, exp)
+ local maps = {
+ cxx = "/EHsc",
+ ["no-cxx"] = "/EHsc-"
+ }
+ return maps[exp]
+end
+
-- make the c precompiled header flag
function nf_pcheader(self, pcheaderfile, target)