Created
January 11, 2022 03:01
-
-
Save Tetralux/e839ce03a0c666a034688cf672d127e9 to your computer and use it in GitHub Desktop.
A simpler wrapper for vcvarsall.bat which only does the work on the first run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Path to vcvarsall.bat from Visual Studio | |
:: When called, it makes cl.exe (C++ compiler) and link.exe (Linker) available in PATH. | |
set VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat" | |
if "%VSISSET%"=="" ( | |
%VCVARSPATH% %* | |
if "%ERRORLEVEL%"=="0" ( | |
set VSISSET=%* | |
) else ( | |
echo [vcvars returned %ERRORLEVEL%; resetting] | |
) | |
) else ( | |
echo [skipping vcvarsall; already set] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment