summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBai Miao <[email protected]>2024-07-04 14:31:59 +0800
committerGitHub <[email protected]>2024-07-04 14:31:59 +0800
commita2558e300b831c9c933939505041b65973c7b0df (patch)
tree2e1e0182923240c7bd4247ceaebd7767d8247401
parentd77ca871e7edc2b5cdfae70f5073dca247d6cc58 (diff)
Update load.lua
-rw-r--r--xmake/toolchains/msvc/load.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/xmake/toolchains/msvc/load.lua b/xmake/toolchains/msvc/load.lua
index b49541ed0..486c8e217 100644
--- a/xmake/toolchains/msvc/load.lua
+++ b/xmake/toolchains/msvc/load.lua
@@ -20,6 +20,7 @@
-- imports
import("core.base.option")
+import("core.base.semver")
import("core.project.config")
import("detect.sdks.find_vstudio")
@@ -80,15 +81,8 @@ function main(toolchain)
end
-- check and add vs_binary_output env
- local vs_binary = {
- ["2003"] = true,
- ["7.0"] = true,
- ["6.0"] = true,
- ["5.0"] = true,
- ["4.2"] = true
- }
local vs = toolchain:config("vs")
- if vs and vs_binary[vs] then
+ if vs and semver.is_valid(vs) and semver.compare(vs, "2005") < 0 then
toolchain:add("runenvs", "VS_BINARY_OUTPUT", "1")
end
end