From ef0e7845588e1ae87b3126cc0b9ff1a71834d4c3 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 21 May 2025 22:30:20 +0800 Subject: fix #6474 --- xmake/modules/detect/tools/find_cl.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua index 4f0fb8f77..773ec57e7 100644 --- a/xmake/modules/detect/tools/find_cl.lua +++ b/xmake/modules/detect/tools/find_cl.lua @@ -62,7 +62,9 @@ function main(opt) return info end opt.parse = opt.parse or function (output) - return output:match("(%d+%.%d+%.%d*.-)%s") + -- we only keep the first three digits of the version number, making sure to provide a valid semver string. + -- @see https://github.com/xmake-io/xmake/issues/6474 + return output:match("%s(%d+%.%d+%.%d+)") end version = find_programver(program, opt) end -- cgit v1.3.1