make.bat : Fix clang+asan msbuild project generation
[blender.git] / build_files / windows / configure_msbuild.cmd
index eee21f568bea5d35509b4f3c422ae4fc3d773c0d..f8c2a87de8e5616a8e7059c8a1b7940bdc277a53 100644 (file)
@@ -1,5 +1,3 @@
-set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS%
-
 if "%BUILD_ARCH%"=="x64" (
        set MSBUILD_PLATFORM=x64
 ) else if "%BUILD_ARCH%"=="x86" (
@@ -11,9 +9,9 @@ if "%BUILD_ARCH%"=="x64" (
 )
 
 if "%WITH_CLANG%"=="1" (
-       set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -T"LLVM-vs2017"
+       set CLANG_CMAKE_ARGS=-T"LLVM-vs2017"
        if "%WITH_ASAN%"=="1" (
-               set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
+               set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On
        )
 ) else (
        if "%WITH_ASAN%"=="1" (
@@ -21,6 +19,7 @@ if "%WITH_CLANG%"=="1" (
                exit /b 1 
        )
 )
+set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS%
 
 if NOT EXIST %BUILD_DIR%\nul (
        mkdir %BUILD_DIR%