[llvm] r191010 - Include an LLVM-vs2012_xp toolset in the MSBuild integration

Reid Kleckner reid at kleckner.net
Thu Sep 19 09:50:41 PDT 2013


Author: rnk
Date: Thu Sep 19 11:50:40 2013
New Revision: 191010

URL: http://llvm.org/viewvc/llvm-project?rev=191010&view=rev
Log:
Include an LLVM-vs2012_xp toolset in the MSBuild integration

Patch by Paul Hampson!

Added:
    llvm/trunk/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
Modified:
    llvm/trunk/tools/msbuild/CMakeLists.txt
    llvm/trunk/tools/msbuild/install.bat
    llvm/trunk/tools/msbuild/uninstall.bat

Modified: llvm/trunk/tools/msbuild/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/msbuild/CMakeLists.txt?rev=191010&r1=191009&r2=191010&view=diff
==============================================================================
--- llvm/trunk/tools/msbuild/CMakeLists.txt (original)
+++ llvm/trunk/tools/msbuild/CMakeLists.txt Thu Sep 19 11:50:40 2013
@@ -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

Added: llvm/trunk/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets?rev=191010&view=auto
==============================================================================
--- llvm/trunk/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets (added)
+++ llvm/trunk/tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets Thu Sep 19 11:50:40 2013
@@ -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>

Modified: llvm/trunk/tools/msbuild/install.bat
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/msbuild/install.bat?rev=191010&r1=191009&r2=191010&view=diff
==============================================================================
--- llvm/trunk/tools/msbuild/install.bat (original)
+++ llvm/trunk/tools/msbuild/install.bat Thu Sep 19 11:50:40 2013
@@ -39,6 +39,12 @@ copy Microsoft.Cpp.Win32.LLVM-vs2012.pro
 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
 

Modified: llvm/trunk/tools/msbuild/uninstall.bat
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/msbuild/uninstall.bat?rev=191010&r1=191009&r2=191010&view=diff
==============================================================================
--- llvm/trunk/tools/msbuild/uninstall.bat (original)
+++ llvm/trunk/tools/msbuild/uninstall.bat Thu Sep 19 11:50:40 2013
@@ -19,10 +19,16 @@ SET D="%ProgramFiles%\MSBuild\Microsoft.
 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!





More information about the llvm-commits mailing list