Re: MSVC 2017+ Toolset Support
Joseph Brill <[email protected]> Tue, 11 Aug 2020 14:56:04 -0400
| Newsgroups | gmane.comp.programming.tools.scons.devel |
|---|---|
| Message-ID | <CAJLrGP2daJKBaDTE=oJyB00FtizcWyYdcjkc0SC-mdJ+Tf5jgg@mail.gmail.com> |
--===============0420304778928805355== Content-Type: multipart/alternative; boundary="00000000000008886405ac9e9e9a" --00000000000008886405ac9e9e9a Content-Type: text/plain; charset="UTF-8" The was a previous iteration that allowed MSVC_VERSION to contain a toolset and added a MSVC_PRODUCT variable that could contain a product specification and optional component type. This was described in: https://github.com/SCons/scons/issues/3664#issuecomment-643782430 Unfortunately, this predates the code being added to version control as it was a proof-of-concept that evolved fairly rapidly. On Tue, Aug 11, 2020 at 2:06 PM Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> wrote: > To be clear, I'm not in favor of your proposed MSVC_VERSION regex > interpretation, so let's table any discussion of that as it's not relevant > to figuring out how to properly select a version of MSVC and toolset and > product type. > > Am I grossly mistaken, or would separate variables as I've proposed above > also allow specifying as explicitly as the single string which needs to be > regex'd? > > > On Tue, Aug 11, 2020 at 9:24 AM Joseph Brill <[email protected]> > wrote: > >> On Tue, Aug 11, 2020 at 11:51 AM Mats Wichmann <[email protected]> wrote: >> >>> To throw another spanner into the works, there are Visual Studio product >>> codes too, which are 16.X for 2019, 15.x for 2017 and 14.0 for 2015... >>> >> >> Nothing is straightforward with the microsoft version numbers. >> >> A mapping was necessary from the vswhere query results containing the >> MSVS version to the MSVC version number. The explicitly supported >> component ids are listed by product as there are a quite a few component >> ids in which we are not interested. And yes, one of the components that we >> are not-interested in caused a previous version to fail. >> >> And it looks like I have a typographical error to fix as well... >> >> # Vswhere query elements (reverse dictionaries computed during intialization)# MSVS_MAJOR: MSVS installationVersion.split('.')[0] <-> to _VCVER# Products: expected product components returned in vswhere query >> _MSVC_PRODUCTVERSION_COMPONENTIDS = { >> '14.2': { >> 'MSVS_MAJOR' : '16', >> 'Products' : ['Enterprise', 'Professional', 'Community', 'BuildTools'] >> }, >> '14.1': { >> 'MSVS_MAJOR' : '15', >> 'Products' : ['Enterprise', 'Professional', 'Community', 'BuildTools', _MSVC_COMPONENT_EXPRESS] >> }, >> >> } >> >> >> > --00000000000008886405ac9e9e9a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">The was a previous iteration that allowed MSVC_VERSION to = contain a toolset and added a MSVC_PRODUCT variable that could contain a pr= oduct specification and optional component type.<div><br></div><div>This wa= s described in:=C2=A0<a href=3D"https://github.com/SCons/scons/issues/3664#= issuecomment-643782430">https://github.com/SCons/scons/issues/3664#issuecom= ment-643782430</a></div><div><br></div><div>Unfortunately, this predates th= e=C2=A0code being added to version control as it was a proof-of-concept tha= t evolved fairly rapidly.</div></div><br><div class=3D"gmail_quote"><div di= r=3D"ltr" class=3D"gmail_attr">On Tue, Aug 11, 2020 at 2:06 PM Bill Deegan = <<a href=3D"mailto:bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org">bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org<= /a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0= px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><= div dir=3D"ltr"><div>To be clear, I'm not in favor of your proposed MSV= C_VERSION regex interpretation, so let's table any discussion of that a= s it's not relevant to figuring out how to properly select a version of= MSVC and toolset and product type.</div><div><br></div><div>Am I grossly m= istaken, or would separate variables as I've proposed above also allow = specifying as explicitly as the single string which needs to be regex'd= ?</div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr"= class=3D"gmail_attr">On Tue, Aug 11, 2020 at 9:24 AM Joseph Brill <<a h= ref=3D"mailto:[email protected]" target=3D"_blank">joseph.c.brill@gm= ail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"><div dir=3D"ltr"><div dir=3D"ltr">On Tue, Aug 11, 2020 at 11:51 AM M= ats Wichmann <<a href=3D"mailto:[email protected]" target=3D"_blank">mats= @wichmann.us</a>> wrote:<br></div><div class=3D"gmail_quote"><blockquote= class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so= lid rgb(204,204,204);padding-left:1ex">To throw another spanner into the wo= rks, there are Visual Studio product<br> codes too, which are 16.X for 2019, 15.x for 2017 and 14.0 for 2015...<br><= /blockquote><div><br></div><div>Nothing is straightforward with the microso= ft version numbers.</div><div><br></div><div>A mapping was necessary from t= he vswhere=C2=A0query results containing the MSVS version to the MSVC versi= on number.=C2=A0 The explicitly supported component ids are listed by produ= ct as there are a quite a few component ids in which we are not interested.= =C2=A0 And yes, one of the=C2=A0components that we are not-interested in ca= used a previous=C2=A0version to fail.<br></div><div><br></div><div>And it l= ooks like I have a typographical error to fix as well...</div><div style=3D= "font-family:Consolas;font-size:10pt;color:rgb(0,0,0)"> <pre><span style=3D"color:rgb(0,128,0);font-style:italic"># Vswhere query e= lements (reverse dictionaries computed during intialization)</span> <span style=3D"color:rgb(0,128,0);font-style:italic"># MSVS_MAJOR: MSVS= installationVersion.split('.')[0] <-> to _VCVER</span> <span style=3D"color:rgb(0,128,0);font-style:italic"># Products: expect= ed product components returned in vswhere query</span> _MSVC_PRODUCTVERSION_COMPONENTIDS <span style=3D"color:rgb(128,0,0)">=3D</s= pan> <span style=3D"color:rgb(128,0,0)">{</span> <span style=3D"color:rgb(0,96,96)">'14.2'</span><span style=3D"= color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(128,0,0)">{</span> <span style=3D"color:rgb(0,96,96)">'MSVS_MAJOR'</span> <spa= n style=3D"color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(0,96,96)">= '16'</span><span style=3D"color:rgb(128,0,0)">,</span>=20 <span style=3D"color:rgb(0,96,96)">'Products'</span> <spa= n style=3D"color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(128,0,0)">= [</span><span style=3D"color:rgb(0,96,96)">'Enterprise'</span><span= style=3D"color:rgb(128,0,0)">,</span> <span style=3D"color:rgb(0,96,96)">&= #39;Professional'</span><span style=3D"color:rgb(128,0,0)">,</span> <sp= an style=3D"color:rgb(0,96,96)">'Community'</span><span style=3D"co= lor:rgb(128,0,0)">,</span> <span style=3D"color:rgb(0,96,96)">'BuildToo= ls'</span><span style=3D"color:rgb(128,0,0)">]</span> <span style=3D"color:rgb(128,0,0)">},</span> <span style=3D"color:rgb(0,96,96)">'14.1'</span><span style=3D"= color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(128,0,0)">{</span>=20 <span style=3D"color:rgb(0,96,96)">'MSVS_MAJOR'</span> <spa= n style=3D"color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(0,96,96)">= '15'</span><span style=3D"color:rgb(128,0,0)">,</span> <span style=3D"color:rgb(0,96,96)">'Products'</span> <spa= n style=3D"color:rgb(128,0,0)">:</span> <span style=3D"color:rgb(128,0,0)">= [</span><span style=3D"color:rgb(0,96,96)">'Enterprise'</span><span= style=3D"color:rgb(128,0,0)">,</span> <span style=3D"color:rgb(0,96,96)">&= #39;Professional'</span><span style=3D"color:rgb(128,0,0)">,</span> <sp= an style=3D"color:rgb(0,96,96)">'Community'</span><span style=3D"co= lor:rgb(128,0,0)">,</span> <span style=3D"color:rgb(0,96,96)">'BuildToo= ls'</span><span style=3D"color:rgb(128,0,0)">,</span> _MSVC_COMPONENT_E= XPRESS<span style=3D"color:rgb(128,0,0)">]</span> <span style=3D"color:rgb(128,0,0)">},</span>=C2=A0</pre></div><div>= <span style=3D"color:rgb(128,0,0);font-family:Consolas;font-size:10pt">}</s= pan></div><div><br></div><div>=C2=A0</div></div></div> </blockquote></div> </blockquote></div> --00000000000008886405ac9e9e9a-- --===============0420304778928805355== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Scons-dev mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/scons-dev --===============0420304778928805355==--