| 1 |
@rem ------------------------------------------------------------------------------ |
| 2 |
@rem Copyright (C) Intel Corporation |
| 3 |
@rem |
| 4 |
@rem SPDX-License-Identifier: MIT |
| 5 |
@rem ------------------------------------------------------------------------------ |
| 6 |
@rem Build in typical fashion. |
| 7 |
|
| 8 |
@echo off |
| 9 |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION |
| 10 |
|
| 11 |
for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" |
| 12 |
pushd %script_dir%\.. |
| 13 |
set "source_dir=%cd%" |
| 14 |
popd |
| 15 |
set "build_dir=%source_dir%\_build" |
| 16 |
set "staging_dir=%source_dir%\_install" |
| 17 |
|
| 18 |
cmake -B "%build_dir%" -S "%source_dir%" ^ |
| 19 |
-DBUILD_TESTS=ON ^ |
| 20 |
-DENABLE_WARNING_AS_ERROR=ON |
| 21 |
if %errorlevel% neq 0 exit /b %errorlevel% |
| 22 |
|
| 23 |
cmake --build "%build_dir%" --parallel %NUMBER_OF_PROCESSORS% --verbose --config Release |
| 24 |
if %errorlevel% neq 0 exit /b %errorlevel% |
| 25 |
|
| 26 |
:: cmake cpack conflicts with choco cpack, at least until next choco release |
| 27 |
cmake --build "%build_dir%" --parallel %NUMBER_OF_PROCESSORS% --config Release --target package |
| 28 |
if %errorlevel% neq 0 exit /b %errorlevel% |
| 29 |
|
| 30 |
cmake --install "%build_dir%" --prefix "%staging_dir%" --config Release --strip |
| 31 |
if %errorlevel% neq 0 exit /b %errorlevel% |
| 32 |
|
| 33 |
endlocal |