summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/toolchain.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-09-10 23:45:37 +0800
committerruki <[email protected]>2025-09-10 23:45:37 +0800
commit47d5aff2085590620041c00091484e4edda9f9f3 (patch)
treee8090de390b770f1f5ce3ec4c47d383473b89d4e /xmake/modules/private/utils/toolchain.lua
parent3844210dfaee545890a72e190d8c3585c512c2d8 (diff)
improve vs version
Diffstat (limited to 'xmake/modules/private/utils/toolchain.lua')
-rw-r--r--xmake/modules/private/utils/toolchain.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/modules/private/utils/toolchain.lua b/xmake/modules/private/utils/toolchain.lua
index 8fbd5c111..da2e9febf 100644
--- a/xmake/modules/private/utils/toolchain.lua
+++ b/xmake/modules/private/utils/toolchain.lua
@@ -35,6 +35,21 @@ function is_compatible_with_host(name)
end
end
+-- get vs version
+function get_vsver(vs)
+ local vsvers = {["2026"] = "18",
+ ["2022"] = "17",
+ ["2019"] = "16",
+ ["2017"] = "15",
+ ["2015"] = "14",
+ ["2013"] = "12",
+ ["2012"] = "11",
+ ["2010"] = "10",
+ ["2008"] = "9",
+ ["2005"] = "8"}
+ return assert(vsvers[vs], "unknown msvc version!")
+end
+
-- get vs toolset version, e.g. v143, v144, ..
function get_vs_toolset_ver(vs_toolset)
local toolset_ver