llvm.org GIT mirror llvm / 67ee127
VS Integration: install toolsets for x64 too (PR18738) This does exactly the same thing as for Win32, except it passes -m64 to the compiler and the files go in a different directory. Differential Revision: http://llvm-reviews.chandlerc.com/D2749 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201269 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 6 years ago
4 changed file(s) with 105 addition(s) and 74 deletion(s). Raw diff Collapse all Expand all
0 if (WIN32)
1 set(prop_file_in "Microsoft.Cpp.Win32.llvm.props.in")
2 set(prop_file_v100 "Microsoft.Cpp.Win32.LLVM-vs2010.props")
3 set(prop_file_v110 "Microsoft.Cpp.Win32.LLVM-vs2012.props")
4 set(prop_file_v110_xp "Microsoft.Cpp.Win32.LLVM-vs2012_xp.props")
5 set(prop_file_v120 "toolset-vs2013.props")
6 set(prop_file_v120_xp "toolset-vs2013_xp.props")
7
81 # CPack will install a registry key in this format that we wish to reference.
92 set(REG_KEY "${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}")
103
11 set(VS_VERSION "v100")
12 set(MSC_VERSION "1600")
13 configure_file(${prop_file_in} ${prop_file_v100})
14 set(VS_VERSION "v110")
15 set(MSC_VERSION "1700")
16 configure_file(${prop_file_in} ${prop_file_v110})
17 set(VS_VERSION "v110_xp")
18 configure_file(${prop_file_in} ${prop_file_v110_xp})
19 set(VS_VERSION "v120")
20 set(MSC_VERSION "1800")
21 configure_file(${prop_file_in} ${prop_file_v120})
22 set(VS_VERSION "v120_xp")
23 configure_file(${prop_file_in} ${prop_file_v120_xp})
4 foreach (platform "Win32" "x64")
5 set(prop_file_in "Microsoft.Cpp.Win32.llvm.props.in")
6 set(prop_file_v100 "Microsoft.Cpp.${platform}.LLVM-vs2010.props")
7 set(prop_file_v110 "Microsoft.Cpp.${platform}.LLVM-vs2012.props")
8 set(prop_file_v110_xp "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.props")
9 set(prop_file_v120 "toolset-vs2013.props")
10 set(prop_file_v120_xp "toolset-vs2013_xp.props")
11
12 if (platform STREQUAL "Win32")
13 set(mflag "m32")
14 else()
15 set(mflag "m64")
16 endif()
17 set(VS_VERSION "v100")
18 set(MSC_VERSION "1600")
19 configure_file(${prop_file_in} ${platform}/${prop_file_v100})
20 set(VS_VERSION "v110")
21 set(MSC_VERSION "1700")
22 configure_file(${prop_file_in} ${platform}/${prop_file_v110})
23 set(VS_VERSION "v110_xp")
24 configure_file(${prop_file_in} ${platform}/${prop_file_v110_xp})
25 set(VS_VERSION "v120")
26 set(MSC_VERSION "1800")
27 configure_file(${prop_file_in} ${platform}/${prop_file_v120})
28 set(VS_VERSION "v120_xp")
29 configure_file(${prop_file_in} ${platform}/${prop_file_v120_xp})
30 set(VS_VERSION)
31 set(MSC_VERSION)
32 set(mflag)
33
34 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v100}" DESTINATION tools/msbuild/${platform})
35 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v110}" DESTINATION tools/msbuild/${platform})
36 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v110_xp}" DESTINATION tools/msbuild/${platform})
37 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120}" DESTINATION tools/msbuild/${platform})
38 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120_xp}" DESTINATION tools/msbuild/${platform})
39
40 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2010.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2010.targets")
41 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012.targets")
42 install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.targets")
43 install(FILES "toolset-vs2013.targets" DESTINATION "tools/msbuild/${platform}")
44 install(FILES "toolset-vs2013_xp.targets" DESTINATION "tools/msbuild/${platform}")
45 endforeach()
2446
2547 set(REG_KEY)
26 set(VS_VERSION)
27 set(MSC_VERSION)
28 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v100}" DESTINATION tools/msbuild)
29 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110}" DESTINATION tools/msbuild)
30 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110_xp}" DESTINATION tools/msbuild)
31 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120}" DESTINATION tools/msbuild)
32 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v120_xp}" DESTINATION tools/msbuild)
3348
3449 install(DIRECTORY .
3550 DESTINATION tools/msbuild
3651 FILES_MATCHING
37 PATTERN "*.targets"
3852 PATTERN "*.bat"
3953 PATTERN ".svn" EXCLUDE
4054 )
1111
1212
1313
14 -fmsc-version=@MSC_VERSION@ %(AdditionalOptions)
14 -@mflag@ -fmsc-version=@MSC_VERSION@ %(AdditionalOptions)
1515
1616
1717
55 REM Change to the directory of this batch file.
66 cd /d %~dp0
77
8 set PLATFORM=None
9 :START
10 IF %PLATFORM% == x64 GOTO END
11 IF %PLATFORM% == Win32 SET PLATFORM=x64
12 IF %PLATFORM% == None SET PLATFORM=Win32
13
814 REM Search for the MSBuild toolsets directory.
9 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
15 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
1016 IF EXIST %D% GOTO FOUND_V100
11 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
17 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
1218 IF EXIST %D% GOTO FOUND_V100
1319
1420 :TRY_V110
15 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
21 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"
1622 IF EXIST %D% GOTO FOUND_V110
17 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
23 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"
1824 IF EXIST %D% GOTO FOUND_V110
1925
2026 :TRY_V120
21 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
27 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"
2228 IF EXIST %D% GOTO FOUND_V120
23 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
29 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"
2430 IF EXIST %D% GOTO FOUND_V120
2531
32 :END
2633 IF %SUCCESS% == 1 goto DONE
2734 echo Failed to find MSBuild toolsets directory.
2835 goto FAILED
3138 :FOUND_V100
3239 IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010
3340 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
34 copy Microsoft.Cpp.Win32.LLVM-vs2010.props %D%\LLVM-vs2010
41 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props %D%\LLVM-vs2010
3542 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
36 copy Microsoft.Cpp.Win32.LLVM-vs2010.targets %D%\LLVM-vs2010
43 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets %D%\LLVM-vs2010
3744 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
3845 set SUCCESS=1
3946 GOTO TRY_V110
4148 :FOUND_V110
4249 IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012
4350 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
44 copy Microsoft.Cpp.Win32.LLVM-vs2012.props %D%\LLVM-vs2012
51 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props %D%\LLVM-vs2012
4552 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
46 copy Microsoft.Cpp.Win32.LLVM-vs2012.targets %D%\LLVM-vs2012
53 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets %D%\LLVM-vs2012
4754 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
4855 IF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp
4956 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
50 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp
57 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp
5158 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
52 copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp
59 copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp
5360 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
5461 set SUCCESS=1
5562 GOTO TRY_V120
5764 :FOUND_V120
5865 IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013
5966 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
60 copy toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
67 copy %PLATFORM%\toolset-vs2013.props %D%\LLVM-vs2013\toolset.props
6168 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
62 copy toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets
69 copy %PLATFORM%\toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets
6370 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
6471 IF NOT EXIST %D%\LLVM-vs2013_xp mkdir %D%\LLVM-vs2013_xp
6572 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
66 copy toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props
73 copy %PLATFORM%\toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props
6774 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
68 copy toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets
75 copy %PLATFORM%\toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets
6976 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
77 GOTO START
78
7079
7180 :DONE
7281 echo Done!
44 REM CD to the directory of this batch file.
55 cd /d %~dp0
66
7 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
8 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.Win32.LLVM-vs2010.props
9 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.Win32.LLVM-vs2010.targets
7 set PLATFORM=None
8 :START
9 IF %PLATFORM% == x64 GOTO END
10 IF %PLATFORM% == Win32 SET PLATFORM=x64
11 IF %PLATFORM% == None SET PLATFORM=Win32
12
13
14 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
15 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props
16 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets
17 IF EXIST %D%\LLVM-vs2010 rmdir %D%\LLVM-vs2010
18 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"
19 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props
20 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets
1021 IF EXIST %D%\LLVM-vs2010 rmdir %D%\LLVM-vs2010
1122
12 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"
13 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.Win32.LLVM-vs2010.props
14 IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.Win32.LLVM-vs2010.targets
15 IF EXIST %D%\LLVM-vs2010 rmdir %D%\LLVM-vs2010
16
17 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
18 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.props
19 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.targets
23 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"
24 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props
25 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets
2026 IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012
21 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.props
22 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
27 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props
28 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets
29 IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
30 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"
31 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props
32 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets
33 IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012
34 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props
35 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets
2336 IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
2437
25 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
26 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.props
27 IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.targets
28 IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012
29 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.props
30 IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
31 IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
32
33 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
38 SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"
39 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
40 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
41 IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
42 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
43 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
44 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
45 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"
3446 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
3547 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
3648 IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
3850 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
3951 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
4052
41 SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets"
42 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props
43 IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets
44 IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013
45 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props
46 IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets
47 IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp
4853
54 GOTO START
55
56 :END
4957 echo Done!