Skip to content
Snippets Groups Projects
Commit a5107ba5 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #7384: Added a script to generate casacore component dependencies that...

Task #7384: Added a script to generate casacore component dependencies that can be copied/pasted into the FindCasacore.cmake macro.
parent 502f1b9a
No related branches found
No related tags found
No related merge requests found
......@@ -2196,6 +2196,7 @@ CMake/FindOpenCL.cmake -text
CMake/FindValgrind.cmake -text
CMake/LofarPackageList.cmake eol=lf
CMake/TODO -text
CMake/get_casacore_deps.sh eol=lf
CMake/testscripts/assay -text
CMake/testscripts/checkfloat -text
CMake/testscripts/default.debug -text
......
#!/bin/bash
#
# Derive casacore dependencies from the installed shared libraries.
# Location to search for casacore shared libraries.
CASACORE_LIBDIR=${1:-/opt/lofar/external/casacore/lib}
# Make sure that we get a deterministic lexicograhical ordering.
LC_ALL=C
# Expand to null string if no files match glob pattern
shopt -s nullglob
echo "Searching for libraries in $CASACORE_LIBDIR ..." 1>&2
echo "# Define the Casacore components."
echo "set(Casacore_components"
for f in $CASACORE_LIBDIR/*.so
do
comp=$(echo ${f%%.so} | sed 's,^.*libcasa_,,')
echo " $comp"
done
echo ")"
echo
echo "# Define the Casacore components' inter-dependencies."
for f in $CASACORE_LIBDIR/*.so
do
comp=$(echo ${f%%.so} | sed 's,^.*libcasa_,,')
printf "%-39s" "set(Casacore_${comp}_DEPENDENCIES "
libs=$(readelf -d $f | grep 'NEEDED.*libcasa_' | \
sed -e 's,^[^\[]*\[libcasa_,,' -e 's,\..*$,,')
for l in $libs
do
printf " %s" "$l"
done
printf ")\n"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment