summaryrefslogtreecommitdiffstats
path: root/bin/cmakehdf5
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cmakehdf5')
-rwxr-xr-xbin/cmakehdf523
1 files changed, 21 insertions, 2 deletions
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index 6e22e17..ccef469 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -46,6 +46,7 @@ cacheinit=$srcdir/config/cmake/cacheinit.cmake
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
+build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF # Threadsafe feature default off
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
@@ -82,6 +83,8 @@ Usage: $progname [<options>]
enable or disable c++ API. Default is off.
--enable-hl | --disable-hl:
enable or disable high level API. Default is on.
+ --enable-threadsafe | --disable-threadsafe:
+ enable or disable threadsafe feature. Default is off
--enable-shared | --disable-shared:
enable or disable shared lib. Default is on.
--enable-tools | --disable-tools:
@@ -148,6 +151,10 @@ INSTALL_HDF5()
$install_file --skip-license $*
;;
Darwin) # Mac OSX DMG file
+ # These steps were a kludge. Need proper support from Cmake engineering.
+ echo Darwin install step needs proper implementation. Quit.
+ return 1
+ #
install_file=HDF5-${version}-Darwin.dmg
test -d hdf5 || mkdir hdf5
basename=`basename $install_file .dmg`
@@ -225,6 +232,12 @@ while [ $# -gt 0 ]; do
--disable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
;;
+ --enable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=ON
+ ;;
+ --disable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF
+ ;;
--enable-shared)
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
;;
@@ -313,8 +326,8 @@ 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
+ "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:
@@ -326,6 +339,7 @@ STEP "Configure..." \
$build_cpp_lib \
$build_fortran \
$build_hl_lib \
+ $build_threadsafe \
$shared_lib \
$build_testing \
$build_tools \
@@ -343,8 +357,13 @@ STEP "Test the library and tools..." "ctest . -C Release $njobs" $testlog
# 7. Create an install image with this command:
STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
+# The implementation of installation is imcomplete (only works for linux).
+# Screen it out for now till it is completed.
+if false; then
# 8. Install with this command:
STEP "Install..." "INSTALL_HDF5" $installlog
+fi
+
# save the last exit code
exit_code=$?