llvm.org GIT mirror llvm / ec6e535
Add a VS "14" msbuild toolset This allows people to try clang inside MSBuild with the VS "14" CTP releases. Fixes PR20341. Patch by Marcel Raad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213819 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 6 years ago
5 changed file(s) with 75 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
99 set(prop_file_v110_xp "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.props")
1010 set(prop_file_v120 "toolset-vs2013.props")
1111 set(prop_file_v120_xp "toolset-vs2013_xp.props")
12 set(prop_file_v140 "toolset-vs2014.props")
13 set(prop_file_v140_xp "toolset-vs2014_xp.props")
1214
1315 if (platform STREQUAL "Win32")
1416 set(mflag "m32")
2830 configure_file(${prop_file_in} ${platform}/${prop_file_v120})
2931 set(VS_VERSION "v120_xp")
3032 configure_file(${prop_file_in} ${platform}/${prop_file_v120_xp})
33 set(VS_VERSION "v140")
34 set(MSC_VERSION "1900")
35 configure_file(${prop_file_in} ${platform}/${prop_file_v140})
36 set(VS_VERSION "v140_xp")
37 configure_file(${prop_file_in} ${platform}/${prop_file_v140_xp})
3138 set(VS_VERSION)
3239 set(MSC_VERSION)
3340 set(mflag)
3744 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v110_xp}" DESTINATION tools/msbuild/${platform})
3845 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120}" DESTINATION tools/msbuild/${platform})
3946 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120_xp}" DESTINATION tools/msbuild/${platform})
47 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v140}" DESTINATION tools/msbuild/${platform})
48 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v140_xp}" DESTINATION tools/msbuild/${platform})
4049
4150 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2010.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2010.targets")
4251 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012.targets")
4352 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.targets")
4453 install(FILES "toolset-vs2013.targets" DESTINATION "tools/msbuild/${platform}")
4554 install(FILES "toolset-vs2013_xp.targets" DESTINATION "tools/msbuild/${platform}")
55 install(FILES "toolset-vs2014.targets" DESTINATION "tools/msbuild/${platform}")
56 install(FILES "toolset-vs2014_xp.targets" DESTINATION "tools/msbuild/${platform}")
4657 endforeach()
4758
4859 set(LIB_PATH_VERSION)
2828 IF EXIST %D% GOTO FOUND_V120
2929 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"
3030 IF EXIST %D% GOTO FOUND_V120
31
32 :TRY_V140
33 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
34 IF EXIST %D% GOTO FOUND_V140
35 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
36 IF EXIST %D% GOTO FOUND_V140
3137
3238 :LOOPEND
3339 IF %SUCCESS% == 1 goto DONE
7581 copy %PLATFORM%\toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets
7682 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
7783 set SUCCESS=1
84 GOTO TRY_V140
85
86 :FOUND_V140
87 IF NOT EXIST %D%\LLVM-vs2014 mkdir %D%\LLVM-vs2014
88 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
89 copy %PLATFORM%\toolset-vs2014.props %D%\LLVM-vs2014\toolset.props
90 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
91 copy %PLATFORM%\toolset-vs2014.targets %D%\LLVM-vs2014\toolset.targets
92 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
93 IF NOT EXIST %D%\LLVM-vs2014_xp mkdir %D%\LLVM-vs2014_xp
94 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
95 copy %PLATFORM%\toolset-vs2014_xp.props %D%\LLVM-vs2014_xp\toolset.props
96 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
97 copy %PLATFORM%\toolset-vs2014_xp.targets %D%\LLVM-vs2014_xp\toolset.targets
98 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
99 set SUCCESS=1
78100 GOTO START
79101
80102
0
1
2
3 v4.0
4 NoSupportCodeAnalysisXP;$(BeforeClCompileTargets)
5
6
7
8
9
10
11
12
13
14 CheckWindowsSDK71A;$(PrepareForBuildDependsOn)
15
16
17
18
19
20
5050 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
5151 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
5252
53 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
54 IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.props
55 IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.targets
56 IF EXIST %D%\LLVM-vs2014 rmdir %D%\LLVM-vs2014
57 IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.props
58 IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.targets
59 IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp
60 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"
61 IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.props
62 IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.targets
63 IF EXIST %D%\LLVM-vs2014 rmdir %D%\LLVM-vs2014
64 IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.props
65 IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.targets
66 IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp
67
5368
5469 GOTO START
5570