| 1 |
REM Copyright 2020 Google LLC |
| 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 https://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 |
@echo on |
| 16 |
|
| 17 |
SETLOCAL ENABLEDELAYEDEXPANSION |
| 18 |
|
| 19 |
SET BUILD_ROOT=%cd% |
| 20 |
SET PATH=C:\python36;C:\Program Files\cmake-3.23.1-windows-x86_64\bin;%PATH% |
| 21 |
SET SRC=%cd%\github\cppdap |
| 22 |
|
| 23 |
cd %SRC% |
| 24 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 25 |
|
| 26 |
git submodule update --init |
| 27 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 28 |
|
| 29 |
SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild" |
| 30 |
SET CONFIG=Release |
| 31 |
|
| 32 |
mkdir %SRC%\build |
| 33 |
cd %SRC%\build |
| 34 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 35 |
|
| 36 |
IF /I "%BUILD_SYSTEM%"=="cmake" ( |
| 37 |
cmake .. -G "%BUILD_GENERATOR%" "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1" |
| 38 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 39 |
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln |
| 40 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 41 |
Release\cppdap-unittests.exe |
| 42 |
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL! |
| 43 |
) ELSE ( |
| 44 |
echo "Unknown build system: %BUILD_SYSTEM%" |
| 45 |
exit /b 1 |
| 46 |
) |