Re: MSVC Build support with visual studio 2019

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-07-02T05:10:11Z
Lists: pgsql-hackers
On Mon, Jul 01, 2019 at 07:56:29PM +1000, Haribabu Kommi wrote:
> We stopped the support of building with all the visual studio versions less
> than 2013.  I updated the SDK versions accordingly.

I have spent some time looking around, and wikipedia-sensei has proved
to be helpful to grasp the release references:
https://en.wikipedia.org/wiki/Microsoft_Windows_SDK

So the suggestions from the patch are fine.  This one was actually
forgotten:
src/tools/msvc/README:from www.microsoft.com (v6.0 or greater).

> The similar change is required for the CreateProject also.

I have changed both messages so as the version of VS attempted to be
used is reported in the error message directly.

> + # The major visual studio that is supported has nmake
> + # version >= 14.30, so stick with it as the latest version
> 
> The major visual studio version that is supported has nmake version
> <=14.30

Damn.  Thanks for pointing out that.

> Except for the above two changes, overall the patch is in good shape.

OK, committed to HEAD for now after perltidy'ing the patch.  Let's see
what the buildfarm has to say about it first.  Once we are sure that
the thing is stable, I'll try to backpatch it.  This works on my own
dev machines with VS 2015 and 2019, but who knows what hides in the
shadows... 
--
Michael

Commits

  1. Add support for Visual Studio 2019 in build scripts

  2. Support building with Visual Studio 2017

  3. Require C99 (and thus MSCV 2013 upwards).