From 4a356b9bd93ab4f7076a778b073c77b104a89c40 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 26 Mar 2020 18:00:47 -0400 Subject: [PATCH] improved install_tbb function --- .travis.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.travis.sh b/.travis.sh index 5db84e1e5..8fdf27bd3 100755 --- a/.travis.sh +++ b/.travis.sh @@ -5,12 +5,23 @@ function install_tbb() { if [ $(uname -s) == "Linux" ]; then wget https://github.com/oneapi-src/oneTBB/releases/download/4.4.2/tbb44_20151115oss_lin.tgz - tar -xvf tbb44_20151115oss_lin.tgz + tar -xf tbb44_20151115oss_lin.tgz elif [ $(uname -s) == "Darwin" ]; then wget https://github.com/oneapi-src/oneTBB/releases/download/4.4.2/tbb44_20151115oss_osx.tgz - tar -xvf tbb44_20151115oss_osx.tgz + tar -xf tbb44_20151115oss_osx.tgz fi - source tbb44_20151115oss/bin/tbbvars.sh intel64 linux auto_tbbroot + + # Variables needed for setting the correct library path + TBB_TARGET_ARCH="intel64" + TBBROOT=$(cd tbb44_20151115oss/bin && pwd -P)/.. + library_directory="${TBB_TARGET_ARCH}/gcc4.1" + + # Set library paths + MIC_LD_LIBRARY_PATH="$TBBROOT/lib/mic:${MIC_LD_LIBRARY_PATH}"; export MIC_LD_LIBRARY_PATH + MIC_LIBRARY_PATH="$TBBROOT/lib/mic:${MIC_LIBRARY_PATH}"; export MIC_LIBRARY_PATH + LD_LIBRARY_PATH="$TBBROOT/lib/$library_directory:${LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH + LIBRARY_PATH="$TBBROOT/lib/$library_directory:${LIBRARY_PATH}"; export LIBRARY_PATH + CPATH="${TBBROOT}/include:$CPATH"; export CPATH } # common tasks before either build or test