2015-07-16 04:21:59 +00:00
|
|
|
setlocal
|
|
|
|
|
|
|
|
IF %language%==cpp GOTO build_cpp
|
|
|
|
IF %language%==csharp GOTO build_csharp
|
|
|
|
|
|
|
|
echo Unsupported language %language%. Exiting.
|
|
|
|
goto :error
|
|
|
|
|
|
|
|
:build_cpp
|
|
|
|
echo Building C++
|
|
|
|
mkdir build_msvc
|
|
|
|
cd build_msvc
|
2015-10-14 23:56:48 +00:00
|
|
|
cmake -G "%generator%" -Dprotobuf_BUILD_SHARED_LIBS=%BUILD_DLL% ../cmake
|
2015-07-16 04:21:59 +00:00
|
|
|
msbuild protobuf.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
|
|
|
|
cd %configuration%
|
|
|
|
tests.exe || goto error
|
|
|
|
goto :EOF
|
|
|
|
|
|
|
|
:build_csharp
|
|
|
|
echo Building C#
|
|
|
|
cd csharp\src
|
|
|
|
nuget restore
|
2015-07-17 07:26:04 +00:00
|
|
|
msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
|
|
|
|
nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error
|
2015-07-16 04:21:59 +00:00
|
|
|
goto :EOF
|
|
|
|
|
|
|
|
:error
|
|
|
|
echo Failed!
|
2015-10-14 23:56:48 +00:00
|
|
|
EXIT /b %ERRORLEVEL%
|