blob: 9a46b92892177c6a71f5b11cae1be1dcb14f4c06 [file] [log] [blame]
Jan Tattermuschd4794c52015-07-15 21:21:59 -07001setlocal
2
3IF %language%==cpp GOTO build_cpp
4IF %language%==csharp GOTO build_csharp
5
6echo Unsupported language %language%. Exiting.
7goto :error
8
9:build_cpp
10echo Building C++
11mkdir build_msvc
12cd build_msvc
Konstantin Podsvirovc3aa4c22015-10-15 02:56:48 +030013cmake -G "%generator%" -Dprotobuf_BUILD_SHARED_LIBS=%BUILD_DLL% ../cmake
Jan Tattermuschd4794c52015-07-15 21:21:59 -070014msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
15cd %configuration%
16tests.exe || goto error
17goto :EOF
18
19:build_csharp
20echo Building C#
21cd csharp\src
22nuget restore
Jon Skeet59eeebe2015-07-17 08:26:04 +010023msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
24nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error
Jan Tattermuschd4794c52015-07-15 21:21:59 -070025goto :EOF
26
27:error
28echo Failed!
Konstantin Podsvirovc3aa4c22015-10-15 02:56:48 +030029EXIT /b %ERRORLEVEL%