Debian Codegraph @

kokoro/release/protoc/windows/build.bat

raw
1 set PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
2 set generator32=Visual Studio 14
3 set generator64=Visual Studio 14 Win64
4 set vcplatform32=win32
5 set vcplatform64=x64
6 set configuration=Release
7
8 echo Building protoc
9 cd github\protobuf
10
11 echo Update Submodules
12 echo This is needed because this build uses CMake <3.13.
13 git submodule update --init --recursive
14 set ABSL_ROOT_DIR=%cd%\third_party\abseil-cpp
15
16 mkdir build32
17 cd build32
18 cmake -G "%generator32%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
19 msbuild protobuf.sln /p:Platform=%vcplatform32% || goto error
20 cd ..
21
22 mkdir build64
23 cd build64
24 cmake -G "%generator64%" -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_UNICODE=ON ../cmake
25 msbuild protobuf.sln /p:Platform=%vcplatform64% || goto error
26 cd ..
27
28 goto :EOF
29
30 :error
31 echo Failed!
32 exit /b %ERRORLEVEL%