Skip to content

Commit 3c9f59a

Browse files
committed
Add pass in environment variable to allow different library build directory for FFTW and Sundials
1 parent 8c07c3c commit 3c9f59a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bin/install-fftw.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
2+
echo "HELLO"
33
# This script installs FFTW locally. It may need to environment
44
# variables to work, like 'export CC=gcc' in ARCHER.
55

@@ -9,9 +9,12 @@ set -e
99

1010
# Create target directory if needed.
1111

12+
1213
HERE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
1314
FIDIMAG_DIR="$(dirname "$HERE_DIR")"
14-
LIBS_DIR=${FIDIMAG_DIR}/local
15+
16+
if [ -z $LIBS_DIR ]; then LIBS_DIR=${FIDIMAG_DIR}/local; fi
17+
1518
mkdir -p $LIBS_DIR
1619
cd ${LIBS_DIR}
1720
echo "Installing FFTW to "$LIBS_DIR"."

bin/install-sundials.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ type cmake >/dev/null 2>&1 || { printf "CMake required to build SUNDIALS. You ca
1313

1414
HERE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
1515
FIDIMAG_DIR="$(dirname "$HERE_DIR")"
16-
LIBS_DIR=${FIDIMAG_DIR}/local
16+
17+
if [ -z $LIBS_DIR ]; then LIBS_DIR=${FIDIMAG_DIR}/local; fi
1718

1819
echo "Will install SUNDIALS to "${LIBS_DIR}" using CC="${CC}"."
1920
mkdir -p ${LIBS_DIR}

0 commit comments

Comments
 (0)