summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-11-13 22:22:41 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-11-13 22:22:41 (GMT)
commit3bdc5d7aa4e95e54eb8c7d28956fa49401e46296 (patch)
treee2ec0e19e676fad1c3b3bc8e4cf505b591de907a /bin
parentb7240446daf2b0e4527de3155c487ea4d0796050 (diff)
downloadhdf5-3bdc5d7aa4e95e54eb8c7d28956fa49401e46296.zip
hdf5-3bdc5d7aa4e95e54eb8c7d28956fa49401e46296.tar.gz
hdf5-3bdc5d7aa4e95e54eb8c7d28956fa49401e46296.tar.bz2
[svn-r28342] DAILYTEST-195: Osx1010test has culmulated a lot of mounted volumes from cmakehdf5
installation. Tried to find out what went wrong but all output files were deleted already. Added a verbose option to display all cmake process output in order to see what might have gone wrong. Default is on. Using --disable-verbose will turn it off. Tested: osx1010dev, osx1010test, playtypus.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmakehdf535
1 files changed, 33 insertions, 2 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index afd4604..dbf7ef3 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -23,6 +23,7 @@ makelog="#${progname}_2build.log"
testlog="#${progname}_3test.log"
packlog="#${progname}_4pack.log"
installlog="#${progname}_5install.log"
+vflag=1 # verbose flag default to on.
config_summary=libhdf5.settings
exit_code=0
@@ -90,6 +91,8 @@ Usage: $progname [<options>]
Use zlib library for external deflate I/O filter. Default is on.
--with-szlib | --with-szlib=<libpath> | --without-szlib:
Use szlib library for external deflate I/O filter. Default is on.
+ --enable-verbose | --disable-verbose:
+ enable or disable verbose output. Default is on.
--help: shows details help page
<libpath>: the file path to the library, expect <libpath>/lib and <libpath>/include.
@@ -157,7 +160,23 @@ INSTALL_HDF5()
return 1
;;
esac
- return 0
+}
+
+
+# Print logfiles.
+# $*: logfiles
+DUMP_LOGFILE()
+{
+ for x in $*; do
+ if [ -f $x ]; then
+ echo "=================================="
+ echo "Dumping $x"
+ echo "=================================="
+ cat $x
+ echo "==== END $x ====="
+ echo
+ fi
+ done
}
@@ -237,6 +256,12 @@ while [ $# -gt 0 ]; do
with_szlib=-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF
szlib_path="" # reset the path
;;
+ --enable-verbose)
+ vflag=1
+ ;;
+ --disable-verbose)
+ vflag=0
+ ;;
--help)
# print the detail help page and exit
HELP
@@ -250,6 +275,7 @@ while [ $# -gt 0 ]; do
esac
shift
done
+$DPRINT after option parsing vflag=$vflag
# Always display the brief help page
HELP_BRIEF
@@ -271,6 +297,12 @@ if [ $? != 0 ]; then
echo $vers failed. Aborted.
exit 1
fi
+
+# setup output of all the log files if verbose is on upon exit
+trap \
+"if [ $vflag -ne 0 ]; then DUMP_LOGFILE \$configlog \$makelog \$testlog \$packlog \$installlog; fi" \
+0
+
echo Running Cmake for HDF5-${version} ...
# 4. Configure the C library, tools and tests with this command:
# If successful, append the configure summary to the configure logfile.
@@ -299,7 +331,6 @@ STEP "Test the library and tools..." "ctest . -C Release" $testlog
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
# 8. Install with this command:
-#STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog
STEP "Install..." "INSTALL_HDF5" $installlog
# save the last exit code
exit_code=$?