cmake: Add msbuild integration to the install
[oota-llvm.git] / tools / msbuild / uninstall.bat
diff --git a/tools/msbuild/uninstall.bat b/tools/msbuild/uninstall.bat
new file mode 100644 (file)
index 0000000..8bc304e
--- /dev/null
@@ -0,0 +1,34 @@
+@echo off\r
+\r
+echo Uninstalling MSVC integration...\r
+\r
+REM CD to the directory of this batch file.\r
+cd /d %~dp0\r
+\r
+REM Search for the MSBuild toolsets directory.\r
+SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
+IF EXIST %D% GOTO FOUND_MSBUILD\r
+SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\PlatformToolsets"\r
+IF EXIST %D% GOTO FOUND_MSBUILD\r
+\r
+echo Failed to find MSBuild toolsets directory.\r
+goto FAILED\r
+\r
+:FOUND_MSBUILD\r
+\r
+del %D%\llvm\Microsoft.Cpp.Win32.llvm.props\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+del %D%\llvm\Microsoft.Cpp.Win32.llvm.targets\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+rmdir %D%\llvm\r
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
+\r
+echo Done!\r
+goto END\r
+\r
+:FAILED\r
+echo MSVC integration uninstall failed.\r
+pause\r
+goto END\r
+\r
+:END\r