summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-06-24 00:57:48 +0800
committerruki <[email protected]>2023-06-24 00:57:48 +0800
commita361c06843cf103e8e1d646b7dce7318a26951fa (patch)
tree2a6a0dcdc4c924fc7c9a6854a7c7ea1e0d792ac4
parent17e6a90526fdb0ea059f26741e559e83ed241bb1 (diff)
fix cmake generator #3880
-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])