llvm.org GIT mirror llvm / ce10279
MSBuild integration: fix the loop in install.bat It would previously not continue the platforms loop unless it could find the latest toolset directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218712 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 6 years ago
2 changed file(s) with 18 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
55 REM Change to the directory of this batch file.
66 cd /d %~dp0
77
8 REM Loop over the two platforms in awkward batch file fashion.
89 set PLATFORM=None
9 :START
10 IF %PLATFORM% == x64 GOTO LOOPEND
10 :PLATFORMLOOPHEAD
11 IF %PLATFORM% == x64 GOTO PLATFORMLOOPEND
1112 IF %PLATFORM% == Win32 SET PLATFORM=x64
1213 IF %PLATFORM% == None SET PLATFORM=Win32
1314
1415 REM Search for the MSBuild toolsets directory.
16
1517 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
1618 IF EXIST %D% GOTO FOUND_V100
1719 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
3537 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
3638 IF EXIST %D% GOTO FOUND_V140
3739
38 :LOOPEND
40 :TRY_V150
41
42 GOTO PLATFORMLOOPHEAD
43
44 :PLATFORMLOOPEND
3945 IF %SUCCESS% == 1 goto DONE
4046 echo Failed to find MSBuild toolsets directory.
4147 goto FAILED
4248
4349
4450 :FOUND_V100
51 REM Routine for installing v100 toolchain.
4552 IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010
4653 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
4754 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props %D%\LLVM-vs2010
5259 GOTO TRY_V110
5360
5461 :FOUND_V110
62 REM Routine for installing v110 toolchain.
5563 IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012
5664 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
5765 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props %D%\LLVM-vs2012
6876 GOTO TRY_V120
6977
7078 :FOUND_V120
79 REM Routine for installing v120 toolchain.
7180 IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013
7281 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
7382 copy %PLATFORM%\toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
8493 GOTO TRY_V140
8594
8695 :FOUND_V140
96 REM Routine for installing v140 toolchain.
8797 IF NOT EXIST %D%\LLVM-vs2014 mkdir %D%\LLVM-vs2014
8898 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
8999 copy %PLATFORM%\toolset-vs2014.props %D%\LLVM-vs2014\toolset.props
97107 copy %PLATFORM%\toolset-vs2014_xp.targets %D%\LLVM-vs2014_xp\toolset.targets
98108 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
99109 set SUCCESS=1
100 GOTO START
110 GOTO TRY_V150
101111
102112
103113 :DONE
55 cd /d %~dp0
66
77 set PLATFORM=None
8 :START
9 IF %PLATFORM% == x64 GOTO END
8 :LOOPHEAD
9 IF %PLATFORM% == x64 GOTO LOOPEND
1010 IF %PLATFORM% == Win32 SET PLATFORM=x64
1111 IF %PLATFORM% == None SET PLATFORM=Win32
1212
6666 IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp
6767
6868
69 GOTO START
69 GOTO LOOPHEAD
7070
71 :END
71 :LOOPEND
7272 echo Done!