vastly improved install_tbb function which copies files correctly
parent
99e1c42282
commit
ba5086f271
42
.travis.sh
42
.travis.sh
|
@ -3,31 +3,33 @@
|
||||||
# install TBB with _debug.so files
|
# install TBB with _debug.so files
|
||||||
function install_tbb()
|
function install_tbb()
|
||||||
{
|
{
|
||||||
TBBROOT=/tmp/tbb44_20151115oss
|
TBB_BASEURL=https://github.com/oneapi-src/oneTBB/releases/download
|
||||||
|
TBB_VERSION=4.4.2
|
||||||
|
TBB_DIR=tbb44_20151115oss
|
||||||
|
TBB_SAVEPATH="/tmp/tbb.tgz"
|
||||||
|
|
||||||
if [ "$(uname -s)" == "Linux" ]; then
|
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||||
wget https://github.com/oneapi-src/oneTBB/releases/download/4.4.2/tbb44_20151115oss_lin.tgz -O /tmp/tbb442.tgz
|
OS_SHORT="lin"
|
||||||
tar -C /tmp -xf /tmp/tbb442.tgz
|
TBB_LIB_DIR="intel64/gcc4.4"
|
||||||
|
SUDO="sudo"
|
||||||
|
|
||||||
TBB_TARGET_ARCH="intel64"
|
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
library_directory="${TBB_TARGET_ARCH}/gcc4.1"
|
OS_SHORT="lin"
|
||||||
|
TBB_LIB_DIR=""
|
||||||
|
SUDO=""
|
||||||
|
|
||||||
# Set library paths
|
|
||||||
export MIC_LD_LIBRARY_PATH="$TBBROOT/lib/mic:${MIC_LD_LIBRARY_PATH}"
|
|
||||||
export MIC_LIBRARY_PATH="$TBBROOT/lib/mic:${MIC_LIBRARY_PATH}"
|
|
||||||
export LD_LIBRARY_PATH="$TBBROOT/lib/$library_directory:${LD_LIBRARY_PATH}"
|
|
||||||
export LIBRARY_PATH="$TBBROOT/lib/$library_directory:${LIBRARY_PATH}"
|
|
||||||
|
|
||||||
elif [ "$(uname -s)" == "Darwin" ]; then
|
|
||||||
wget https://github.com/oneapi-src/oneTBB/releases/download/4.4.2/tbb44_20151115oss_osx.tgz -O /tmp/tbb442.tgz
|
|
||||||
tar -C /tmp -xf /tmp/tbb442.tgz
|
|
||||||
|
|
||||||
# Set library paths
|
|
||||||
export LIBRARY_PATH="${TBBROOT}/lib:$LIBRARY_PATH"
|
|
||||||
export DYLD_LIBRARY_PATH="${TBBROOT}/lib:$DYLD_LIBRARY_PATH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPATH="${TBBROOT}/include:$CPATH"; export CPATH
|
wget "${TBB_BASEURL}/${TBB_VERSION}/${TBB_DIR}_${OS_SHORT}.tgz" -O $TBB_SAVEPATH
|
||||||
|
tar -C /tmp -xf $TBB_SAVEPATH
|
||||||
|
|
||||||
|
TBBROOT=/tmp/$TBB_DIR
|
||||||
|
# Copy the needed files to the correct places.
|
||||||
|
# This works correctly for travis builds, instead of setting path variables.
|
||||||
|
# This is what Homebrew does to install TBB on Macs
|
||||||
|
$SUDO cp -R $TBBROOT/lib/$TBB_LIB_DIR/* /usr/local/lib/
|
||||||
|
$SUDO cp -R $TBBROOT/include/ /usr/local/include/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# common tasks before either build or test
|
# common tasks before either build or test
|
||||||
|
|
Loading…
Reference in New Issue