File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed
Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1- :: This is stolen from torchaudio
1+ :: Taken from torchaudio
22@ echo off
33
44set PROJ_FOLDER = %cd%
Original file line number Diff line number Diff line change 1+ :: Taken from torchaudio
2+ @ echo on
3+
4+ set VC_VERSION_LOWER = 17
5+ set VC_VERSION_UPPER = 18
6+
7+ for /f " usebackq tokens=*" %%i in (`" %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER% ^ ,%VC_VERSION_UPPER% ^ ) -property installationPath`) do (
8+ if exist " %%i " if exist " %%i \VC\Auxiliary\Build\vcvarsall.bat" (
9+ set " VS15INSTALLDIR = %%i "
10+ set " VS15VCVARSALL = %%i \VC\Auxiliary\Build\vcvarsall.bat"
11+ goto vswhere
12+ )
13+ )
14+
15+ :vswhere
16+ if " %VSDEVCMD_ARGS% " == " " (
17+ call " %VS15VCVARSALL% " x64 || exit /b 1
18+ ) else (
19+ call " %VS15VCVARSALL% " x64 %VSDEVCMD_ARGS% || exit /b 1
20+ )
21+
22+ @ echo on
23+
24+ if " %CU_VERSION% " == " xpu" call " C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
25+
26+ set DISTUTILS_USE_SDK = 1
27+
28+ set args = %1
29+ shift
30+ :start
31+ if [%1 ] == [] goto done
32+ set args = %args% %1
33+ shift
34+ goto start
35+
36+ :done
37+ if " %args% " == " " (
38+ echo Usage: vc_env_helper.bat [command] [args]
39+ echo e.g. vc_env_helper.bat cl /c test.cpp
40+ )
41+
42+ %args% || exit /b 1
You can’t perform that action at this time.
0 commit comments