Merge branch 'blender2.7'
[blender.git] / build_files / windows / parse_arguments.cmd
1 set BUILD_DIR=%BLENDER_DIR%..\build_windows
2 set BUILD_TYPE=Release
3 :argv_loop
4 if NOT "%1" == "" (
5
6         REM Help Message
7         if "%1" == "help" (
8                 set SHOW_HELP=1
9                 goto EOF
10         )
11         REM Build Types
12         if "%1" == "debug" (
13                 set BUILD_TYPE=Debug
14         REM Build Configurations
15         ) else if "%1" == "builddir" (
16                 set BUILD_DIR_OVERRRIDE="%BLENDER_DIR%..\%2"
17                 shift /1
18         ) else if "%1" == "with_tests" (
19                 set TESTS_CMAKE_ARGS=-DWITH_GTESTS=On
20         ) else if "%1" == "full" (
21                 set TARGET=Full
22                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
23                     -C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
24         ) else if "%1" == "lite" (
25                 set TARGET=Lite
26                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
27         ) else if "%1" == "cycles" (
28                 set TARGET=Cycles
29                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
30         ) else if "%1" == "headless" (
31                 set TARGET=Headless
32                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
33         ) else if "%1" == "bpy" (
34                 set TARGET=Bpy
35                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
36         ) else if "%1" == "clang" (
37                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
38                 set WITH_CLANG=1
39         ) else if "%1" == "release" (
40                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
41                 set TARGET=Release
42         ) else if "%1" == "asan" (
43                 set WITH_ASAN=1
44         ) else if "%1" == "x86" (
45                 set BUILD_ARCH=x86
46         ) else if "%1" == "x64" (
47                 set BUILD_ARCH=x64
48         ) else if "%1" == "2017" (
49                 set BUILD_VS_YEAR=2017
50         ) else if "%1" == "2017pre" (
51                 set BUILD_VS_YEAR=2017
52                 set VSWHERE_ARGS=-prerelease
53         ) else if "%1" == "2017b" (
54                 set BUILD_VS_YEAR=2017
55                 set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
56         ) else if "%1" == "2019" (
57                 set BUILD_VS_YEAR=2019
58         ) else if "%1" == "2019pre" (
59                 set BUILD_VS_YEAR=2019
60                 set VSWHERE_ARGS=-prerelease
61         ) else if "%1" == "2019b" (
62                 set BUILD_VS_YEAR=2019
63                 set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
64         ) else if "%1" == "2015" (
65                 set BUILD_VS_YEAR=2015
66         ) else if "%1" == "packagename" (
67                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
68                 shift /1
69         ) else if "%1" == "nobuild" (
70                 set NOBUILD=1
71         ) else if "%1" == "pydebug" (
72                 set WITH_PYDEBUG=1
73         ) else if "%1" == "showhash" (
74                 SET BUILD_SHOW_HASHES=1
75         REM Non-Build Commands
76         ) else if "%1" == "update" (
77                 SET BUILD_UPDATE=1
78         ) else if "%1" == "ninja" (
79                 SET BUILD_WITH_NINJA=1
80         ) else if "%1" == "clean" (
81                 set MUST_CLEAN=1
82         ) else if "%1" == "verbose" (
83                 set VERBOSE=1
84         ) else (
85                 echo Command "%1" unknown, aborting!
86                 exit /b 1
87         )
88         shift /1
89         goto argv_loop
90 )
91 :EOF
92 exit /b 0