cmake_clean.bat 494 B

123456789101112131415161718
  1. :: Copyright (c) 2008-2023 the Urho3D project
  2. :: License: MIT
  3. @echo off
  4. :: Clean the CMake cache and CMake generated files
  5. set "BUILD="
  6. if not "%~1" == "" if exist "%~1\CMakeCache.txt" set "BUILD=%~1"
  7. if "%BUILD%" == "" if exist "%cd%\CMakeCache.txt" (set "BUILD=%cd%") else (goto :error)
  8. del /F "%BUILD%\CMakeCache.txt"
  9. if exist "%BUILD%\CMakeFiles" rd /S /Q "%BUILD%\CMakeFiles"
  10. cmake -E touch "%BUILD%\CMakeCache.txt"
  11. goto :eof
  12. :error
  13. echo Usage: %~nx0 \path\to\build-tree
  14. exit /B 1
  15. :eof