Jan Tattermusch | d4794c5 | 2015-07-15 21:21:59 -0700 | [diff] [blame] | 1 | setlocal |
| 2 | |
| 3 | IF %language%==cpp GOTO build_cpp |
| 4 | IF %language%==csharp GOTO build_csharp |
| 5 | |
| 6 | echo Unsupported language %language%. Exiting. |
| 7 | goto :error |
| 8 | |
| 9 | :build_cpp |
| 10 | echo Building C++ |
| 11 | mkdir build_msvc |
| 12 | cd build_msvc |
Konstantin Podsvirov | c3aa4c2 | 2015-10-15 02:56:48 +0300 | [diff] [blame] | 13 | cmake -G "%generator%" -Dprotobuf_BUILD_SHARED_LIBS=%BUILD_DLL% ../cmake |
Jan Tattermusch | d4794c5 | 2015-07-15 21:21:59 -0700 | [diff] [blame] | 14 | msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error |
| 15 | cd %configuration% |
| 16 | tests.exe || goto error |
| 17 | goto :EOF |
| 18 | |
| 19 | :build_csharp |
| 20 | echo Building C# |
| 21 | cd csharp\src |
| 22 | nuget restore |
Jon Skeet | 59eeebe | 2015-07-17 08:26:04 +0100 | [diff] [blame] | 23 | msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error |
| 24 | nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error |
Jan Tattermusch | d4794c5 | 2015-07-15 21:21:59 -0700 | [diff] [blame] | 25 | goto :EOF |
| 26 | |
| 27 | :error |
| 28 | echo Failed! |
Konstantin Podsvirov | c3aa4c2 | 2015-10-15 02:56:48 +0300 | [diff] [blame] | 29 | EXIT /b %ERRORLEVEL% |