forked from pskvins/MMseqs2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_build
More file actions
executable file
·45 lines (39 loc) · 1 KB
/
Copy pathrun_build
File metadata and controls
executable file
·45 lines (39 loc) · 1 KB
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
44
45
#!/usr/bin/env bash
# Build an MMseqs2 tree.
#
# Usage:
# ./run_build # build the tree this script lives in
# ./run_build path/to/MMseqs2 # build a specific tree
#
# The build directory is path/to/MMseqs2/build.
set -x -e -o pipefail
# Resolve the real script location (follows symlinks)
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
# Determine the tree to build
TREE_DIR=
for arg in "$@"; do
if [ -d "$arg" ]; then
TREE_DIR=$(readlink -f "$arg")
fi
done
# Default: the tree this script lives in
if [ -z "$TREE_DIR" ]; then
TREE_DIR="$SCRIPT_DIR"
fi
# Configure if needed
if [ ! -e "$TREE_DIR/build" ]; then
mkdir -p "$TREE_DIR/build"
pushd "$TREE_DIR/build"
cmake -DHAVE_MPI=0 \
-DENABLE_CUDA=1 \
-DHAVE_TESTS=1 \
-DHAVE_AVX2=1 \
-DCMAKE_CUDA_ARCHITECTURES="75;80;86;89;90" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=. \
..
popd
fi
# Build
pushd "$TREE_DIR/build"
make -j64