diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-09-19 16:50:40 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-09-19 16:50:40 +0000 |
commit | a22ff961db47ffff4f1e795d810aa102edb9b79b (patch) | |
tree | 670b68ea016b7b5cf96a20d4dbd1b3228e2a23e9 /tools | |
parent | 6591308b7e041bb8e5e211f84bcc4a97d3764cc5 (diff) | |
download | external_llvm-a22ff961db47ffff4f1e795d810aa102edb9b79b.zip external_llvm-a22ff961db47ffff4f1e795d810aa102edb9b79b.tar.gz external_llvm-a22ff961db47ffff4f1e795d810aa102edb9b79b.tar.bz2 |
Include an LLVM-vs2012_xp toolset in the MSBuild integration
Patch by Paul Hampson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/msbuild/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets | 21 | ||||
-rw-r--r-- | tools/msbuild/install.bat | 6 | ||||
-rw-r--r-- | tools/msbuild/uninstall.bat | 6 |
4 files changed, 37 insertions, 0 deletions
diff --git a/tools/msbuild/CMakeLists.txt b/tools/msbuild/CMakeLists.txt index 860ed22..8de3b88 100644 --- a/tools/msbuild/CMakeLists.txt +++ b/tools/msbuild/CMakeLists.txt @@ -2,6 +2,7 @@ if (WIN32) set(prop_file_in "Microsoft.Cpp.Win32.llvm.props.in") set(prop_file_v100 "Microsoft.Cpp.Win32.LLVM-vs2010.props") set(prop_file_v110 "Microsoft.Cpp.Win32.LLVM-vs2012.props") + set(prop_file_v110_xp "Microsoft.Cpp.Win32.LLVM-vs2012_xp.props") # CPack will install a registry key in this format that we wish to reference. set(REG_KEY "${CMAKE_PROJECT_NAME} ${CPACK_PACKAGE_VERSION}") @@ -10,11 +11,14 @@ if (WIN32) configure_file(${prop_file_in} ${prop_file_v100}) set(VS_VERSION "v110") configure_file(${prop_file_in} ${prop_file_v110}) + set(VS_VERSION "v110_xp") + configure_file(${prop_file_in} ${prop_file_v110_xp}) set(REG_KEY) set(VS_VERSION) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v100}" DESTINATION tools/msbuild) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110}" DESTINATION tools/msbuild) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${prop_file_v110_xp}" DESTINATION tools/msbuild) install(DIRECTORY . DESTINATION tools/msbuild diff --git a/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets b/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets new file mode 100644 index 0000000..e8250d8 --- /dev/null +++ b/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets @@ -0,0 +1,21 @@ +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <!-- Force TargetFrameworkVersion to v4.0 to support XP--> + <PropertyGroup> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <BeforeClCompileTargets>NoSupportCodeAnalysisXP;$(BeforeClCompileTargets)</BeforeClCompileTargets> + </PropertyGroup> + + <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" /> + + <Target Name="NoSupportCodeAnalysisXP" Condition="'$(ErrorNoSupportCodeAnalysisXP)' != 'false'"> + <VCMessage Condition="'$(DesignTimeBuild)' != 'true' and '@(ClCompile->AnyHaveMetadataValue('EnablePREfast', 'true'))'=='true'" Code="MSB8026" Type="Error"/> + </Target> + + <PropertyGroup> + <PrepareForBuildDependsOn>CheckWindowsSDK71A;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn> + </PropertyGroup> + + <Target Name="CheckWindowsSDK71A"> + <VCMessage Code="MSB8003" Type="Warning" Arguments="WindowsSdkDir_71A" Condition="'$(WindowsSdkDir_71A)'=='' and '$(UseEnv)' != 'true'" /> + </Target> +</Project> diff --git a/tools/msbuild/install.bat b/tools/msbuild/install.bat index 2d5af62..2b66a6c 100644 --- a/tools/msbuild/install.bat +++ b/tools/msbuild/install.bat @@ -39,6 +39,12 @@ copy Microsoft.Cpp.Win32.LLVM-vs2012.props %D%\LLVM-vs2012 IF NOT %ERRORLEVEL% == 0 GOTO FAILED
copy Microsoft.Cpp.Win32.LLVM-vs2012.targets %D%\LLVM-vs2012
IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+IF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
echo Done!
goto END
diff --git a/tools/msbuild/uninstall.bat b/tools/msbuild/uninstall.bat index c697239..f1f5619 100644 --- a/tools/msbuild/uninstall.bat +++ b/tools/msbuild/uninstall.bat @@ -19,10 +19,16 @@ SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformTo IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.props
IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.targets
IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012
+IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.props
+IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
+IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\Win32\PlatformToolsets"
IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.props
IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.Win32.LLVM-vs2012.targets
IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012
+IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.props
+IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
+IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp
echo Done!
|