From a9659fb65497af8d2db66101f2ff7233d02997f1 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 17 Apr 2020 14:44:33 -0400 Subject: [PATCH] Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version string comes at the end of a line. Per complaint from Cuiping Lin. Backpatch to all live branches. --- src/tools/msvc/VSObjectFactory.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index e6983b241f..5412540061 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -120,7 +120,7 @@ sub DetermineVisualStudioVersion $? >> 8 == 0 or croak "Unable to determine Visual Studio version: The nmake command wasn't found."; - if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m) + if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?/) { return _GetVisualStudioVersion($1, $2); }