summaryrefslogtreecommitdiff
path: root/xmake/rules
diff options
context:
space:
mode:
authorruki <[email protected]>2022-11-05 06:29:29 +0800
committerGitHub <[email protected]>2022-11-05 06:29:29 +0800
commita0c0fc7e3517e10e400e6d48338fa596202bd21c (patch)
treecdb87f9bb847a39bad4da9042f90e0a6569f3bf2 /xmake/rules
parent5cf20abdd48b4dfe645a9564975f4367e4494240 (diff)
parent4a532ca2ea7ebd5265159a6f40a809a57f330dba (diff)
Merge pull request #3025 from xmake-io/exception
C++ exception enabled/disabled switch method #2988
Diffstat (limited to 'xmake/rules')
-rw-r--r--xmake/rules/c++/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/c++/xmake.lua b/xmake/rules/c++/xmake.lua
index 2f7977768..3d160ab65 100644
--- a/xmake/rules/c++/xmake.lua
+++ b/xmake/rules/c++/xmake.lua
@@ -27,6 +27,12 @@ rule("c++.build")
set_sourcekinds("cxx")
add_deps("c++.build.pcheader", "c++.build.modules", "c++.build.optimization")
on_build_files("private.action.build.object", {batch = true, distcc = true})
+ on_config(function (target)
+ -- we enable c++ exceptions by default
+ if target:is_plat("windows") and not target:get("exceptions") then
+ target:set("exceptions", "cxx")
+ end
+ end)
rule("c++")