summaryrefslogtreecommitdiffstats
path: root/config/cmake/libh5cc.in
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-02-11 13:46:09 (GMT)
committerGitHub <noreply@github.com>2022-02-11 13:46:09 (GMT)
commit96cf19499b540d8fe5547690b85d18b45f4c4b85 (patch)
treedf78991a7dbf11619d42640055d4d67313876281 /config/cmake/libh5cc.in
parent4ce6373a0ba10250b4eed293653e55e348812012 (diff)
downloadhdf5-96cf19499b540d8fe5547690b85d18b45f4c4b85.zip
hdf5-96cf19499b540d8fe5547690b85d18b45f4c4b85.tar.gz
hdf5-96cf19499b540d8fe5547690b85d18b45f4c4b85.tar.bz2
Add -showconfig to h5cc scripts to dump libhdf5.settings file (#1391)
* Add -showconfig to h5cc scripts to dump libhdf5.settings file * Added note
Diffstat (limited to 'config/cmake/libh5cc.in')
-rw-r--r--config/cmake/libh5cc.in23
1 files changed, 22 insertions, 1 deletions
diff --git a/config/cmake/libh5cc.in b/config/cmake/libh5cc.in
index ecdd13e..f5d8d4c 100644
--- a/config/cmake/libh5cc.in
+++ b/config/cmake/libh5cc.in
@@ -27,6 +27,27 @@ prg=$dir/$(basename -- "$prg") || exit
printf '%s\n' "$prg"
printf 'dir is %s\n' "$dir"
+
+# Show the configuration summary of the library recorded in the
+# libhdf5.settings file reside in the lib directory.
+showconfigure()
+{
+ cat $dir/lib/libhdf5.settings
+ status=$?
+}
+
export PKG_CONFIG_PATH=$dir/lib/pkgconfig
-@_PKG_CONFIG_COMPILER@ $@ `pkg-config --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@`
+for arg in $@ ; do
+ case "$arg" in
+ -showconfig)
+ showconfigure
+ exit $status
+ ;;
+ *)
+ @_PKG_CONFIG_COMPILER@ $@ `pkg-config --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@`
+ status=$?
+ exit $status
+ ;;
+ esac
+done