File: static

package info (click to toggle)
benchmark 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,708 kB
  • sloc: cpp: 13,013; python: 2,390; ansic: 38; sh: 28; makefile: 12
file content (25 lines) | stat: -rwxr-xr-x 484 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
#!/bin/sh
# autopkgtest check: Build with libbenchmark_main.a

set -e
CURDIR=$(pwd)

TEST="static_test"
echo Test: $TEST
WORKDIR=$(mktemp -d)
echo $WORKDIR
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

cat << EOF > $TEST.cc
#include <benchmark/benchmark.h>

static void Empty(benchmark::State& state) {}
BENCHMARK(Empty);
EOF

g++ -o test $TEST.cc -std=c++11 -lpthread $(pkg-config benchmark --libs) -lbenchmark_main
echo "build: OK"
[ -x test ]
./test
echo "run: OK"