forked from prisms-center/CASMcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_install.sh
34 lines (25 loc) · 1.09 KB
/
build_install.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
# for running "make" && "make install" for development in a conda environment
# - the conda environment must be activated
### initialization - shouldn't need to touch
set -e
export CASM_BUILD_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
. $CASM_BUILD_DIR/build_scripts/install-functions.sh
detect_os
check_var "CONDA_PREFIX" "Must have the conda environment activated"
export CASM_PREFIX=$CONDA_PREFIX
### end initialization ###
### variables - Control how CASM is built ###
check_var "CASM_CXXFLAGS" "Compiler flags" ""
check_var "CASM_NCPU" "Compiler -j option" 2
# set OS-dependent variable defaults
# only CASM_CONFIGFLAGS can't be overridden from this script
. $CASM_BUILD_DIR/build_scripts/travis-variables-$CASM_OS_NAME.sh
### end variables ###
bash $CASM_BUILD_DIR/build_scripts/make-cpp.sh
make install
if [[ "$CASM_OS_NAME" == "osx" ]]; then
echo "install_name_tool -add_rpath $CASM_PREFIX/lib $CASM_PREFIX/bin/ccasm"
install_name_tool -add_rpath "$CASM_PREFIX/lib" "$CASM_PREFIX/bin/ccasm" \
|| { echo " already set"; }
fi
pip install $CASM_BUILD_DIR/python/casm