]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/vswhere_usability_wrapper.cmd
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / tools / build / src / engine / vswhere_usability_wrapper.cmd
1 :: Copyright 2020 - Rene Ferdinand Rivera Morell
2 :: Copyright 2017 - Refael Ackermann
3 :: Copyright 2019 - Thomas Kent
4 :: Distributed under MIT style license
5 :: See accompanying file LICENSE at https://github.com/node4good/windows-autoconf
6 :: Forked from version: 1.15.4
7
8 @if not defined DEBUG_HELPER @ECHO OFF
9 setlocal
10 set "InstallerPath=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer"
11 if not exist "%InstallerPath%" set "InstallerPath=%ProgramFiles%\Microsoft Visual Studio\Installer"
12 if not exist "%InstallerPath%" goto :no-vswhere
13 :: Manipulate %Path% for easier " handeling
14 set Path=%Path%;%InstallerPath%
15 where vswhere 2> nul > nul
16 if errorlevel 1 goto :no-vswhere
17 set VSWHERE_REQ=-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64
18 set VSWHERE_PRP=-property installationPath
19
20 REM Visual Studio Unknown Version, Beyond 2019
21 set VSWHERE_LMT=-version "[17.0,18.0)"
22 set VSWHERE_PRERELEASE=-prerelease
23 SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT% %VSWHERE_PRERELEASE%
24 for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
25 endlocal
26 echo Found with vswhere %%i
27 @rem comment out setting VCINSTALLDIR for Boost.build
28 @rem set "VCINSTALLDIR=%%i\VC\"
29 set "VSUNKCOMNTOOLS=%%i\Common7\Tools\"
30 exit /B 0
31 )
32
33 REM Visual Studio 2019 (16.X, toolset 14.2)
34 set VSWHERE_LMT=-version "[16.0,17.0)"
35 SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
36 for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
37 endlocal
38 echo Found with vswhere %%i
39 @rem comment out setting VCINSTALLDIR for Boost.build
40 @rem set "VCINSTALLDIR=%%i\VC\"
41 set "VS160COMNTOOLS=%%i\Common7\Tools\"
42 exit /B 0
43 )
44
45 REM Visual Studio 2017 (15.X, toolset 14.1)
46 set VSWHERE_LMT=-version "[15.0,16.0)"
47 SET VSWHERE_ARGS=-latest -products * %VSWHERE_REQ% %VSWHERE_PRP% %VSWHERE_LMT%
48 for /f "usebackq tokens=*" %%i in (`vswhere %VSWHERE_ARGS%`) do (
49 endlocal
50 echo Found with vswhere %%i
51 @rem comment out setting VCINSTALLDIR for Boost.build
52 @rem set "VCINSTALLDIR=%%i\VC\"
53 set "VS150COMNTOOLS=%%i\Common7\Tools\"
54 exit /B 0
55 )
56
57 :no-vswhere
58 endlocal
59 echo could not find "vswhere"
60 exit /B 1