1*62c56f98SSadaf Ebrahimi@rem Build and test Mbed TLS with Visual Studio using msbuild. 2*62c56f98SSadaf Ebrahimi@rem Usage: windows_msbuild [RETARGET] 3*62c56f98SSadaf Ebrahimi@rem RETARGET: version of Visual Studio to emulate 4*62c56f98SSadaf Ebrahimi@rem https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset 5*62c56f98SSadaf Ebrahimi 6*62c56f98SSadaf Ebrahimi@rem These parameters are hard-coded for now. 7*62c56f98SSadaf Ebrahimiset "arch=x64" & @rem "x86" or "x64" 8*62c56f98SSadaf Ebrahimiset "cfg=Release" & @rem "Debug" or "Release" 9*62c56f98SSadaf Ebrahimiset "vcvarsall=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" 10*62c56f98SSadaf Ebrahimi 11*62c56f98SSadaf Ebrahimiif not "%~1"=="" set "retarget=,PlatformToolset=%1" 12*62c56f98SSadaf Ebrahimi 13*62c56f98SSadaf Ebrahimi@rem If the %USERPROFILE%\Source directory exists, then running 14*62c56f98SSadaf Ebrahimi@rem vcvarsall.bat will silently change the directory to that directory. 15*62c56f98SSadaf Ebrahimi@rem Setting the VSCMD_START_DIR environment variable causes it to change 16*62c56f98SSadaf Ebrahimi@rem to that directory instead. 17*62c56f98SSadaf Ebrahimiset "VSCMD_START_DIR=%~dp0\..\visualc\VS2013" 18*62c56f98SSadaf Ebrahimi 19*62c56f98SSadaf Ebrahimi"%vcvarsall%" x64 && ^ 20*62c56f98SSadaf Ebrahimimsbuild /t:Rebuild /p:Configuration=%cfg%%retarget% /m mbedTLS.sln 21