From 4235b0459ba9b3151fccf02469529c60ae2b848e Mon Sep 17 00:00:00 2001 From: David Tarditi Date: Sun, 26 Nov 2023 20:31:15 -0800 Subject: [PATCH] Use full path for VSWhere --- test_scripts/automation/Windows/run-cmake.bat | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test_scripts/automation/Windows/run-cmake.bat b/test_scripts/automation/Windows/run-cmake.bat index 8850fa2..af8ac6d 100644 --- a/test_scripts/automation/Windows/run-cmake.bat +++ b/test_scripts/automation/Windows/run-cmake.bat @@ -16,16 +16,15 @@ cd %LLVM_OBJ_DIR% rem Set up the environment so CMake can find the Visual C++ compiler. setlocal -for /f "usebackq tokens=*" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( +for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( set InstallDir=%%i ) if exist "%InstallDir%\VC\Auxiliary\Build" ( - "%InstallDir%\VC\Auxiliary\BuildC\vcvars32.bat + call "%InstallDir%\VC\Auxiliary\Build\vcvars64.bat" ) -cmake -G Ninja %EXTRA_FLAGS% -DCMAKE_BUILD_TYPE=%BUILDCONFIGURATION% DLLVM_ENABLE_PROJECTS=clang -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm -if ERRORLEVEL 1 (goto cmdfailed) +cmake -G Ninja %EXTRA_FLAGS% -DCMAKE_BUILD_TYPE=%BUILDCONFIGURATION% -DLLVM_ENABLE_PROJECTS=clang -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON %BUILD_SOURCESDIRECTORY%\checkedc-llvm-project\llvm endlocal :succeeded