diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-16 18:05:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-16 18:10:02 +0300 |
commit | 2a891842afabcbb903897cfd56f7389f02d7e3b4 (patch) | |
tree | 72c98d1b4bba098698f6457dd2060e0450b97493 /build_files/windows | |
parent | 49e4182b6c9f3c78fe54b66170e992fb02e2c59a (diff) |
Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
Diffstat (limited to 'build_files/windows')
-rw-r--r-- | build_files/windows/format.cmd | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/build_files/windows/format.cmd b/build_files/windows/format.cmd index 820263507fe..ca5330dc37c 100644 --- a/build_files/windows/format.cmd +++ b/build_files/windows/format.cmd @@ -1,9 +1,24 @@ +if EXIST %BLENDER_DIR%\..\lib\win64_vc14\llvm\bin\clang-format.exe ( + set CF_PATH=..\lib\win64_vc14\llvm\bin + goto detect_done +) +if EXIST %BLENDER_DIR%\..\lib\windows_vc14\llvm\bin\clang-format.exe ( + set CF_PATH=..\lib\windows_vc14\llvm\bin + goto detect_done +) + +echo clang-format not found +exit /b 1 + +:detect_done +echo found clang-format in %CF_PATH% + REM TODO(sergey): Switch to Python from libraries when available. set PYTHON="python.exe" set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py REM The formatting script expects clang-format to be in the current PATH. -set PATH=%BUILD_VS_LIBDIR%\llvm\bin;%PATH% +set PATH=%CF_PATH%;%PATH% %PYTHON% %FORMAT_PATHS% --expand-tabs |