ray/build.sh

25 lines
504 B
Bash
Raw Normal View History

2016-06-22 11:42:04 -07:00
#!/usr/bin/env bash
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
2016-06-25 14:02:33 -07:00
# Determine how many parallel jobs to use for make based on the number of cores
unamestr="$(uname)"
if [[ "$unamestr" == "Linux" ]]; then
PARALLEL=$(nproc)
elif [[ "$unamestr" == "Darwin" ]]; then
PARALLEL=$(sysctl -n hw.ncpu)
else
echo "Unrecognized platform."
exit 1
fi
2016-06-22 11:42:04 -07:00
mkdir -p "$ROOT_DIR/build"
pushd "$ROOT_DIR/build"
cmake ..
2016-06-25 14:02:33 -07:00
make install -j$PARALLEL
2016-06-22 11:42:04 -07:00
popd
2016-06-27 12:16:59 -07:00
pushd "$ROOT_DIR/scripts/"
./gen-protobuf.sh
popd