Re: Compile from source using latest Microsoft Windows SDK - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Compile from source using latest Microsoft Windows SDK
Date
Msg-id 20190722082318.GF1757@paquier.xyz
Whole thread Raw
In response to Re: Compile from source using latest Microsoft Windows SDK  (Peifeng Qiu <pqiu@pivotal.io>)
Responses Re: Compile from source using latest Microsoft Windows SDK  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
On Mon, Jul 22, 2019 at 04:01:46PM +0800, Peifeng Qiu wrote:
>> but it's really only a major issue for VS2019
>
> VS2019 will use the latest v10 SDK by default. So no need to install 8.1
> for VS2019.

Yes, FWIW, I have tested with VS2019 when committing 2b1394f, and in
this case only the v10 SDK got installed, with no actual issues
related to the dependency of the SDK reported.  In this case I have
installed VS using the community installer provided by Microsoft.

>> I guess we might need a test for what SDK is available?
>
> We can just use the WindowsSDKVersion environment variable to
> determine the SDK for current cmd session. It's set when you start
> the Visual Studio Prompt or call one bat script.  Developers can
> choose the right version best suit their need. Detecting all
> installed SDK version can be done with some registry magic but I
> think that's not necessary in this case.

This looks more sensible to do if the environment variable is
available.  Looking around this variable is available when using the
command prompt for native tools.  So using it sounds like a good idea
to me if it exists.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peifeng Qiu
Date:
Subject: Re: Compile from source using latest Microsoft Windows SDK
Next
From: Heikki Linnakangas
Date:
Subject: Re: Memory Accounting