Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | @rem Copyright 2016 gRPC authors. |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 2 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 6 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | @rem http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 8 | @rem |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
Jan Tattermusch | f551edf | 2016-05-13 10:49:17 -0700 | [diff] [blame] | 14 | |
Jan Tattermusch | 874aec0 | 2015-10-07 19:26:19 -0700 | [diff] [blame] | 15 | @rem Performs nuget restore step for C#. |
| 16 | |
| 17 | setlocal |
| 18 | |
Jan Tattermusch | e7f0b85 | 2017-02-08 19:06:10 -0800 | [diff] [blame] | 19 | set ARCHITECTURE=%1 |
| 20 | |
Jan Tattermusch | 874aec0 | 2015-10-07 19:26:19 -0700 | [diff] [blame] | 21 | @rem enter repo root |
Jan Tattermusch | 5c79a31 | 2016-12-20 11:02:50 +0100 | [diff] [blame] | 22 | cd /d %~dp0\..\..\.. |
Jan Tattermusch | 874aec0 | 2015-10-07 19:26:19 -0700 | [diff] [blame] | 23 | |
Jan Tattermusch | e7f0b85 | 2017-02-08 19:06:10 -0800 | [diff] [blame] | 24 | mkdir cmake |
| 25 | cd cmake |
| 26 | mkdir build |
| 27 | cd build |
| 28 | mkdir %ARCHITECTURE% |
| 29 | cd %ARCHITECTURE% |
Jan Tattermusch | 56d8f82 | 2017-05-02 16:28:23 +0200 | [diff] [blame] | 30 | |
Jan Tattermusch | e7f0b85 | 2017-02-08 19:06:10 -0800 | [diff] [blame] | 31 | @rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly |
Jan Tattermusch | 56d8f82 | 2017-05-02 16:28:23 +0200 | [diff] [blame] | 32 | @rem If yasm is not on the path, use hardcoded path instead. |
| 33 | yasm --version || set USE_HARDCODED_YASM_PATH_MAYBE=-DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe" |
| 34 | |
| 35 | cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../../.. || goto :error |
Jan Tattermusch | e7f0b85 | 2017-02-08 19:06:10 -0800 | [diff] [blame] | 36 | |
Jan Tattermusch | 78cb931 | 2017-04-11 11:04:42 +0200 | [diff] [blame] | 37 | cd ..\..\..\src\csharp |
Jan Tattermusch | 874aec0 | 2015-10-07 19:26:19 -0700 | [diff] [blame] | 38 | |
Jan Tattermusch | 3c344d2 | 2017-04-04 16:49:06 +0200 | [diff] [blame] | 39 | dotnet restore Grpc.sln || goto :error |
Jan Tattermusch | 874aec0 | 2015-10-07 19:26:19 -0700 | [diff] [blame] | 40 | |
| 41 | endlocal |
| 42 | |
| 43 | goto :EOF |
| 44 | |
| 45 | :error |
| 46 | echo Failed! |
| 47 | exit /b %errorlevel% |