Last active
January 7, 2017 03:10
-
-
Save AhiyaHiya/56c680e1579636aff8a6a7d51b0fda01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# script expects to be at the root folder where ROSE was already downloaded | |
# so if you: | |
# mkdir ROSE | |
# cd ROSE | |
# git clone https://github.com/rose-compiler/rose . | |
# This script should be in the ROSE folder | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
SetupBoost() | |
{ | |
printf "%s\n" ${FUNCNAME[0]} | |
BOOST_ROOT=${SR_CURRENTPATH}/lib/boost | |
if [[ ! -d "${BOOST_ROOT}" ]]; then | |
mkdir -p "${BOOST_ROOT}" | |
cd "${BOOST_ROOT}" | |
curl -L -O https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz | |
tar --bzip2 -xf boost_1_63_0.tar.gz | |
ln -s ./boost_1_63_0/boost ./boost | |
cd "${BOOST_ROOT}"/boost_1_63_0/ | |
./bootstrap.sh && ./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" -j 8 stage | |
cd "${BOOST_ROOT}" | |
ln -s ./boost_1_63_0/stage/lib ./lib | |
fi | |
cd "${SR_CURRENTPATH}" | |
} | |
SetupROSEBuildFolder() | |
{ | |
printf "%s\n" ${FUNCNAME[0]} | |
cd "${SR_CURRENTPATH}" | |
if [[ ! -d ./sr_build ]]; then | |
mkdir sr_build | |
fi | |
cd sr_build | |
ROSE_BLD=${PWD} | |
ROSE_SRC=${SR_CURRENTPATH} | |
cd ${SR_CURRENTPATH} | |
} | |
main() | |
{ | |
printf "%s\n" ${FUNCNAME[0]} | |
SR_CURRENTPATH=${PWD} | |
SetupBoost | |
SetupROSEBuildFolder | |
cd $ROSE_BLD | |
export LD_LIBRARY_PATH="$BOOST_ROOT/lib:$LD_LIBRARY_PATH" | |
cmake $ROSE_SRC -DCMAKE_INSTALL_PREFIX=$HOME/my-rose-installation -DBOOST_ROOT=$BOOST_ROOT | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment