summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/xmake.lua')
-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++")