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:
authorRay Molenkamp <github@lazydodo.com>2018-05-26 06:46:42 +0300
committerRay Molenkamp <github@lazydodo.com>2018-05-26 06:46:42 +0300
commitc9db7ceff2546e0fc2967bafa279cf352d30c510 (patch)
tree118b26858acc89960ab3db29747198fffbe5ab30 /build_files/windows/configure_ninja.cmd
parentbae880dc9ee5c6333c9baa12a25423e0451abb4e (diff)
make.bat: Add support for building with ninja.
ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line. Comparison between msbuild and ninja for a full build, build time in seconds. Full Clean Build msbuild 867.5 Ninja 801.2 Difference -66.3 (-7.6%) Minor Change msbuild 43.0 Ninja 14.9 Difference -28.1 (-64.4%) No Changes msbuild 23.0 Ninja 6.1 Difference -16.9 (-73.5%)
Diffstat (limited to 'build_files/windows/configure_ninja.cmd')
-rw-r--r--build_files/windows/configure_ninja.cmd35
1 files changed, 35 insertions, 0 deletions
diff --git a/build_files/windows/configure_ninja.cmd b/build_files/windows/configure_ninja.cmd
new file mode 100644
index 00000000000..13797543bcc
--- /dev/null
+++ b/build_files/windows/configure_ninja.cmd
@@ -0,0 +1,35 @@
+set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
+:DetectionComplete
+if NOT "%verbose%" == "" (
+ echo BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
+)
+
+if NOT EXIST %BUILD_DIR%\nul (
+ mkdir %BUILD_DIR%
+)
+
+if "%MUST_CLEAN%"=="1" (
+ echo Cleaning %BUILD_DIR%
+ cd %BUILD_DIR%
+ %CMAKE% cmake --build . --config Clean
+)
+
+if NOT EXIST %BUILD_DIR%\Blender.sln set MUST_CONFIGURE=1
+if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
+
+if "%MUST_CONFIGURE%"=="1" (
+ cmake ^
+ %BUILD_CMAKE_ARGS% ^
+ -H%BLENDER_DIR% ^
+ -B%BUILD_DIR%
+
+ if %ERRORLEVEL% NEQ 0 (
+ echo "Configuration Failed"
+ exit /b 1
+ )
+)
+
+echo call "%VCVARS%" %BUILD_ARCH% > %BUILD_DIR%\rebuild.cmd
+echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
+echo ninja install >> %BUILD_DIR%\rebuild.cmd
+echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd \ No newline at end of file