Files
radar_data_process/.vscode/scripts/clean.bat
T

44 lines
1.1 KiB
Batchfile

@echo off
rem ===========================================================================
rem CMake clean script - remove the build output of one configuration.
rem
rem Usage:
rem clean.bat ^<Debug^|Release^> [AUTO^|ON^|OFF]
rem
rem Examples:
rem clean.bat Release OFF
rem clean.bat Debug ON
rem
rem The directory removed is the same one configure.bat/build.bat use:
rem build\<Debug^|Release^>\<REC_AUTO^|REC_OFF^|REC_ON^>
rem Use clean_all.bat to clean every configuration at once.
rem
rem Encoding: keep this file ASCII-only (see msvc_env.bat).
rem ===========================================================================
setlocal
if "%~1"=="" goto :usage
call "%~dp0config_paths.bat" "%~1" "%~2"
if errorlevel 1 exit /b 1
pushd "%~dp0..\.."
if not exist "%BUILD_DIR%" (
echo [clean] "%BUILD_DIR%" does not exist - nothing to do
popd
exit /b 0
)
echo [clean] remove "%BUILD_DIR%"
rmdir /s /q "%BUILD_DIR%"
if exist "%BUILD_DIR%" (
echo [ERROR] cannot remove "%BUILD_DIR%", close open files and retry.
popd
exit /b 1
)
popd
exit /b 0
:usage
echo Usage: clean.bat ^<Debug^|Release^> [AUTO^|ON^|OFF^]
exit /b 1