-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·20 lines (18 loc) · 880 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·20 lines (18 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -e
# Build espp and install the find_package-able package (C++ static library +
# headers + esppConfig.cmake) together with the python `espp` package into a
# local staging prefix (<repo>/install). Point ../pc (and any external consumer)
# at it with -DCMAKE_PREFIX_PATH=<repo>/install; put <repo>/install on PYTHONPATH
# to `import espp`.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PREFIX="$REPO_ROOT/install"
# ESPP_BUILD_PYTHON=ON also builds/installs the python package (what CI
# publishes). ESPP_INSTALL=ON installs the find_package package into PREFIX.
cmake -S "$SCRIPT_DIR" -B "$SCRIPT_DIR/build" \
-DCMAKE_BUILD_TYPE=Release \
-DESPP_INSTALL=ON \
-DESPP_BUILD_PYTHON=ON \
-DCMAKE_INSTALL_PREFIX="$PREFIX"
cmake --build "$SCRIPT_DIR/build" --config Release --target install --parallel 4