make.bat: remove stray quote in msvc2017 detection.
[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                 set BUILD_VS_YEAR=2017
54         ) else if "%1" == "2017b" (
55                 set BUILD_VS_YEAR=2017
56                 set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
57         ) else if "%1" == "2015" (
58                 set BUILD_VS_YEAR=2015
59         ) else if "%1" == "packagename" (
60                 set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
61                 shift /1
62         ) else if "%1" == "nobuild" (
63                 set NOBUILD=1
64         ) else if "%1" == "pydebug" (
65                 set WITH_PYDEBUG=1
66         ) else if "%1" == "showhash" (
67                 SET BUILD_SHOW_HASHES=1
68         REM Non-Build Commands
69         ) else if "%1" == "update" (
70                 SET BUILD_UPDATE=1
71         ) else if "%1" == "ninja" (
72                 SET BUILD_WITH_NINJA=1
73         ) else if "%1" == "clean" (
74                 set MUST_CLEAN=1
75         ) else if "%1" == "verbose" (
76                 set VERBOSE=1
77         ) else (
78                 echo Command "%1" unknown, aborting!
79                 exit /b 1
80         )
81         shift /1
82         goto argv_loop
83 )
84 :EOF
85 exit /b 0