From 69fce6fcaffbd37f149c809a119394a8fb545e3f Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Thu, 22 Jun 2017 19:28:19 -0400 Subject: [PATCH] better vcvarsall.bat finder --- build_scripts/setup_cl_generic.bat | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build_scripts/setup_cl_generic.bat b/build_scripts/setup_cl_generic.bat index 00263f2a..c67d87cc 100644 --- a/build_scripts/setup_cl_generic.bat +++ b/build_scripts/setup_cl_generic.bat @@ -1,6 +1,18 @@ @echo off -IF NOT DEFINED LIB (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %1) -IF NOT DEFINED LIB (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %1) +SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0 +IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1)) + +SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0 +IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1)) + +SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0 +IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1)) + +SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 13.0 +IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\vcvarsall.bat" %1)) + +SET VC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community +IF NOT DEFINED LIB (IF EXIST "%VC_PATH%" (call "%VC_PATH%\VC\Auxiliary\Build\vcvarsall.bat" %1))