File: build-benchmark.cmd

package info (click to toggle)
opentelemetry-cpp 1.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,372 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 36; python: 31
file content (38 lines) | stat: -rw-r--r-- 1,156 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
REM Copyright The OpenTelemetry Authors
REM SPDX-License-Identifier: Apache-2.0

@echo off
set BUILDTOOLS_VERSION=vs2019
set CMAKE_GEN="Visual Studio 16 2019"
echo Building Google Benchmark (test only dependency)...
@setlocal ENABLEEXTENSIONS

echo Auto-detecting Visual Studio version...
call "%~dp0\vcvars.cmd"

pushd "%~dp0\.."
set "ROOT=%CD%"

set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS%
set platform=

if not exist "%ROOT%\third_party\benchmark\" (
  echo "Google Benchmark library is not available, skipping benchmark build."
  call skip_the_build
)

cd "%ROOT%\third_party\benchmark\"
set "GOOGLETEST_PATH=%ROOT%\third_party\googletest"
if not exist "build" (
  mkdir build
)
cd build

REM By default we generate the project for the older Visual Studio 2017 even if we have newer version installed
cmake ../ -G %CMAKE_GEN% -Ax64 -DBENCHMARK_ENABLE_TESTING=OFF
set SOLUTION=%ROOT%\third_party\benchmark\build\benchmark.sln
msbuild %SOLUTION% /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Debug /p:Platform=x64
msbuild %SOLUTION% /maxcpucount:%MAXCPUCOUNT% /p:Configuration=Release /p:Platform=x64
popd

:skip_the_build