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