diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2017-09-25 08:03:05 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2017-09-25 08:03:05 -0400 |
commit | f2ab3898f3a25ef431db4ea90a8d128b974dbffe (patch) | |
tree | 16557bc4b20220583225c7bd29411a332ee77227 /src/tools/msvc/VSObjectFactory.pm | |
parent | 8485a25a8c9a419ff3e0d30e43e4abd5e680cc65 (diff) | |
download | postgresql-f2ab3898f3a25ef431db4ea90a8d128b974dbffe.tar.gz postgresql-f2ab3898f3a25ef431db4ea90a8d128b974dbffe.zip |
Support building with Visual Studio 2017
Haribabu Kommi, reviewed by Takeshi Ideriha and Christian Ullrich
Backpatch to 9.6
Diffstat (limited to 'src/tools/msvc/VSObjectFactory.pm')
-rw-r--r-- | src/tools/msvc/VSObjectFactory.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index 4190ada6184..2f3480a1f60 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -53,8 +53,14 @@ sub CreateSolution { return new VS2015Solution(@_); } + # visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it. + elsif (($visualStudioVersion ge '14.10') or ($visualStudioVersion eq '15.00')) + { + return new VS2017Solution(@_); + } else { + croak $visualStudioVersion; croak "The requested Visual Studio version is not supported."; } } @@ -92,8 +98,14 @@ sub CreateProject { return new VC2015Project(@_); } + # visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it. + elsif (($visualStudioVersion ge '14.10') or ($visualStudioVersion eq '15.00')) + { + return new VC2017Project(@_); + } else { + croak $visualStudioVersion; croak "The requested Visual Studio version is not supported."; } } @@ -120,6 +132,7 @@ sub DetermineVisualStudioVersion sub _GetVisualStudioVersion { my ($major, $minor) = @_; + # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison. if ($major > 14) { carp |