mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Detect out of date flex in MSVC builds.
Per recent discussion, following a report from Quan Zongliang. The same logic is used as in pgbison.pl.
This commit is contained in:
@ -12,10 +12,14 @@ use File::Basename;
|
|||||||
|
|
||||||
require 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
|
require 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl';
|
||||||
|
|
||||||
system('flex -V > NUL');
|
my ($flexver) = `flex -V`; # grab first line
|
||||||
if ($? != 0)
|
$flexver=(split(/\s+/,$flexver))[1];
|
||||||
|
$flexver =~ s/[^0-9.]//g;
|
||||||
|
my @verparts = split(/\./,$flexver);
|
||||||
|
unless ($verparts[0] == 2 && $verparts[1] == 5 && $verparts[2] >= 31)
|
||||||
{
|
{
|
||||||
print "WARNING! flex install not found, attempting to build without\n";
|
print "WARNING! Flex install not found, or unsupported Flex version.\n";
|
||||||
|
print "echo Attempting to build without.\n";
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user