aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2020-04-17 14:52:42 -0400
committerAndrew Dunstan <andrew@dunslane.net>2020-04-17 14:53:56 -0400
commit758814224c8cce90c89577622c89fbf7bdfa43a4 (patch)
tree7f213d47c4f9769c3ce54e96bdda271d2ec9d560
parent213e2b7363cd068b9c4481353c3b72729c069b97 (diff)
downloadpostgresql-758814224c8cce90c89577622c89fbf7bdfa43a4.tar.gz
postgresql-758814224c8cce90c89577622c89fbf7bdfa43a4.zip
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.
-rw-r--r--src/tools/msvc/VSObjectFactory.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm
index 73990ede399..fb774011ffd 100644
--- a/src/tools/msvc/VSObjectFactory.pm
+++ b/src/tools/msvc/VSObjectFactory.pm
@@ -152,7 +152,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);
}