Skip to content

Commit

Permalink
Avoid a harmless error when Visual Studio is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
pal1000 committed Apr 25, 2019
1 parent 95f2fd6 commit a2c60c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions buildenvconf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ System | [Dell Vostro 2521-9566 Q1 2013](http://www.dell.com/support/home/en/us/
CPU | [Intel Core I3-2375M](https://ark.intel.com/products/74259/Intel-Core-i3-2375M-Processor-3M-Cache-1_50-GHz)
RAM | 4GB DDR3 1600 MHz
dGPU | None
OS | Windows 10 October 2018 Update Pro x64
OS | Windows 10 April 2019 Update Pro x64
### Visual Studio
| | |
|-|-|
Edition | 2019 Community
Version | 16.0.1
Windows 10 SDK Version | 10.0.17763.132
Windows 10 SDK install method | inbox via Visual Studio installer
Version | 16.0.2
Windows 10 SDK Version | 10.1.18362.1
Windows 10 SDK install method | standalone
### LLVM
| | |
|-|-|
LLVM Version | 8.0.0
CMake version | 3.14.1
CMake version | 3.14.3
CMake ARCH | x64
Ninja version | 1.9.0
LLVM build configure x64[1] | cd llvm-8.0.0.src & md buildsys-x64-MT & cd buildsys-x64-MT & cmake -G "Ninja" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../x64-MT ..
Expand All @@ -41,7 +41,7 @@ pip version | 19.0.3
setuptools version | 41.0.0
pywin32 / pypiwin32 version | 224
scons version | 3.0.5
Mako version | 1.0.8
Mako version | 1.0.9
MarkupSafe version | 1.1.1
wheel version | 0.33.1
### winflexbison
Expand Down
12 changes: 6 additions & 6 deletions buildscript/modules/toolchain.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
@IF /I %PROCESSOR_ARCHITECTURE%==x86 IF %abi%==x64 set vsabi=x86_x64
@set vswhere="%ProgramFiles%
@IF /I %PROCESSOR_ARCHITECTURE%==AMD64 set vswhere=%vswhere% (x86)
@set vswhere=%vswhere%\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -property
@set vswhere=%vswhere%\Microsoft Visual Studio\Installer\vswhere.exe"

:findcompilers
@set vsenv=%vswhere%
@set totaltoolchains=0
@set totalmsvc=0
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% catalog_productDisplayVersion`) do @set /a totalmsvc+=1&set /a totaltoolchains+=1
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% -prerelease -property catalog_productDisplayVersion`) do @set /a totalmsvc+=1&set /a totaltoolchains+=1
@IF NOT %msysstate%==0 set /a totaltoolchains+=1
@cls
@setlocal ENABLEDELAYEDEXPANSION
@set msvccount=0
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% catalog_productDisplayVersion`) do @set /a msvccount+=1&echo !msvccount!. Visual Studio %%a
@IF EXIST %vswhere% for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% -prerelease -property catalog_productDisplayVersion`) do @set /a msvccount+=1&echo !msvccount!. Visual Studio %%a
@endlocal
@IF NOT %msysstate%==0 echo %totaltoolchains%. MSYS2 Mingw-w64 GCC
@echo.
Expand Down Expand Up @@ -50,9 +50,9 @@
@rem Determine toolset version and build enviroment launcher PATH for selected Visual Studio installation
@setlocal ENABLEDELAYEDEXPANSION
@set msvccount=0
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% installationPath`) do @set /a msvccount+=1&IF !msvccount!==%selecttoolchain% set vsenv="%%a\VC\Auxiliary\Build\vcvarsall.bat"
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% -prerelease -property installationPath`) do @set /a msvccount+=1&IF !msvccount!==%selecttoolchain% set vsenv="%%a\VC\Auxiliary\Build\vcvarsall.bat"
@set msvccount=0
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% catalog_productDisplayVersion`) do @set /a msvccount+=1&IF !msvccount!==%selecttoolchain% set toolset=%%a
@for /F "USEBACKQ tokens=*" %%a IN (`%vswhere% -prerelease -property catalog_productDisplayVersion`) do @set /a msvccount+=1&IF !msvccount!==%selecttoolchain% set toolset=%%a
@set toolset=%toolset:~0,2%
@endlocal&set vsenv=%vsenv%&set toolset=%toolset%

Expand All @@ -62,7 +62,7 @@
@IF NOT EXIST %vsenv% echo.
@IF NOT EXIST %vsenv% IF /I NOT "%addvcpp%"=="y" pause
@IF NOT EXIST %vsenv% IF /I NOT "%addvcpp%"=="y" GOTO findcompilers
@IF NOT EXIST %vsenv% %vswhere:~0,-34%vs_installer.exe"
@IF NOT EXIST %vsenv% %vswhere:~0,-12%vs_installer.exe"
@IF NOT EXIST %vsenv% GOTO findcompilers

:selectedcompiler

0 comments on commit a2c60c9

Please sign in to comment.