format.cmd 685 B

1234567891011121314151617181920212223242526
  1. if EXIST %BLENDER_DIR%\..\lib\win64_vc14\llvm\bin\clang-format.exe (
  2. set CF_PATH=..\lib\win64_vc14\llvm\bin
  3. goto detect_done
  4. )
  5. if EXIST %BLENDER_DIR%\..\lib\windows_vc14\llvm\bin\clang-format.exe (
  6. set CF_PATH=..\lib\windows_vc14\llvm\bin
  7. goto detect_done
  8. )
  9. echo clang-format not found
  10. exit /b 1
  11. :detect_done
  12. echo found clang-format in %CF_PATH%
  13. REM TODO(sergey): Switch to Python from libraries when available.
  14. set PYTHON="python.exe"
  15. set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
  16. REM The formatting script expects clang-format to be in the current PATH.
  17. set PATH=%CF_PATH%;%PATH%
  18. %PYTHON% %FORMAT_PATHS% %FORMAT_ARGS%
  19. :EOF