-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
43 lines (36 loc) · 911 Bytes
/
bootstrap.sh
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
39
40
41
42
43
#!/usr/bin/env bash
# Create a symbolic link to the project.
if [ ! -L ThreadProfiler ]; then
ln -s /vagrant ThreadProfiler
fi
# Install dependencies.
apt-get update
apt-get install build-essential cmake git g++ -y
# Create a temporary directory.
DEPS_DIR=$(mktemp -d)
# Change to the temporary directory.
pushd $DEPS_DIR
if [ ! -f /usr/local/lib/libbenchmark.a ]; then
echo "Could not find google-benchmark, installing it from sources."
git clone https://github.com/google/benchmark.git
pushd benchmark
mkdir build
pushd build
cmake ..
make
sudo make install
popd
popd
fi
popd
rm -rf $DEPS_DIR
pushd ThreadProfiler
# Create a build directory if it does not exist.
if [ ! -d build ]; then
mkdir build
fi
pushd build
cmake ..
make
popd
popd