Created
February 23, 2021 11:28
-
-
Save Algo-ryth-mix/11dd9235f79e677ca260427e3df7003c to your computer and use it in GitHub Desktop.
vs-exec.bat
This file contains 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 | |
rem Allows to call commands as if it was a vs-prompt by preceeding it with vs-exec | |
rem For instance `vs-exec cl main.cpp` to compile `main.cpp` | |
IF NOT DEFINED VS_BASE_PATH ( | |
FOR /F "tokens=*" %%g IN ('vswhere -latest -property "installationPath"') do (SET VS_BASE_PATH=%%g) | |
) | |
IF NOT DEFINED IS_DEVENV ( | |
@call "%VS_BASE_PATH%\Common7\Tools\vsdevcmd.bat" -arch=x64 /no_logo && SET IS_DEVENV=1 | |
) | |
%* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment