vtk-m2/.gitlab/ci/config/google_benchmarks.sh
Kenneth Moreland 898115a410 Add copyright notice to scipts and configuration files
There are numerous scripts and configuration files defined in the CI setup
and elsewhere that were missing the copyright statement. Add more types
of files to check in the CopyrightStatement test, and update the files
with the appropriate statement.
2023-07-25 11:05:40 -06:00

43 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set -xe
readonly version="v1.6.1"
readonly tarball="$version.tar.gz"
readonly url="https://github.com/google/benchmark/archive/$tarball"
readonly sha256sum="6132883bc8c9b0df5375b16ab520fac1a85dc9e4cf5be59480448ece74b278d4"
readonly install_dir="$HOME/gbench"
if ! [[ "$VTKM_SETTINGS" =~ "benchmarks" ]]; then
exit 0
fi
cd "$HOME"
echo "$sha256sum $tarball" > gbenchs.sha256sum
curl --insecure -OL "$url"
sha256sum --check gbenchs.sha256sum
tar xf "$tarball"
mkdir build
mkdir "$install_dir"
cmake -GNinja -S benchmark* -B build \
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \
-DCMAKE_BUILD_TYPE="Release"
cmake --build build
cmake --install build --prefix "$install_dir"