Skip to content

Commit 339441a

Browse files
committed
Fix issue #97: Teach install.sh to install libcaffeine.a
fpm is currently unable to install submodule files, but with this workaround we can at least install libcaffeine.a, which is all that's actually needed to link against multi-image flang executables.
1 parent 36da76d commit 339441a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

install.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,24 @@ chmod u+x $RUN_FPM_SH
515515

516516
./$RUN_FPM_SH build $VERBOSE
517517

518+
LIBCAFFEINE_DST=libcaffeine-$GASNET_CONDUIT.a
519+
LIBCAFFEINE_SRC=$(./$RUN_FPM_SH install --list 2>/dev/null | grep libcaffeine | cut -d' ' -f2)
520+
521+
if [ -z "$LIBCAFFEINE_SRC" ]; then
522+
echo "ERROR: Failed to detect libcaffeine.a from fpm"
523+
exit 1
524+
else
525+
mkdir -p "$PREFIX/lib"
526+
cp -af "$LIBCAFFEINE_SRC" "$PREFIX/lib/$LIBCAFFEINE_DST"
527+
ln -sf "$LIBCAFFEINE_DST" "$PREFIX/lib/libcaffeine.a"
528+
fi
529+
518530
cat << EOF
519531
520532
________________ Caffeine has been dispensed! ________________
521533
534+
Caffeine is now installed in $PREFIX
535+
522536
To rebuild or to run tests or examples via the Fortran Package
523537
Manager (fpm) with the required compiler/linker flags, pass a
524538
fpm command to the build/run-fpm.sh script. For example, run

manifest/fpm.toml.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ assert = {git = "https://github.com/berkeleylab/assert.git", tag = "3.0.0"}
1010
veggies = {git = "https://gitlab.com/everythingfunctional/veggies", tag = "v1.1.3"}
1111
iso_varying_string = {git = "https://gitlab.com/everythingfunctional/iso_varying_string.git", tag = "v3.0.4"}
1212

13+
[install]
14+
library = true
15+
1316
[build]

0 commit comments

Comments
 (0)