blob: 356a13f86bf5b20534810c4a574cefd3f6125131 [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
13cmake -G "%generator%" -DBUILD_SHARED_LIBS=%BUILD_DLL% ../cmake
14msbuild 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!
29EXIT /b %ERRORLEVEL%