summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd')
-rw-r--r--src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd b/src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd
new file mode 100644
index 000000000..379cb1313
--- /dev/null
+++ b/src/jaegertracing/opentelemetry-cpp/tools/build-benchmark.cmd
@@ -0,0 +1,35 @@
+@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