Debian Codegraph @

test/distrib/cpp/run_distrib_test_cmake_as_externalproject.bat

raw
1 @rem Copyright 2016 gRPC authors.
2 @rem
3 @rem Licensed under the Apache License, Version 2.0 (the "License");
4 @rem you may not use this file except in compliance with the License.
5 @rem You may obtain a copy of the License at
6 @rem
7 @rem http://www.apache.org/licenses/LICENSE-2.0
8 @rem
9 @rem Unless required by applicable law or agreed to in writing, software
10 @rem distributed under the License is distributed on an "AS IS" BASIS,
11 @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 @rem See the License for the specific language governing permissions and
13 @rem limitations under the License.
14
15 @rem enter this directory
16 cd /d %~dp0\..\..\..
17
18 @rem TODO(jtattermusch): Kokoro has pre-installed protoc.exe in C:\Program Files\ProtoC and that directory
19 @rem is on PATH. To avoid picking up the older version protoc.exe, we change the path to something non-existent.
20 set PATH=%PATH:ProtoC=DontPickupProtoC%
21
22 @rem Download OpenSSL-Win32 originally installed from https://slproweb.com/products/Win32OpenSSL.html
23 powershell -Command "(New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/grpc-testing.appspot.com/OpenSSL-Win32-1_1_0g.zip', 'OpenSSL-Win32.zip')"
24 powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('OpenSSL-Win32.zip', '.');"
25
26 @rem set absolute path to OpenSSL with forward slashes
27 set OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32
28
29 @rem TODO(jtattermusch): add support for GRPC_CPP_DISTRIBTEST_BUILD_COMPILER_JOBS env variable
30
31 @rem Build helloworld example using cmake
32 @rem Use non-standard build directory to avoid too long filenames
33 mkdir example_build
34 cd example_build
35 cmake -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% ../examples/cpp/helloworld/cmake_externalproject || goto :error
36 cmake --build . --config Release || goto :error
37 cd ..
38
39 goto :EOF
40
41 :error
42 echo Failed!
43 exit /b %errorlevel%