From bccf73f440098e64a92ea6bfd2aba0f04fbc9e35 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 26 Nov 2022 00:46:11 +0800 Subject: enable exceptions by default in package --- xmake/core/package/package.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index af523d2dc..a0af9f747 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1976,6 +1976,10 @@ function _instance:_generate_build_configs(configs, opt) end end end + -- enable exceptions for msvc by default + if opt.sourcekind == "cxx" and configs.exceptions == nil and self:has_tool("cxx", "cl") then + configs.exceptions = "cxx" + end if configs and (configs.ldflags or configs.shflags) then configs.force = {ldflags = configs.ldflags, shflags = configs.shflags} configs.ldflags = nil -- cgit v1.3.1