Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/windows')
-rw-r--r--build_files/windows/format.cmd10
-rw-r--r--build_files/windows/parse_arguments.cmd2
-rw-r--r--build_files/windows/reset_variables.cmd1
3 files changed, 13 insertions, 0 deletions
diff --git a/build_files/windows/format.cmd b/build_files/windows/format.cmd
new file mode 100644
index 00000000000..b33ebdcbe5d
--- /dev/null
+++ b/build_files/windows/format.cmd
@@ -0,0 +1,10 @@
+REM TODO(sergey): Switch to Python from libraries when available.
+set PYTHON="python.exe"
+set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils\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%
+
+%PYTHON% %FORMAT_PATHS% --expand-tabs
+
+:EOF
diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd
index ada78e1defb..ed54ee9d13a 100644
--- a/build_files/windows/parse_arguments.cmd
+++ b/build_files/windows/parse_arguments.cmd
@@ -81,6 +81,8 @@ if NOT "%1" == "" (
set MUST_CLEAN=1
) else if "%1" == "verbose" (
set VERBOSE=1
+ ) else if "%1" == "format" (
+ set FORMAT=1
) else (
echo Command "%1" unknown, aborting!
exit /b 1
diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd
index ba584a7f34a..efac15785ca 100644
--- a/build_files/windows/reset_variables.cmd
+++ b/build_files/windows/reset_variables.cmd
@@ -27,3 +27,4 @@ set CLANG_CMAKE_ARGS=
set ASAN_CMAKE_ARGS=
set WITH_PYDEBUG=
set PYDEBUG_CMAKE_ARGS=
+set FORMAT=