summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 3a85c648d..5ee2da1b1 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -678,7 +678,7 @@ function _add_target_exceptions(cmakelists, target)
}
local exceptions = target:get("exceptions")
if exceptions then
- cmakelists:print("if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL \"MSVC\")")
+ cmakelists:print("if(MSVC)")
-- msvc or clang-cl
for _, exception in ipairs(exceptions) do
cmakelists:print(" target_compile_options(%s PRIVATE %s)", target:name(), flags_msvc[exception])