From 519e23171052963775c47132ec0106727fdf5c41 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Mon, 9 Jun 2014 11:19:26 -0500 Subject: [svn-r25242] Bring revisions #24505 - #24670 from trunk to revise_chunks. Tested on jam, ostrich, koala, platypus. --- CMakeInstallation.cmake | 26 +- CMakeLists.txt | 17 +- MANIFEST | 2 - bin/cmakehdf5 | 121 ++++- config/cmake/CPack.cmake | 588 --------------------- config/cmake/ConfigureChecks.cmake | 7 + config/cmake/HDF518_Examples.cmake.in | 236 ++++----- config/cmake/HDF5Tests.c | 2 +- config/cmake/NSIS.template.in | 233 ++++---- config/cmake/xlatefile.c | 56 -- fortran/src/H5Fff_F03.f90 | 19 +- fortran/src/H5Sff.f90 | 4 +- fortran/test/tH5F_F03.f90 | 8 +- release_docs/INSTALL_CMake.txt | 61 +-- release_docs/RELEASE.txt | 28 +- src/H5AC.c | 90 ++-- src/H5HFman.c | 6 +- test/CMakeLists.txt | 1 + test/CMakeTests.cmake | 5 +- test/testerror.sh.in | 4 - test/testfiles/err_compat_1 | 3 - test/testfiles/err_compat_2 | 3 - test/testfiles/error_test_1 | 3 - test/testfiles/error_test_2 | 3 - test/testfiles/links_env.out | 3 - test/testhdf5.c | 7 +- testpar/t_dset.c | 31 +- testpar/t_mdset.c | 9 +- testpar/t_prop.c | 38 +- testpar/testphdf5.c | 18 +- tools/h5repack/CMakeTests.cmake | 44 +- tools/h5repack/h5repack.sh.in | 59 ++- tools/h5repack/h5repack_plugin.sh.in | 57 +- .../testfiles/deflate_limit.h5repack_layout.h5.ddl | 2 +- .../h5repack_layout.UD.h5-plugin_none.ddl | 2 +- .../testfiles/h5repack_layout.h5-plugin_test.ddl | 2 +- tools/h5stat/CMakeTests.cmake | 4 +- tools/h5stat/testfiles/h5stat_dims1.ddl | 3 - tools/h5stat/testfiles/h5stat_dims2.ddl | 3 - tools/h5stat/testfiles/h5stat_err1_dims.ddl | 3 - tools/h5stat/testfiles/h5stat_err1_links.ddl | 3 - tools/h5stat/testfiles/h5stat_err1_numattrs.ddl | 3 - tools/h5stat/testfiles/h5stat_err2_numattrs.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-F.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-UD.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-UT.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-d.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-dT.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-file.ddl | 3 - tools/h5stat/testfiles/h5stat_filters-g.ddl | 3 - tools/h5stat/testfiles/h5stat_filters.ddl | 3 - tools/h5stat/testfiles/h5stat_help1.ddl | 3 - tools/h5stat/testfiles/h5stat_help2.ddl | 3 - tools/h5stat/testfiles/h5stat_idx.ddl | 3 - tools/h5stat/testfiles/h5stat_links1.ddl | 3 - tools/h5stat/testfiles/h5stat_links2.ddl | 3 - tools/h5stat/testfiles/h5stat_links3.ddl | 3 - tools/h5stat/testfiles/h5stat_links4.ddl | 3 - tools/h5stat/testfiles/h5stat_links5.ddl | 3 - tools/h5stat/testfiles/h5stat_newgrat-UA.ddl | 3 - tools/h5stat/testfiles/h5stat_newgrat-UG.ddl | 3 - tools/h5stat/testfiles/h5stat_newgrat.ddl | 3 - tools/h5stat/testfiles/h5stat_nofile.ddl | 3 - tools/h5stat/testfiles/h5stat_notexist.ddl | 3 - tools/h5stat/testfiles/h5stat_numattrs1.ddl | 3 - tools/h5stat/testfiles/h5stat_numattrs2.ddl | 3 - tools/h5stat/testfiles/h5stat_numattrs3.ddl | 3 - tools/h5stat/testfiles/h5stat_numattrs4.ddl | 3 - tools/h5stat/testfiles/h5stat_tsohm.ddl | 3 - tools/h5stat/testh5stat.sh.in | 3 - tools/misc/testh5mkgrp.sh.in | 2 +- 71 files changed, 667 insertions(+), 1236 deletions(-) delete mode 100644 config/cmake/CPack.cmake delete mode 100644 config/cmake/xlatefile.c diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 5929380..0d071e7 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -142,7 +142,6 @@ ENDIF (HDF5_PACK_EXAMPLES) IF (NOT HDF5_EXTERNALLY_CONFIGURED) INSTALL ( FILES - ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS ${HDF5_SOURCE_DIR}/COPYING DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments @@ -204,7 +203,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") SET (CPACK_PACKAGE_VERSION_PATCH "") - SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${HDF5_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING") @@ -215,12 +214,23 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_GENERATOR "TGZ") IF (WIN32) LIST (APPEND CPACK_GENERATOR "NSIS") - SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${HDF5_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}") + # Installers for 32- vs. 64-bit CMake: + # - Root install directory (displayed to end user at installer-run time) + # - "NSIS package/display name" (text used in the installer GUI) + # - Registry key used to store info about the installation + IF (CMAKE_CL_64) + SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING} (Win64)") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE} (Win64)") + ELSE (CMAKE_CL_64) + SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE}") + ENDIF (CMAKE_CL_64) + SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}") SET (CPACK_NSIS_MODIFY_PATH ON) - SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}") ELSEIF (APPLE) LIST (APPEND CPACK_GENERATOR "DragNDrop") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) @@ -250,7 +260,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ENDIF(HDF5_PACK_MACOSX_BUNDLE) ELSE (WIN32) LIST (APPEND CPACK_GENERATOR "STGZ") - SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr") + SET (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries") @@ -288,6 +298,10 @@ The HDF5 data model, file format, API, library, and tools are open and distribut # SET (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec") ENDIF (WIN32) + # By default, do not warn when built on machines using only VS Express: + IF (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) + SET (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON) + ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS) INCLUDE(InstallRequiredSystemLibraries) SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/") diff --git a/CMakeLists.txt b/CMakeLists.txt index da003c5..d443d78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,6 +283,9 @@ ELSE (BUILD_SHARED_LIBS) IF (NOT WIN32) # should this be a user setting : Everyone uses it anyway ? ADD_DEFINITIONS (-DPIC) + IF (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + ADD_DEFINITIONS (-KPIC) + ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") ENDIF (NOT WIN32) ENDIF (BUILD_SHARED_LIBS) @@ -461,7 +464,11 @@ ENDIF (HDF5_DISABLE_COMPILER_WARNINGS) # break into groups (from the config/gnu-flags file) #----------------------------------------------------------------------------- IF (NOT MSVC) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline") + IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline") + ELSE (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=%none -DBSD_COMP") + ENDIF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") # Append warning flags # Don't use the '-Wtraditional' flag, we're way past having K&R C code # SET (H5_CFLAGS "${H5_CFLAGS} -Wtraditional") @@ -753,14 +760,6 @@ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") #----------------------------------------------------------------------------- -# Build utility to copy and strip X lines of file -#----------------------------------------------------------------------------- -IF (HDF5_BUILD_TOOLS AND BUILD_TESTING) - SET (XLATE_UTILITY "xlatefile") - ADD_EXECUTABLE(${XLATE_UTILITY} ${HDF5_RESOURCES_DIR}/xlatefile.c) -ENDIF (HDF5_BUILD_TOOLS AND BUILD_TESTING) - -#----------------------------------------------------------------------------- # Dashboard and Testing Settings #----------------------------------------------------------------------------- OPTION (BUILD_TESTING "Build HDF5 Unit Testing" OFF) diff --git a/MANIFEST b/MANIFEST index ff1baff..75a02ac 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2542,7 +2542,6 @@ ./config/cmake/GetTimeOfDayTest.cpp ./config/cmake/HDF5CXXTests.cpp ./config/cmake/HDF5Tests.c -./config/cmake/xlatefile.c ./config/cmake/CheckTypeSize.cmake ./config/cmake/H5cxx_config.h.in ./config/cmake/H5pubconf.h.in @@ -2565,7 +2564,6 @@ ./config/cmake/vfdTest.cmake ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake -./config/cmake/CPack.cmake ./config/cmake/CPack.Info.plist.in ./config/cmake/hdf.gif ./config/cmake/NSIS.template.in diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 97f45ed..e3ad541 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -3,13 +3,127 @@ # Author: Allen Byrne # Albert Cheng # Creation Date: Nov 2012 +# Modified: +# Changed to use the quick steps described in INSTALL_CMake.txt. (AKC 2014/1/1) -# Copyright: The HDF Group, 2012 +# Copyright: The HDF Group, 2012-14 -# Debug: remove the comment hash if you want DPRINT to do echo +# Debug Print: remove the comment hash if you want DPRINT to do echo DPRINT=: #DPRINT=echo +# use the ctest scripting method if --script is given +if [ "$1" != "--script" ]; then +# variable names +# The "extra" number is the step number and easier to see all logfiles in +# the sorted order of steps +progname=`basename $0` # program name +configlog="#${progname}_1config.log" +makelog="#${progname}_2build.log" +testlog="#${progname}_3test.log" +packlog="#${progname}_4pack.log" +installlog="#${progname}_5install.log" +srcdir="../hdf5" # expected source directory +exit_code=0 + +#============= +# Function definitions +#============= + +# Show user help page +HELP() +{ + echo "Usage: $progname [--script]" + echo " --script: Use the ctest scripting method of $progname" + echo "" +} + +# Display a time stamp +TIMESTAMP() +{ + echo "=====" "`date`" "=====" +} + + +# Do one step bracketed with time stamps +# The '< /dev/null' is needed to prevent some applications like MPI +# jobs blocked for reading when they read stdin unnecessary. +# $1 is banner message to be displayed. +# $2 is command to run +# $3 is logfile name for saving output from the command +STEP() +{ + banner="$1" + command="$2" + logfile="$3" + + echo "$banner" with output saved in $logfile + (TIMESTAMP; nerror=0 ; + echo "eval $command" + eval $command || nerror=1 ; + TIMESTAMP; exit $nerror) < /dev/null >> "$logfile" 2>&1 + if [ $? -ne 0 ]; then + echo "error in '$banner'. $progname aborted." + exit 1 + fi +} + + +#========== +# main +#========== + +# Show a start time stamp +TIMESTAMP + +# Always display the help page +HELP + +# Verify there is a valid hdf5 source directory present +if [ ! -d $srcdir ]; then + echo $srcdir not found. Aborted. + exit 1 +fi + +# figure out version information +vers=bin/h5vers +if [ ! -x $srcdir/$vers ]; then + echo $srcdir/$vers not found or not executable. Aborted. + exit 1 +fi +version=`cd $srcdir; $vers` +if [ $? != 0 ]; then + echo $vers failed. Aborted. + exit 1 +fi +echo Running Cmake for HDF5-${version} ... + +# 4. Configure the C library, tools and tests with this command: +STEP "Configure..." "cmake -G 'Unix Makefiles' -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5" $configlog + +# 3. Build the C library, tools and tests with this command: +STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog + +# 4. Test the C library and tools with this command: +STEP "Test the library and tools..." "ctest . -C Release" $testlog + +# 5. Create an install image with this command: +STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog + +# 6. Install with this command: +STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog +# save the last exit code +exit_code=$? + +# Show a closing time stamp +TIMESTAMP +exit $exit_code + +else +# --------------- +# older version +# --------------- + # variable names progname=`basename $0` # program name cminfile="cmakemin.$$" # Cmake minimum file @@ -260,3 +374,6 @@ else fi TIMESTAMP exit $exit_code + +fi + diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake deleted file mode 100644 index bdfa5b8..0000000 --- a/config/cmake/CPack.cmake +++ /dev/null @@ -1,588 +0,0 @@ -##section Variables common to all CPack generators -##end -##module -# - Build binary and source package installers. -# The CPack module generates binary and source installers in a variety -# of formats using the cpack program. Inclusion of the CPack module -# adds two new targets to the resulting makefiles, package and -# package_source, which build the binary and source installers, -# respectively. The generated binary installers contain everything -# installed via CMake's INSTALL command (and the deprecated -# INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands). -# -# For certain kinds of binary installers (including the graphical -# installers on Mac OS X and Windows), CPack generates installers that -# allow users to select individual application components to -# install. See CPackComponent module for that. -# -# The CPACK_GENERATOR variable has different meanings in different -# contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a -# *list of generators*: when run with no other arguments, CPack -# will iterate over that list and produce one package for each -# generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR -# is a *string naming a single generator*. If you need per-cpack- -# generator logic to control *other* cpack settings, then you need -# a CPACK_PROJECT_CONFIG_FILE. -# -# The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE. -# See the top level file CMakeCPackOptions.cmake.in for an example. -# -# If set, the CPACK_PROJECT_CONFIG_FILE is included automatically -# on a per-generator basis. It only need contain overrides. -# -# Here's how it works: -# - cpack runs -# - it includes CPackConfig.cmake -# - it iterates over the generators listed in that file's -# CPACK_GENERATOR list variable (unless told to use just a -# specific one via -G on the command line...) -# -# - foreach generator, it then -# - sets CPACK_GENERATOR to the one currently being iterated -# - includes the CPACK_PROJECT_CONFIG_FILE -# - produces the package for that generator -# -# This is the key: For each generator listed in CPACK_GENERATOR -# in CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR -# internally to *the one currently being used* and then include -# the CPACK_PROJECT_CONFIG_FILE. -# -# Before including this CPack module in your CMakeLists.txt file, -# there are a variety of variables that can be set to customize -# the resulting installers. The most commonly-used variables are: -##end -# -##variable -# CPACK_PACKAGE_NAME - The name of the package (or application). If -# not specified, defaults to the project name. -##end -# -##variable -# CPACK_PACKAGE_VENDOR - The name of the package vendor. (e.g., -# "Kitware"). -##end -# -##variable -# CPACK_PACKAGE_DIRECTORY - The directory in which CPack is doing its -# packaging. If it is not set then this will default (internally) to the -# build dir. This variable may be defined in CPack config file or from -# the cpack command line option "-B". If set the command line option -# override the value found in the config file. -##end -# -##variable -# CPACK_PACKAGE_VERSION_MAJOR - Package major Version -##end -# -##variable -# CPACK_PACKAGE_VERSION_MINOR - Package minor Version -##end -# -##variable -# CPACK_PACKAGE_VERSION_PATCH - Package patch Version -##end -# -##variable -# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the -# project. Used, for example, the introduction screen of a -# CPack-generated Windows installer to describe the project. -##end -# -##variable -# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the -# project (only a few words). -##end -# -##variable -# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate, -# not including the extension. For example, cmake-2.6.1-Linux-i686. -# The default value is -# -# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}. -##end -# -##variable -# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the -# target system. This may be used by some CPack generators -# like NSIS to create an installation directory e.g., "CMake 2.5" -# below the installation prefix. All installed element will be -# put inside this directory. -##end -# -##variable -# CPACK_PACKAGE_ICON - A branding image that will be displayed inside -# the installer (used by GUI installers). -##end -# -##variable -# CPACK_PROJECT_CONFIG_FILE - CPack-time project CPack configuration -# file. This file included at cpack time, once per -# generator after CPack has set CPACK_GENERATOR to the actual generator -# being used. It allows per-generator setting of CPACK_* variables at -# cpack time. -##end -# -##variable -# CPACK_RESOURCE_FILE_LICENSE - License to be embedded in the installer. It -# will typically be displayed to the user by the produced installer -# (often with an explicit "Accept" button, for graphical installers) -# prior to installation. This license file is NOT added to installed -# file but is used by some CPack generators like NSIS. If you want -# to install a license file (may be the same as this one) -# along with your project you must add an appropriate CMake INSTALL -# command in your CMakeLists.txt. -##end -# -##variable -# CPACK_RESOURCE_FILE_README - ReadMe file to be embedded in the installer. It -# typically describes in some detail the purpose of the project -# during the installation. Not all CPack generators uses -# this file. -##end -# -##variable -# CPACK_RESOURCE_FILE_WELCOME - Welcome file to be embedded in the -# installer. It welcomes users to this installer. -# Typically used in the graphical installers on Windows and Mac OS X. -##end -# -##variable -# CPACK_MONOLITHIC_INSTALL - Disables the component-based -# installation mechanism. When set the component specification is ignored -# and all installed items are put in a single "MONOLITHIC" package. -# Some CPack generators do monolithic packaging by default and -# may be asked to do component packaging by setting -# CPACK__COMPONENT_INSTALL to 1/TRUE. -##end -# -##variable -# CPACK_GENERATOR - List of CPack generators to use. If not -# specified, CPack will create a set of options CPACK_BINARY_ (e.g., -# CPACK_BINARY_NSIS) allowing the user to enable/disable individual -# generators. This variable may be used on the command line -# as well as in: -# -# cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree -##end -# -##variable -# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack binary configuration -# file. This file is the CPack configuration generated by the CPack module -# for binary installers. Defaults to CPackConfig.cmake. -##end -# -##variable -# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables and associated -# text label to be used to create Start Menu shortcuts. For example, -# setting this to the list ccmake;CMake will -# create a shortcut named "CMake" that will execute the installed -# executable ccmake. Not all CPack generators use it (at least NSIS and -# OSXX11 do). -##end -# -##variable -# CPACK_STRIP_FILES - List of files to be stripped. Starting with -# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which -# enables stripping of all files (a list of files evaluates to TRUE -# in CMake, so this change is compatible). -##end -# -# The following CPack variables are specific to source packages, and -# will not affect binary packages: -# -##variable -# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package. For -# example cmake-2.6.1. -##end -# -##variable -# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that -# will be stripped. Starting with CMake 2.6.0 -# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables -# stripping of all files (a list of files evaluates to TRUE in CMake, -# so this change is compatible). -##end -# -##variable -# CPACK_SOURCE_GENERATOR - List of generators used for the source -# packages. As with CPACK_GENERATOR, if this is not specified then -# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP) -# allowing users to select which packages will be generated. -##end -# -##variable -# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack source -# configuration file. This file is the CPack configuration generated by the -# CPack module for source installers. Defaults to CPackSourceConfig.cmake. -##end -# -##variable -# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree -# that won't be packaged when building a source package. This is a -# list of regular expression patterns (that must be properly escaped), -# e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.* -##end -# -# The following variables are for advanced uses of CPack: -# -##variable -# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the -# project is CMake project. Defaults to the value of CMAKE_GENERATOR -# few users will want to change this setting. -##end -# -##variable -# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify -# what project to install. The four values are: Build directory, -# Project Name, Project Component, Directory. If omitted, CPack will -# build an installer that installers everything. -##end -# -##variable -# CPACK_SYSTEM_NAME - System name, defaults to the value of -# ${CMAKE_SYSTEM_NAME}. -##end -# -##variable -# CPACK_PACKAGE_VERSION - Package full version, used internally. By -# default, this is built from CPACK_PACKAGE_VERSION_MAJOR, -# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH. -##end -# -##variable -# CPACK_TOPLEVEL_TAG - Directory for the installed files. -##end -# -##variable -# CPACK_INSTALL_COMMANDS - Extra commands to install components. -##end -# -##variable -# CPACK_INSTALLED_DIRECTORIES - Extra directories to install. -##end -# -##variable -# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when -# installing this project. This is only used -# by installer for Windows. -##end -##variable -# CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create. -##end -# - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Define this var in order to avoid (or warn) concerning multiple inclusion -if(CPack_CMake_INCLUDED) - message(WARNING "CPack.cmake has already been included!!") -else() - set(CPack_CMake_INCLUDED 1) -endif() - -# Pick a configuration file -set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in") -if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in") - set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in") -endif() -set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in") -if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in") - set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in") -endif() - -# Backward compatibility -# Include CPackComponent macros if it has not already been included before. -include(CPackComponent) - -# Macro for setting values if a user did not overwrite them -macro(cpack_set_if_not_set name value) - if(NOT DEFINED "${name}") - set(${name} "${value}") - endif() -endmacro() - -# cpack_encode_variables - Macro to encode variables for the configuration file -# find any variable that starts with CPACK and create a variable -# _CPACK_OTHER_VARIABLES_ that contains SET commands for -# each cpack variable. _CPACK_OTHER_VARIABLES_ is then -# used as an @ replacment in configure_file for the CPackConfig. -macro(cpack_encode_variables) - set(_CPACK_OTHER_VARIABLES_) - get_cmake_property(res VARIABLES) - foreach(var ${res}) - if("xxx${var}" MATCHES "xxxCPACK") - set(_CPACK_OTHER_VARIABLES_ - "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")") - endif() - endforeach() -endmacro() - -# Set the package name -cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MAJOR "0") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MINOR "1") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION_PATCH "1") -cpack_set_if_not_set(CPACK_PACKAGE_VERSION - "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") -cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity") -cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "${CMAKE_PROJECT_NAME} built using CMake") - -cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE - "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE - "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_README - "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") -cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME - "${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt") - -cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}") - -if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL) - set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) -endif() - -if(CPACK_NSIS_MODIFY_PATH) - set(CPACK_NSIS_MODIFY_PATH ON) -endif() - -set(__cpack_system_name ${CMAKE_SYSTEM_NAME}) -if(${__cpack_system_name} MATCHES Windows) - if(CMAKE_CL_64) - set(__cpack_system_name win64) - else() - set(__cpack_system_name win32) - endif() -endif() -cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}") - -# Root dir: default value should be the string literal "$PROGRAMFILES" -# for backwards compatibility. Projects may set this value to anything. -if(CMAKE_CL_64) -set(__cpack_root_default "$PROGRAMFILES64") -else() -set(__cpack_root_default "$PROGRAMFILES") -endif() -cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}") - -# -..--. -cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") -cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY - "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") -cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY - "${CPACK_PACKAGE_INSTALL_DIRECTORY}") -cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/") -cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true") - -# always force to exactly "true" or "false" for CPack.Info.plist.in: -if(CPACK_PACKAGE_RELOCATABLE) - set(CPACK_PACKAGE_RELOCATABLE "true") -else() - set(CPACK_PACKAGE_RELOCATABLE "false") -endif() - -macro(cpack_check_file_exists file description) - if(NOT EXISTS "${file}") - message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.") - endif() -endmacro() - -cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource") -cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource") - -macro(cpack_optional_append _list _cond _item) - if(${_cond}) - set(${_list} ${${_list}} ${_item}) - endif() -endmacro() - -##variable -# CPACK_BINARY_ - CPack generated options for binary generators. The -# CPack.cmake module generates (when CPACK_GENERATOR is not set) -# a set of CMake options (see CMake option command) which may then be used to -# select the CPack generator(s) to be used when launching the package target. -##end -# Provide options to choose generators -# we might check here if the required tools for the generates exist -# and set the defaults according to the results -if(NOT CPACK_GENERATOR) - if(UNIX) - if(CYGWIN) - option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON) - else() - if(APPLE) - option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF) - option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF) - option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON) - option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF) - else() - option(CPACK_BINARY_TZ "Enable to build TZ packages" ON) - endif() - option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON) - option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON) - option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF) - option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF) - option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF) - option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF) - endif() - else() - option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) - option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF) - option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF) - endif() - - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) - -endif() - -# Provide options to choose source generators -if(NOT CPACK_SOURCE_GENERATOR) - if(UNIX) - if(CYGWIN) - option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON) - else() - option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON) - option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON) - option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON) - option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF) - endif() - else() - option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON) - endif() - - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ) - cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP) -endif() - -# mark the above options as advanced -mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 - CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 - CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ - CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE - CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ - CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP) - -# Set some other variables -cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS - "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/") -cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}") -cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}") -# if the user has set CPACK_NSIS_DISPLAY_NAME remember it -if(DEFINED CPACK_NSIS_DISPLAY_NAME) - set(CPACK_NSIS_DISPLAY_NAME_SET TRUE) -endif() -# if the user has set CPACK_NSIS_DISPLAY -# explicitly, then use that as the default -# value of CPACK_NSIS_PACKAGE_NAME instead -# of CPACK_PACKAGE_INSTALL_DIRECTORY -cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") - -if(CPACK_NSIS_DISPLAY_NAME_SET) - string(REPLACE "\\" "\\\\" - _NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}") - cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}") -else() - cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") -endif() - -cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE - "${CMAKE_BINARY_DIR}/CPackConfig.cmake") - -cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE - "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake") - -cpack_set_if_not_set(CPACK_SET_DESTDIR OFF) -cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") -cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") - -# WiX specific variables -cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}") - -if(DEFINED CPACK_COMPONENTS_ALL) - if(CPACK_MONOLITHIC_INSTALL) - message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.") - set(CPACK_COMPONENTS_ALL) - else() - # The user has provided the set of components to be installed as - # part of a component-based installation; trust her. - set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE) - endif() -else() - # If the user has not specifically requested a monolithic installer - # but has specified components in various "install" commands, tell - # CPack about those components. - if(NOT CPACK_MONOLITHIC_INSTALL) - get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) - list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN) - if(CPACK_COMPONENTS_LEN EQUAL 1) - # Only one component: this is not a component-based installation - # (at least, it isn't a component-based installation, but may - # become one later if the user uses the cpack_add_* commands). - set(CPACK_COMPONENTS_ALL) - endif() - set(CPACK_COMPONENTS_LEN) - endif() -endif() - -# CMake always generates a component named "Unspecified", which is -# used to install everything that doesn't have an explicitly-provided -# component. Since these files should always be installed, we'll make -# them hidden and required. -set(CPACK_COMPONENT_UNSPECIFIED_HIDDEN TRUE) -set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED TRUE) - -cpack_encode_variables() -configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) - -# Generate source file -cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES - "${CMAKE_SOURCE_DIR};/") -cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source") -cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source") -cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES - "/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#") -set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}") -set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}") -set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}") -set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}") -set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") -set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}") -set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}") - -cpack_encode_variables() -configure_file("${cpack_source_input_file}" - "${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 769483e..48bff74 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -33,6 +33,11 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET (H5_HAVE_DARWIN 1) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +# Check for Solaris +IF(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + SET (H5_HAVE_SOLARIS 1) +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + #----------------------------------------------------------------------------- # Option to Clear File Buffers before write --enable-clear-file-buffers #----------------------------------------------------------------------------- @@ -433,6 +438,7 @@ SET (LINUX_LFS 0) SET (HDF5_EXTRA_C_FLAGS) SET (HDF5_EXTRA_FLAGS) IF (NOT WINDOWS) + IF(NOT H5_HAVE_SOLARIS) # Linux Specific flags # This was originally defined as _POSIX_SOURCE which was updated to # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX @@ -474,6 +480,7 @@ IF (NOT WINDOWS) ENDIF (TEST_LFS_WORKS_COMPILE) ENDIF (HDF5_ENABLE_LARGE_FILE) SET (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF5_EXTRA_FLAGS}) + ENDIF(NOT H5_HAVE_SOLARIS) ENDIF (NOT WINDOWS) ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS}) diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index c6be9ff..1883d3e 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -1,119 +1,119 @@ -cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) -############################################################################################################### -# This script will build and run the examples from a compressed file -# Execute from a command line: -# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log -############################################################################################################### - -set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/@HDF5_PACKAGE_VERSION@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") -set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) -set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) -set(CTEST_BUILD_CONFIGURATION "Release") -#set(NO_MAC_FORTRAN "true") -#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") -#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON) - -############################################################################################################### -# Adjust the following SET Commands as needed -############################################################################################################### -if(WIN32) - if(STATICLIBRARIES) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF") - endif(STATICLIBRARIES) - set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else(WIN32) - if(STATICLIBRARIES) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - endif(STATICLIBRARIES) - set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5") - set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif(WIN32) - -############################################################################################################### -# For any comments please contact cdashhelp@hdfgroup.org -# -############################################################################################################### - -#----------------------------------------------------------------------------- -# MAC machines need special option -#----------------------------------------------------------------------------- -if(APPLE) - # Compiler choice - execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) - set(ENV{CC} "${XCODE_CC}") - set(ENV{CXX} "${XCODE_CXX}") - if(NOT NO_MAC_FORTRAN) - # Shared fortran is not supported, build static - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") - else(NOT NO_MAC_FORTRAN) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") - endif(NOT NO_MAC_FORTRAN) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif(APPLE) - -#----------------------------------------------------------------------------- -set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") -## Uncompress source in tar file provided -## -------------------------- -if(WIN32) - set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") - message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") - execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) -else(WIN32) - message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") - execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) -endif(WIN32) - -if(NOT rv EQUAL 0) - message("extracting... [error-(${rv}) clean up]") - file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") - message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") -endif(NOT rv EQUAL 0) - -#----------------------------------------------------------------------------- -## Clear the build directory -## -------------------------- -set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) -file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) - -# Use multiple CPU cores to build -include(ProcessorCount) -ProcessorCount(N) -if(NOT N EQUAL 0) - if(NOT WIN32) - set(CTEST_BUILD_FLAGS -j${N}) - endif(NOT WIN32) - set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) -endif() -set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" -) - -#----------------------------------------------------------------------------- -## -- set output to english -set($ENV{LC_MESSAGES} "en_EN") - -#----------------------------------------------------------------------------- - ## NORMAL process - ## -------------------------- - CTEST_START (Experimental) - CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") - CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") - CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) - CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) - if(res GREATER 0) - message (FATAL_ERROR "tests FAILED") - endif(res GREATER 0) -#----------------------------------------------------------------------------- -############################################################################################################## +cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) +############################################################################################################### +# This script will build and run the examples from a compressed file +# Execute from a command line: +# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log +############################################################################################################### + +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") +set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) +set(CTEST_BUILD_CONFIGURATION "Release") +#set(NO_MAC_FORTRAN "true") +#set(BUILD_OPTIONS ""${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF") +#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON) + +############################################################################################################### +# Adjust the following SET Commands as needed +############################################################################################################### +if(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +else(WIN32) + if(STATICLIBRARIES) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + endif(STATICLIBRARIES) + set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5") + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif(WIN32) + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +#----------------------------------------------------------------------------- +# MAC machines need special option +#----------------------------------------------------------------------------- +if(APPLE) + # Compiler choice + execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set(ENV{CC} "${XCODE_CC}") + set(ENV{CXX} "${XCODE_CXX}") + if(NOT NO_MAC_FORTRAN) + # Shared fortran is not supported, build static + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC") + else(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF") + endif(NOT NO_MAC_FORTRAN) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif(APPLE) + +#----------------------------------------------------------------------------- +set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +## Uncompress source in tar file provided +## -------------------------- +if(WIN32) + set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe") + message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]") + execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv) +else(WIN32) + message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]") + execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv) +endif(WIN32) + +if(NOT rv EQUAL 0) + message("extracting... [error-(${rv}) clean up]") + file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed") +endif(NOT rv EQUAL 0) + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +# Use multiple CPU cores to build +include(ProcessorCount) +ProcessorCount(N) +if(NOT N EQUAL 0) + if(NOT WIN32) + set(CTEST_BUILD_FLAGS -j${N}) + endif(NOT WIN32) + set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) + +#----------------------------------------------------------------------------- +## -- set output to english +set($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- + ## NORMAL process + ## -------------------------- + CTEST_START (Experimental) + CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") + CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}") + CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND) + CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) + if(res GREATER 0) + message (FATAL_ERROR "tests FAILED") + endif(res GREATER 0) +#----------------------------------------------------------------------------- +############################################################################################################## message("DONE") \ No newline at end of file diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c index 2f69ec8..21206e0 100644 --- a/config/cmake/HDF5Tests.c +++ b/config/cmake/HDF5Tests.c @@ -377,10 +377,10 @@ int main(int argc, char **argv) #endif #ifdef GETTIMEOFDAY_GIVES_TZ +#include #ifdef HAVE_SYS_TIME_H #include #endif -#include int main(void) { struct timeval tv; diff --git a/config/cmake/NSIS.template.in b/config/cmake/NSIS.template.in index f28db0f..ecced05 100644 --- a/config/cmake/NSIS.template.in +++ b/config/cmake/NSIS.template.in @@ -25,7 +25,7 @@ !include "MUI.nsh" ;Default installation folder - InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_DIRECTORY@\@CPACK_PACKAGE_VERSION@" + InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ;-------------------------------- ;General @@ -37,7 +37,7 @@ ;Set compression SetCompressor @CPACK_NSIS_COMPRESSOR@ -@CPACK_NSIS_DEFINES@ +@CPACK_NSIS_DEFINES@ !include Sections.nsh @@ -71,10 +71,10 @@ Var AR_RegFlags ; This macro reads component installed flag from the registry and ;changes checked state of the section on the components page. ;Input: section index constant name specified in Section command. - + ClearErrors ;Reading component status from registry - ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed" + ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed" IfErrors "default_${SecName}" ;Status will stay default if registry value not found ;(component was never installed) @@ -86,20 +86,20 @@ Var AR_RegFlags ; Note whether this component was installed before !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags IntOp $R0 $AR_RegFlags & $AR_RegFlags - + ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags - + "default_${SecName}:" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend - + !macro FinishSection SecName ; This macro reads section flag set by user and removes the section ;if it is not selected. ;Then it writes component installed flag to registry ;Input: section index constant name specified in Section command. - + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags ;Checking lowest bit: IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED} @@ -107,23 +107,23 @@ Var AR_RegFlags ;Section is not selected: ;Calling Section uninstall macro and writing zero installed flag !insertmacro "Remove_${${SecName}}" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \ + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 0 Goto "exit_${SecName}" - + "leave_${SecName}:" ;Section is selected: - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \ + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 1 - + "exit_${SecName}:" !macroend - -!macro RemoveSection SecName + +!macro RemoveSection_CPack SecName ; This macro is used to call section's Remove_... macro ;from the uninstaller. ;Input: section index constant name specified in Section command. - + !insertmacro "Remove_${${SecName}}" !macroend @@ -132,18 +132,18 @@ Var AR_RegFlags !insertmacro LoadVar ${SecName}_selected SectionGetFlags ${${SecName}} $R1 IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits - + ; See if the status has changed: IntCmp $R0 $R1 "${SecName}_unchanged" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected - + IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected" !insertmacro "Deselect_required_by_${SecName}" goto "${SecName}_unchanged" - + "${SecName}_was_selected:" !insertmacro "Select_${SecName}_depends" - + "${SecName}_unchanged:" !macroend ;--- End of Add/Remove macros --- @@ -153,7 +153,7 @@ Var AR_RegFlags !define MUI_HEADERIMAGE !define MUI_ABORTWARNING - + ;-------------------------------- ; path functions @@ -168,7 +168,7 @@ Var AR_RegFlags !include "WinMessages.NSH" !verbose 4 ;==================================================== -; get_NT_environment +; get_NT_environment ; Returns: the selected environment ; Output : head of the stack ;==================================================== @@ -198,22 +198,22 @@ FunctionEnd !define WriteEnvStr_RegKey 'HKCU "Environment"' !endif !endif - + ; AddToPath - Adds the given dir to the search path. ; Input - head of the stack ; Note - Win9x systems requires reboot - + Function AddToPath Exch $0 Push $1 Push $2 Push $3 - + # don't add if the path doesn't exist IfFileExists "$0\*.*" "" AddToPath_done - + ReadEnvStr $1 PATH - ; if the path is too long for a NSIS variable NSIS will return a 0 + ; if the path is too long for a NSIS variable NSIS will return a 0 ; length string. If we find that, then warn and skip any path ; modification as it will trash the existing path. StrLen $2 $1 @@ -243,7 +243,7 @@ Function AddToPath Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done - + Call IsNT Pop $1 StrCmp $1 1 AddToPath_NT @@ -258,7 +258,7 @@ Function AddToPath FileClose $1 SetRebootFlag true Goto AddToPath_done - + AddToPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" @@ -279,7 +279,7 @@ Function AddToPath WriteRegExpandStr ${NT_all_env} "PATH" $0 DoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - + AddToPath_done: Pop $3 Pop $2 @@ -287,10 +287,10 @@ Function AddToPath Pop $0 FunctionEnd - + ; RemoveFromPath - Remove a given dir from the path ; Input: head of the stack - + Function un.RemoveFromPath Exch $0 Push $1 @@ -299,9 +299,9 @@ Function un.RemoveFromPath Push $4 Push $5 Push $6 - + IntFmt $6 "%c" 26 # DOS EOF - + Call un.IsNT Pop $1 StrCmp $1 1 unRemoveFromPath_NT @@ -313,7 +313,7 @@ Function un.RemoveFromPath GetFullPathName /SHORT $0 $0 StrCpy $0 "SET PATH=%PATH%;$0" Goto unRemoveFromPath_dosLoop - + unRemoveFromPath_dosLoop: FileRead $1 $3 StrCpy $5 $3 1 -1 # read last char @@ -328,7 +328,7 @@ Function un.RemoveFromPath unRemoveFromPath_dosLoopRemoveLine: SetRebootFlag true Goto unRemoveFromPath_dosLoop - + unRemoveFromPath_dosLoopEnd: FileClose $2 FileClose $1 @@ -337,7 +337,7 @@ Function un.RemoveFromPath CopyFiles /SILENT $4 "$1\autoexec.bat" Delete $4 Goto unRemoveFromPath_done - + unRemoveFromPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" @@ -361,11 +361,11 @@ Function un.RemoveFromPath StrCpy $5 $1 -$4 # $5 is now the part before the path to remove StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove StrCpy $3 $5$6 - + StrCpy $5 $3 1 -1 # copy last char StrCmp $5 ";" 0 +2 # if last char == ; StrCpy $3 $3 -1 # remove last char - + StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $3 Goto unDoSend @@ -373,7 +373,7 @@ Function un.RemoveFromPath WriteRegExpandStr ${NT_all_env} "PATH" $3 unDoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 - + unRemoveFromPath_done: Pop $6 Pop $5 @@ -383,7 +383,7 @@ Function un.RemoveFromPath Pop $1 Pop $0 FunctionEnd - + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Uninstall sutff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -391,7 +391,7 @@ FunctionEnd ########################################### # Utility Functions # ########################################### - + ;==================================================== ; IsNT - Returns 1 if the current system is NT, 0 ; otherwise. @@ -405,7 +405,7 @@ FunctionEnd ; Call IsNT ; Pop $R0 ; ($R0 at this point is 1 or 0) - + !macro IsNT un Function ${un}IsNT Push $0 @@ -415,7 +415,7 @@ Function ${un}IsNT Pop $0 Push 0 Return - + IsNT_yes: ; NT!!! Pop $0 @@ -424,7 +424,7 @@ FunctionEnd !macroend !insertmacro IsNT "" !insertmacro IsNT "un." - + ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in @@ -437,7 +437,7 @@ FunctionEnd ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") - + !macro StrStr un Function ${un}StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle @@ -472,28 +472,28 @@ FunctionEnd !insertmacro StrStr "un." Function Trim ; Added by Pelaca - Exch $R1 - Push $R2 + Exch $R1 + Push $R2 Loop: - StrCpy $R2 "$R1" 1 -1 - StrCmp "$R2" " " RTrim - StrCmp "$R2" "$\n" RTrim - StrCmp "$R2" "$\r" RTrim - StrCmp "$R2" ";" RTrim - GoTo Done -RTrim: - StrCpy $R1 "$R1" -1 - Goto Loop + StrCpy $R2 "$R1" 1 -1 + StrCmp "$R2" " " RTrim + StrCmp "$R2" "$\n" RTrim + StrCmp "$R2" "$\r" RTrim + StrCmp "$R2" ";" RTrim + GoTo Done +RTrim: + StrCpy $R1 "$R1" -1 + Goto Loop Done: - Pop $R2 - Exch $R1 + Pop $R2 + Exch $R1 FunctionEnd Function ConditionalAddToRegisty Pop $0 Pop $1 StrCmp "$0" "" ConditionalAddToRegisty_EmptyString - WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \ + WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \ "$1" "$0" ;MessageBox MB_OK "Set Registry: '$1' to '$0'" DetailPrint "Set install registry entry: '$1' to '$0'" @@ -516,7 +516,7 @@ Function DownloadFile try_again: NSISdl::download "$1/$0" "$INSTDIR\$0" - + Pop $1 StrCmp $1 "success" success StrCmp $1 "Cancelled" cancel @@ -549,10 +549,10 @@ FunctionEnd !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@" Page custom InstallOptionsPage !insertmacro MUI_PAGE_DIRECTORY - + ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER @@ -637,11 +637,12 @@ Section "-Core installation" ;Use the entire tree produced by the INSTALL target. Keep the ;list of directories here in sync with the RMDir commands below. SetOutPath "$INSTDIR" + @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@ @CPACK_NSIS_FULL_INSTALL@ - + ;Store installation folder WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR - + ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" Push "DisplayName" @@ -659,7 +660,7 @@ Section "-Core installation" Push "NoRepair" Push "1" Call ConditionalAddToRegisty - + !ifdef CPACK_NSIS_ADD_REMOVE ;Create add/remove functionality Push "ModifyPath" @@ -670,7 +671,7 @@ Section "-Core installation" Push "1" Call ConditionalAddToRegisty !endif - + ; Optional registration Push "DisplayIcon" Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@" @@ -686,7 +687,7 @@ Section "-Core installation" Call ConditionalAddToRegisty !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - + ;Create shortcuts CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" @CPACK_NSIS_CREATE_ICONS@ @@ -724,7 +725,7 @@ SectionEnd Section "-Add to path" Push $INSTDIR\bin StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath - StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 + StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 Call AddToPath doNotAddToPath: SectionEnd @@ -755,12 +756,12 @@ Function un.onInit SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' Goto done - + noLM: ;Get installation folder from registry if available done: - + FunctionEnd ;--- Add/Remove callback functions: --- @@ -769,25 +770,25 @@ FunctionEnd ;List all of your components in following manner here. @CPACK_NSIS_COMPONENT_SECTION_LIST@ !macroend - + Section -FinishComponents ;Removes unselected components and writes component status to registry !insertmacro SectionList "FinishSection" - -!ifdef CPACK_NSIS_ADD_REMOVE + +!ifdef CPACK_NSIS_ADD_REMOVE ; Get the name of the installer executable System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1' StrCpy $R3 $R0 - + ; Strip off the last 13 characters, to see if we have AddRemove.exe StrLen $R1 $R0 IntOp $R1 $R0 - 13 StrCpy $R2 $R0 13 $R1 StrCmp $R2 "AddRemove.exe" addremove_installed - + ; We're not running AddRemove.exe, so install it CopyFiles $R3 $INSTDIR\AddRemove.exe - + addremove_installed: !endif SectionEnd @@ -804,17 +805,17 @@ FunctionEnd Section "Uninstall" ReadRegStr $START_MENU SHCTX \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu" + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu" ;MessageBox MB_OK "Start menu is in: $START_MENU" ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath" + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath" ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers" + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers" ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser" + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser" ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS" ReadRegStr $INSTALL_DESKTOP SHCTX \ - "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop" + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop" ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP " @CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@ @@ -824,14 +825,14 @@ Section "Uninstall" @CPACK_NSIS_DELETE_FILES@ @CPACK_NSIS_DELETE_DIRECTORIES@ -!ifdef CPACK_NSIS_ADD_REMOVE +!ifdef CPACK_NSIS_ADD_REMOVE ;Remove the add/remove program Delete "$INSTDIR\AddRemove.exe" !endif ;Remove the uninstaller itself. Delete "$INSTDIR\Uninstall.exe" - DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" + DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ;Remove the installation directory if it is empty. RMDir "$INSTDIR" @@ -840,24 +841,24 @@ Section "Uninstall" DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ; Removes all optional components - !insertmacro SectionList "RemoveSection" - + !insertmacro SectionList "RemoveSection_CPack" + !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ - + ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - + startMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - + IfErrors startMenuDeleteLoopDone - + StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop startMenuDeleteLoopDone: @@ -866,17 +867,17 @@ Section "Uninstall" StrCpy $MUI_TEMP "$START_MENU" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ - + ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - + secondStartMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - + IfErrors secondStartMenuDeleteLoopDone - + StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop secondStartMenuDeleteLoopDone: @@ -899,22 +900,46 @@ SectionEnd ; "Program Files" for AllUsers, "My Documents" for JustMe... Function .onInit + StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst + + ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString" + StrCmp $0 "" inst + + MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ + "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \ + IDYES uninst IDNO inst + Abort + +;Run the uninstaller +uninst: + ClearErrors + StrLen $2 "\Uninstall.exe" + StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path + ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file + + IfErrors uninst_failed inst +uninst_failed: + MessageBox MB_OK|MB_ICONSTOP "Uninstall failed." + Abort + + +inst: ; Reads components status for registry !insertmacro SectionList "InitSection" - ; check to see if /D has been used to change - ; the install directory by comparing it to the + ; check to see if /D has been used to change + ; the install directory by comparing it to the ; install directory that is expected to be the ; default StrCpy $IS_DEFAULT_INSTALLDIR 0 - StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_DIRECTORY@\@CPACK_PACKAGE_VERSION@" 0 +2 + StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2 StrCpy $IS_DEFAULT_INSTALLDIR 1 - + StrCpy $SV_ALLUSERS "JustMe" ; if default install dir then change the default ; if it is installed for JustMe StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 - StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_DIRECTORY@\@CPACK_PACKAGE_VERSION@" + StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ClearErrors UserInfo::GetName @@ -922,17 +947,17 @@ Function .onInit Pop $0 UserInfo::GetAccountType Pop $1 - StrCmp $1 "Admin" 0 +3 + StrCmp $1 "Admin" 0 +4 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Admin group' StrCpy $SV_ALLUSERS "AllUsers" Goto done - StrCmp $1 "Power" 0 +3 + StrCmp $1 "Power" 0 +4 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' StrCpy $SV_ALLUSERS "AllUsers" Goto done - + noLM: StrCpy $SV_ALLUSERS "AllUsers" ;Get installation folder from registry if available @@ -940,7 +965,7 @@ Function .onInit done: StrCmp $SV_ALLUSERS "AllUsers" 0 +3 StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 - StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_DIRECTORY@\@CPACK_PACKAGE_VERSION@" + StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini" diff --git a/config/cmake/xlatefile.c b/config/cmake/xlatefile.c deleted file mode 100644 index e220289..0000000 --- a/config/cmake/xlatefile.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include - -#define BUFFERSIZE 1024 - -int main(int argc, char *argv[]) { - FILE *infile = NULL; - FILE *outfile = NULL; - char *buffer = NULL; - char argbuf[8]; - size_t bytes = 0; - size_t idx = 0; - unsigned int lineidx = 0; - unsigned int stripXlines = 3; - - if(argc < 3) - exit(1); - if(NULL == (infile = fopen(argv[1], "rb"))) - exit(2); - if(NULL == (outfile = fopen(argv[2], "wb+"))) - exit(3); - if(argc > 3) - if(argv[3][0] == '-') - if(argv[3][1] == 'l') { - strcpy(argbuf, &argv[3][2]); - stripXlines = atoi(argbuf); - } - buffer = (char*)malloc(BUFFERSIZE); - if(buffer) { - while(!feof(infile)) { - /* read the file into the buffer. */ - bytes = fread(buffer, 1, BUFFERSIZE, infile); - if(lineidx < stripXlines) { - for(idx = 0; idx < bytes; idx++) { - if(buffer[idx] == '\n') { - lineidx++; - if(buffer[idx+1] == '\r') - idx++; - } - if(lineidx >= stripXlines) { - fwrite(&buffer[idx+1], 1, bytes-idx-1, outfile); - idx = bytes; - } - } - } - else - fwrite(buffer, 1, bytes, outfile); - } - free(buffer); - } - fclose(outfile); - fclose(infile); - - return 0; -} diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90 index 1ccd39a..83d46be 100644 --- a/fortran/src/H5Fff_F03.f90 +++ b/fortran/src/H5Fff_F03.f90 @@ -46,16 +46,17 @@ CONTAINS ! PURPOSE ! Retrieves a copy of the image of an existing, open file. ! -! Inputs: +! INPUTS ! file_id - Target file identifier. ! buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied. ! buf_len - Size of the supplied buffer. ! -! Outputs: +! OUTPUTS ! hdferr - error code: ! 0 on success and -1 on failure -! Optional: -! buf_size - The size in bytes of the buffer required to store the file image. +! OPTIONAL PARAMETERS +! buf_size - Returns the size in bytes of the buffer required to store the file image, +! no data will be copied. ! ! AUTHOR ! M. Scot Breitenfeld @@ -65,11 +66,11 @@ CONTAINS SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) USE, INTRINSIC :: ISO_C_BINDING IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: file_id - TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr - INTEGER(SIZE_T) , INTENT(IN) :: buf_len - INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: buf_size - INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) :: file_id + TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER , INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size !***** INTEGER(SIZE_T) :: buf_size_default diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 index 1bae584..c493d46 100644 --- a/fortran/src/H5Sff.f90 +++ b/fortran/src/H5Sff.f90 @@ -1323,8 +1323,8 @@ CONTAINS INTEGER, INTENT(IN) :: operator INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block END FUNCTION h5sselect_hyperslab_c END INTERFACE diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90 index dea9a5d..79b0458 100644 --- a/fortran/test/tH5F_F03.f90 +++ b/fortran/test/tH5F_F03.f90 @@ -62,10 +62,6 @@ SUBROUTINE test_get_file_image(total_error) INTEGER(hid_t) :: fapl ! File access property INTEGER :: error ! Error flag - - RETURN ! DEBUG, PGI COMPILERS seem to have a bug in the INQUIRE functions, - ! waiting for an answer from PGI how to resolve the problem. - ! Create new properties for file access CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error) CALL check("h5pcreate_f", error, total_error) @@ -151,9 +147,9 @@ SUBROUTINE test_get_file_image(total_error) ALLOCATE(file_image_ptr(1:image_size)) ! Open the test file using standard I/O calls - OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM') + OPEN(UNIT=10,FILE='tget_file_image.h5', FORM='UNFORMATTED', ACCESS='STREAM') - ! Read the test file from disk into the buffer + ! Read the test file from disk into the buffer DO i = 1, image_size READ(10) file_image_ptr(i) ENDDO diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 5811bec..d431644 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -38,16 +38,16 @@ Notes: This short set of instructions is written for users who want to 4. Configure the C library, tools and tests with this command: cmake -G "Visual Studio 10" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. - 3. Build the C library, tools and tests with this command: + 5. Build the C library, tools and tests with this command: cmake --build . --config Release - 4. Test the C library and tools with this command: + 6. Test the C library and tools with this command: ctest . -C Release - 5. Create an install image with this command: + 7. Create an install image with this command: cpack -C Release CPackConfig.cmake - 6. Install with this command: + 8. Install with this command: HDF5-1.8.12-win32.exe B. Linux Quick Step Building HDF5 Libraries with CMake Using GCC @@ -66,16 +66,16 @@ Notes: This short set of instructions is written for users who want to 4. Configure the C library, tools and tests with this command: cmake -G "Unix Makefiles" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON .. - 3. Build the C library, tools and tests with this command: + 5. Build the C library, tools and tests with this command: cmake --build . --config Release - 4. Test the C library and tools with this command: + 6. Test the C library and tools with this command: ctest . -C Release - 5. Create an install image with this command: + 7. Create an install image with this command: cpack -C Release CPackConfig.cmake - 6. Install with this command: + 8. Install with this command: HDF5-1.8.12-Linux.sh @@ -128,35 +128,36 @@ II. Preconditions cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF .. +Notes: CMake and HDF5 -Notes: More information about using CMake can be found at the KitWare site, - www.cmake.org. - - CMake uses the command line; however, the visual CMake tool is - available for the configuration step. The steps are similar for - all the operating systems supported by CMake. - - NOTES: - 1. Using CMake for building and using HDF5 is under active development. - While we have attempted to provide error-free files, please - understand that development with CMake has not been extensively - tested outside of HDF. The CMake specific files may change - before the next release. + 1. Using CMake for building and using HDF5 is under active development. + While we have attempted to provide error-free files, please + understand that development with CMake has not been extensively + tested outside of HDF. The CMake specific files may change + before the next release. - 2. CMake support for HDF5 development should be usable on any - system where CMake is supported. Please send us any comments on - how CMake support can be improved on any system. Visit the - KitWare site for more information about CMake. + 2. CMake support for HDF5 development should be usable on any + system where CMake is supported. Please send us any comments on + how CMake support can be improved on any system. Visit the + KitWare site for more information about CMake. - 3. Build and test results can be submitted to our CDash server at: + 3. Build and test results can be submitted to our CDash server at: cdash.hdfgroup.uiuc.edu. - Please read the HDF and CDash document at: + Please read the HDF and CDash document at: www.hdfgroup.org/CDash/HowToSubmit. - 4. See the appendix at the bottom of this file for examples of using - a ctest script for building and testing. Using a ctest script is - preferred because of its flexibility. + 4. See the appendix at the bottom of this file for examples of using + a ctest script for building and testing. Using a ctest script is + preferred because of its flexibility. +Notes: CMake in General + + 1. More information about using CMake can be found at the KitWare site at + www.cmake.org. + + 2. CMake uses the command line; however, the visual CMake tool is + available for the configuration step. The steps are similar for + all the operating systems supported by CMake. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 11e9cf9..adec8f8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1281,34 +1281,34 @@ The following platforms are not supported but have been tested for this release. g++ 4.6.1 20110422 gfortran 4.6.1 20110422 - Debian7.1.0 3.2.0-4-686 #1 SMP Debian 3.2.46-1 i686 GNU/Linux + Debian7.2.0 3.2.0-4-686 #1 SMP Debian 3.2.51-1 i686 GNU/Linux gcc (Debian 4.7.2-5) 4.7.2 GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Debian7.1.0 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux + Debian7.2.0 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux gcc (Debian 4.7.2-5) 4.7.2 GNU Fortran (Debian 4.7.2-5) 4.7.2 (cmake and autotools) - Fedora19 3.11.1-200.fc19.i6866 #1 SMP i686 i686 i386 GNU/Linux - gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) - GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + Fedora20 3.11.10-301.fc20.i6866 #1 SMP i686 i686 i386 GNU/Linux + gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7) + GNU Fortran (GCC) 4.8.2 20130603 (Red Hat 4.8.2-7) (cmake and autotools) - Fedora19 3.11.1-200.fc19.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux - gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) - GNU Fortran (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) + Fedora20 3.11.10-301.fc20.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux + gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7) + GNU Fortran (GCC) 4.8.2 20130603 (Red Hat 4.8.2-7) (cmake and autotools) - SUSE 12.3 3.7.10-1.16-desktop #1 SMP PREEMPT i686 i686 i386 GNU/Linux - gcc (SUSE Linux) 4.7.2 - GNU Fortran (SUSE Linux) 4.7.2 + SUSE 13.1 3.11.6-4-desktop #1 SMP PREEMPT i686 athlon i386 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 (cmake and autotools) - SUSE 12.3 3.7.10-1.16-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux - gcc (SUSE Linux) 4.7.2 - GNU Fortran (SUSE Linux) 4.7.2 + SUSE 13.1 3.11.6-4-desktop #1 SMP PREEMPT x86_64 x86_64 x86_64 GNU/Linux + gcc (SUSE Linux) 4.8.1 + GNU Fortran (SUSE Linux) 4.8.1 (cmake and autotools) Ubuntu 13.10 3.11.0-13-generic #20-Ubuntu SMP i686 GNU/Linux diff --git a/src/H5AC.c b/src/H5AC.c index 46b5785..1f3c8f5 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -518,58 +518,52 @@ H5AC_create(const H5F_t *f, if((mpi_size = H5F_mpi_get_size(f)) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get mpi size") - /* There is no point in setting up the auxilary structure if size - * is less than or equal to 1, as there will never be any processes - * to broadcast the clean lists to. - */ - if(mpi_size > 1) { - if(NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxilary structure.") - - aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC; - aux_ptr->mpi_comm = mpi_comm; - aux_ptr->mpi_rank = mpi_rank; - aux_ptr->mpi_size = mpi_size; - aux_ptr->write_permitted = FALSE; - aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD; - aux_ptr->dirty_bytes = 0; - aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; + if(NULL == (aux_ptr = H5FL_CALLOC(H5AC_aux_t))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "Can't allocate H5AC auxilary structure.") + + aux_ptr->magic = H5AC__H5AC_AUX_T_MAGIC; + aux_ptr->mpi_comm = mpi_comm; + aux_ptr->mpi_rank = mpi_rank; + aux_ptr->mpi_size = mpi_size; + aux_ptr->write_permitted = FALSE; + aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD; + aux_ptr->dirty_bytes = 0; + aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY; #if H5AC_DEBUG_DIRTY_BYTES_CREATION - aux_ptr->dirty_bytes_propagations = 0; - aux_ptr->unprotect_dirty_bytes = 0; - aux_ptr->unprotect_dirty_bytes_updates = 0; - aux_ptr->insert_dirty_bytes = 0; - aux_ptr->insert_dirty_bytes_updates = 0; - aux_ptr->move_dirty_bytes = 0; - aux_ptr->move_dirty_bytes_updates = 0; + aux_ptr->dirty_bytes_propagations = 0; + aux_ptr->unprotect_dirty_bytes = 0; + aux_ptr->unprotect_dirty_bytes_updates = 0; + aux_ptr->insert_dirty_bytes = 0; + aux_ptr->insert_dirty_bytes_updates = 0; + aux_ptr->move_dirty_bytes = 0; + aux_ptr->move_dirty_bytes_updates = 0; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - aux_ptr->d_slist_ptr = NULL; - aux_ptr->d_slist_len = 0; - aux_ptr->c_slist_ptr = NULL; - aux_ptr->c_slist_len = 0; - aux_ptr->candidate_slist_ptr = NULL; - aux_ptr->candidate_slist_len = 0; - aux_ptr->write_done = NULL; - aux_ptr->sync_point_done = NULL; - - sprintf(prefix, "%d:", mpi_rank); - - if(mpi_rank == 0) { - if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.") - - if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.") - } /* end if */ - - /* construct the candidate slist for all processes. - * when the distributed strategy is selected as all processes - * will use it in the case of a flush. - */ - if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) - HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.") + aux_ptr->d_slist_ptr = NULL; + aux_ptr->d_slist_len = 0; + aux_ptr->c_slist_ptr = NULL; + aux_ptr->c_slist_len = 0; + aux_ptr->candidate_slist_ptr = NULL; + aux_ptr->candidate_slist_len = 0; + aux_ptr->write_done = NULL; + aux_ptr->sync_point_done = NULL; + + sprintf(prefix, "%d:", mpi_rank); + + if(mpi_rank == 0) { + if(NULL == (aux_ptr->d_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create dirtied entry list.") + + if(NULL == (aux_ptr->c_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create cleaned entry list.") } /* end if */ + /* construct the candidate slist for all processes. + * when the distributed strategy is selected as all processes + * will use it in the case of a flush. + */ + if(NULL == (aux_ptr->candidate_slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL))) + HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "can't create candidate entry list.") + if(aux_ptr != NULL) { if(aux_ptr->mpi_rank == 0) { f->shared->cache = H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, diff --git a/src/H5HFman.c b/src/H5HFman.c index b43356f..23afb5e 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -554,12 +554,14 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id) /* Decode the object offset within the heap & it's length */ UINT64DECODE_VAR(id, obj_off, hdr->heap_off_size); UINT64DECODE_VAR(id, obj_len, hdr->heap_len_size); - HDassert(obj_off > 0); - HDassert(obj_len > 0); /* Check for bad offset or length */ + if(obj_off == 0) + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap offset") if(obj_off > hdr->man_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object offset too large") + if(obj_len == 0) + HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "invalid fractal heap object size") if(obj_len > hdr->man_dtable.cparam.max_direct_size) HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, FAIL, "fractal heap object size too large for direct block") if(obj_len > hdr->max_man_size) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f41a5a1..254797d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -178,6 +178,7 @@ SET (H5_TESTS bittests dt_arith dtypes + dsets cmpd_dset filter_fail extend diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 58ef1e6..1b80e67 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -40,8 +40,8 @@ FOREACH (ref_file ${HDF5_REFERENCE_FILES}) ADD_CUSTOM_COMMAND ( TARGET ${HDF5_TEST_LIB_TARGET} POST_BUILD - COMMAND ${XLATE_UTILITY} - ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3 + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} ) ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES}) @@ -429,6 +429,7 @@ IF (HDF5_TEST_VFD) bittests dt_arith dtypes + dsets cmpd_dset filter_fail extend diff --git a/test/testerror.sh.in b/test/testerror.sh.in index eb01fb1..7c03414 100644 --- a/test/testerror.sh.in +++ b/test/testerror.sh.in @@ -61,10 +61,6 @@ TEST() { # Run test. TESTING $TEST_ERR ( - echo "#############################" - echo "Expected output for $TEST_ERR" - echo "#############################" - # Skip the plugin for testing missing filter. $ENVCMD $RUNSERIAL $TEST_ERR_BIN ) >$actual 2>$actual_err diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1 index 5f4fd47..3a85b86 100644 --- a/test/testfiles/err_compat_1 +++ b/test/testfiles/err_compat_1 @@ -1,6 +1,3 @@ -############################# -Expected output for err_compat -############################# Testing error API H5Eset/get_auto Testing error API based on data I/O All error API tests passed. This program tests the Error API compatible with HDF5 version (number). There're supposed to be some error messages ********* Print error stack in HDF5 default way ********* diff --git a/test/testfiles/err_compat_2 b/test/testfiles/err_compat_2 index be6c40d..75e8769 100644 --- a/test/testfiles/err_compat_2 +++ b/test/testfiles/err_compat_2 @@ -1,4 +1 @@ -############################# -Expected output for err_compat -############################# Test skipped because backward compatbility with v1.6 is NOT configured in diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1 index ddc995e..0acd288 100644 --- a/test/testfiles/error_test_1 +++ b/test/testfiles/error_test_1 @@ -1,6 +1,3 @@ -############################# -Expected output for error_test -############################# This program tests the Error API. There're supposed to be some error messages ********* Print error stack in HDF5 default way ********* Second Test-DIAG: Error detected in Second Program (1.0) thread (IDs): diff --git a/test/testfiles/error_test_2 b/test/testfiles/error_test_2 index f9d7317..6852f6f 100644 --- a/test/testfiles/error_test_2 +++ b/test/testfiles/error_test_2 @@ -1,4 +1 @@ -############################# -Expected output for error_test -############################# Test skipped because backward compatbility with v1.6 is configured in diff --git a/test/testfiles/links_env.out b/test/testfiles/links_env.out index 3ca9b99..3f10fc6 100644 --- a/test/testfiles/links_env.out +++ b/test/testfiles/links_env.out @@ -1,6 +1,3 @@ -############################# -Expected output for links_env -############################# Testing external links via environment variable PASSED Testing external links via environment variable (w/new group format) PASSED All external Link (HDF5_EXT_PREFIX) tests passed. diff --git a/test/testhdf5.c b/test/testhdf5.c index f14c2c3..eade815 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -86,6 +86,11 @@ main(int argc, char *argv[]) if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) TestCleanup(); - return (GetTestNumErrs()); + /* Exit failure if errors encountered; else exit success. */ + /* No need to print anything since PerformTests() already does. */ + if (GetTestNumErrs() > 0) + exit(EXIT_FAILURE); + else + exit(EXIT_SUCCESS); } /* end main() */ diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 3cb627f..7e6a37f 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -2721,7 +2721,10 @@ test_actual_io_mode(int selection_mode) { test_name = "Multi Chunk - Collective"; actual_chunk_opt_mode_expected = H5D_MPIO_MULTI_CHUNK; - actual_io_mode_expected = H5D_MPIO_CHUNK_COLLECTIVE; + if(mpi_size > 1) + actual_io_mode_expected = H5D_MPIO_CHUNK_COLLECTIVE; + else + actual_io_mode_expected = H5D_MPIO_CHUNK_INDEPENDENT; break; /* Mixed I/O with optimization */ @@ -2798,11 +2801,14 @@ test_actual_io_mode(int selection_mode) { test_name = "Multi Chunk - Mixed (Disagreement)"; actual_chunk_opt_mode_expected = H5D_MPIO_MULTI_CHUNK; - - if(mpi_rank == 0) - actual_io_mode_expected = H5D_MPIO_CHUNK_COLLECTIVE; + if(mpi_size > 1) { + if(mpi_rank == 0) + actual_io_mode_expected = H5D_MPIO_CHUNK_COLLECTIVE; + else + actual_io_mode_expected = H5D_MPIO_CHUNK_MIXED; + } else - actual_io_mode_expected = H5D_MPIO_CHUNK_MIXED; + actual_io_mode_expected = H5D_MPIO_CHUNK_INDEPENDENT; break; @@ -2861,7 +2867,6 @@ test_actual_io_mode(int selection_mode) { ret = H5Sselect_hyperslab(mem_space, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); - /* Get the number of elements in the selection */ length = dim0 * dim1; @@ -2939,7 +2944,6 @@ test_actual_io_mode(int selection_mode) { VRFY((actual_chunk_opt_mode_read == actual_chunk_opt_mode_write), "reading and writing are the same for actual_chunk_opt_mode"); - /* Test values */ if(actual_chunk_opt_mode_expected != (unsigned) -1 && actual_io_mode_expected != (unsigned) -1) { sprintf(message, "Actual Chunk Opt Mode has the correct value for %s.\n",test_name); @@ -3030,7 +3034,7 @@ actual_io_mode_tests(void) { */ test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_IND); test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_COL); - + /* The Multi Chunk Mixed test requires atleast three processes. */ if (mpi_size > 2) test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX); @@ -3128,8 +3132,8 @@ test_no_collective_cause_mode(int selection_mode) int length; int * buffer; int i; - MPI_Comm mpi_comm = MPI_COMM_NULL; - MPI_Info mpi_info = MPI_INFO_NULL; + MPI_Comm mpi_comm; + MPI_Info mpi_info; hid_t fid = -1; hid_t sid = -1; hid_t dataset = -1; @@ -3156,7 +3160,7 @@ test_no_collective_cause_mode(int selection_mode) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Barrier(MPI_COMM_WORLD); - + HDassert(mpi_size >= 1); mpi_comm = MPI_COMM_WORLD; @@ -3693,11 +3697,6 @@ test_no_collective_cause_mode_filter(int selection_mode) void no_collective_cause_tests(void) { - int mpi_size = -1; - int mpi_rank = -1; - MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - MPI_Comm_size(MPI_COMM_WORLD, &mpi_rank); - /* * Test individual cause */ diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 8fc739e..516cc2f 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -1779,12 +1779,9 @@ void rr_obj_hdr_flush_confusion(void) */ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - if (mpi_size < 3){ - HDfprintf(stdout, "%s needs at least 3 processes to run. Terminated.\n", - fcn_name); - nerrors++; - return; - } + + HDassert(mpi_size > 2); + is_reader = mpi_rank % 2; mrc = MPI_Comm_split(MPI_COMM_WORLD, is_reader, mpi_rank, &comm); VRFY((mrc==MPI_SUCCESS), "MPI_Comm_split"); diff --git a/testpar/t_prop.c b/testpar/t_prop.c index 4601316..e85b227 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -26,42 +26,50 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) MPI_Request req[2]; MPI_Status status; hid_t pl; /* Decoded property list */ - void *buf = NULL; - size_t buf_size = 0; + void *send_buf = NULL; + size_t send_size = 0; herr_t ret; /* Generic return value */ if(mpi_rank == 0) { + /* first call to encode returns only the size of the buffer needed */ - ret = H5Pencode(orig_pl, NULL, &buf_size); + ret = H5Pencode(orig_pl, NULL, &send_size); VRFY((ret >= 0), "H5Pencode succeeded"); - buf = (uint8_t *)HDmalloc(buf_size); + send_buf = (uint8_t *)HDmalloc(send_size); - ret = H5Pencode(orig_pl, buf, &buf_size); + ret = H5Pencode(orig_pl, send_buf, &send_size); VRFY((ret >= 0), "H5Pencode succeeded"); - MPI_Isend(&buf_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]); - MPI_Isend(buf, (int)buf_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]); + MPI_Isend(&send_size, 1, MPI_INT, recv_proc, 123, MPI_COMM_WORLD, &req[0]); + MPI_Isend(send_buf, (int)send_size, MPI_BYTE, recv_proc, 124, MPI_COMM_WORLD, &req[1]); } /* end if */ + if(mpi_rank == recv_proc) { - MPI_Recv(&buf_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); - buf = (uint8_t *)HDmalloc(buf_size); - MPI_Recv(buf, (int)buf_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); + void *recv_buf = NULL; + size_t recv_size = 0; + + MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); + recv_buf = (uint8_t *)HDmalloc(recv_size); + MPI_Recv(recv_buf, (int)recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); - pl = H5Pdecode(buf); + pl = H5Pdecode(recv_buf); VRFY((pl >= 0), "H5Pdecode succeeded"); VRFY(H5Pequal(orig_pl, pl), "Property List Equal Succeeded"); ret = H5Pclose(pl); VRFY((ret >= 0), "H5Pclose succeeded"); + + if(NULL != recv_buf) + HDfree(recv_buf); } /* end if */ - if(0 == mpi_rank) + if(mpi_rank == 0) { MPI_Waitall(2, req, MPI_STATUSES_IGNORE); - - if(NULL != buf) - HDfree(buf); + if(NULL != send_buf) + HDfree(send_buf); + } MPI_Barrier(MPI_COMM_WORLD); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 89230f1..3419977 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -342,7 +342,7 @@ int main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0){ - printf("Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("Failed to turn off atexit processing. Continue.\n"); }; H5open(); h5_show_hostname(); @@ -486,11 +486,17 @@ int main(int argc, char **argv) "I/O mode confusion test -- hangs quickly on failure", &io_mode_confusion_params); - rr_obj_flush_confusion_params.name = PARATESTFILE; - rr_obj_flush_confusion_params.count = 0; /* value not used */ - AddTest("rrobjflushconf", rr_obj_hdr_flush_confusion, NULL, - "round robin object header flush confusion test", - &rr_obj_flush_confusion_params); + if((mpi_size < 3) && MAINPROCESS) { + printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n"); + printf("rr_obj_hdr_flush_confusion test will be skipped \n"); + } + if(mpi_size > 2) { + rr_obj_flush_confusion_params.name = PARATESTFILE; + rr_obj_flush_confusion_params.count = 0; /* value not used */ + AddTest("rrobjflushconf", rr_obj_hdr_flush_confusion, NULL, + "round robin object header flush confusion test", + &rr_obj_flush_confusion_params); + } AddTest("tldsc", lower_dim_size_comp_test, NULL, diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 8690181..95288f0 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -209,12 +209,12 @@ NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=testfiles/${resultfile}.tst" + -D "TEST_REFERENCE=${resultfile}.tst" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) @@ -245,11 +245,11 @@ NAME H5REPACK_DMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;./testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.ddl" + -D "TEST_REFERENCE=${testname}.${resultfile}.ddl" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}") @@ -284,9 +284,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -307,9 +307,9 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${nottestfilter}" -D "TEST_REFERENCE=${testfilter}" @@ -357,12 +357,12 @@ NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN};${PROJECT_BINARY_DIR}/testfiles/${resultfile};${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=O?...ing file[^\n]+\n" - -D "TEST_OUTPUT=./testfiles/${testname}.${resultfile}.out" - -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.tst" + -D "TEST_OUTPUT=${testname}.${resultfile}.out" + -D "TEST_REFERENCE=${testname}.${resultfile}.tst" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" @@ -372,11 +372,11 @@ NAME H5REPACK_UD-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${resultfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" + -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=testfiles/${resultfile}-${testname}.ddl" + -D "TEST_REFERENCE=${resultfile}-${testname}.ddl" -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 045aebf..a4d12bd 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -70,7 +70,7 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" -TESTDIR=./testfiles +TESTDIR=./testpack test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -209,6 +209,7 @@ DIFFTEST() { VERIFY h5diff output $@ ( + cd $TESTDIR $RUNSERIAL $H5DIFF_BIN -q "$@" ) RET=$? @@ -229,14 +230,15 @@ DIFFTEST() TOOLTEST() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -254,11 +256,11 @@ TOOLTEST() # Verifying layouts of a dataset VERIFY_LAYOUT_DSET() { - layoutfile=$TESTDIR/layout-$1.$2 + layoutfile=layout-$1.$2 dset=$3 expectlayout=$4 - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift shift @@ -266,6 +268,7 @@ VERIFY_LAYOUT_DSET() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -281,9 +284,10 @@ VERIFY_LAYOUT_DSET() # check the layout from a dataset VERIFY "a dataset layout" ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile ) - $GREP $expectlayout $layoutfile > /dev/null + $GREP $expectlayout $TESTDIR/$layoutfile > /dev/null if [ $? -eq 0 ]; then echo " PASSED" else @@ -301,8 +305,8 @@ VERIFY_LAYOUT_DSET() VERIFY_LAYOUT_ALL() { infile=$2 - outfile=$TESTDIR/out-$1.$2 - layoutfile=$TESTDIR/layout-$1.$2 + outfile=out-$1.$2 + layoutfile=layout-$1.$2 expectlayout=$3 shift shift @@ -310,6 +314,7 @@ VERIFY_LAYOUT_ALL() TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -327,6 +332,7 @@ VERIFY_LAYOUT_ALL() # check if the other layouts still exsit VERIFY "layouts" ( + cd $TESTDIR echo # if CONTIGUOUS if [ $expectlayout = "CONTIGUOUS" ]; then @@ -401,14 +407,15 @@ VERIFY_LAYOUT_ALL() # TOOLTEST0() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" ) RET=$? @@ -428,14 +435,15 @@ TOOLTEST0() # TOOLTEST1() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -458,14 +466,15 @@ TOOLTESTV() actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -500,8 +509,8 @@ TOOLTESTV() # TOOLTEST_DUMP() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect="$TESTDIR/$1.$2.ddl" actual="$TESTDIR/out-$1.$2.out" actual_err="$TESTDIR/out-$1.$2.err" @@ -512,6 +521,7 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) >$actual 2>$actual_err RET=$? @@ -522,6 +532,7 @@ TOOLTEST_DUMP() echo " PASSED" VERIFY h5dump output $@ ( + cd $TESTDIR $RUNSERIAL $H5DUMP_BIN -pH $outfile ) >$actual 2>$actual_err cat $actual_err >> $actual @@ -559,14 +570,15 @@ TOOLTEST_DUMP() # Verify the output file of second run is larger than the one of 1st run. TOOLTEST_META() { - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 shift shift # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN $infile $outfile ) RET=$? @@ -578,12 +590,13 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the first output file - size1=`wc -c $outfile | cut -d' ' -f1` + size1=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # 2nd run with metadata option # Run test. TESTING $H5REPACK $@ ( + cd $TESTDIR $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile ) RET=$? @@ -595,7 +608,7 @@ TOOLTEST_META() DIFFTEST $infile $outfile fi # get the size of the second output file - size2=`wc -c $outfile | cut -d' ' -f1` + size2=`wc -c $TESTDIR/$outfile | cut -d' ' -f1` # verify sizes. MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" @@ -927,7 +940,7 @@ else fi #file -arg="h5repack_layout.h5 -e $TESTDIR/h5repack.info" +arg="h5repack_layout.h5 -e h5repack.info" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else @@ -1064,7 +1077,7 @@ else fi # add a userblock to file -arg="h5repack_objs.h5 -u $TESTDIR/ublock.bin -b 2048" +arg="h5repack_objs.h5 -u ublock.bin -b 2048" TOOLTEST add_userblock $arg # add alignment diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in index df4b374..7502397 100644 --- a/tools/h5repack/h5repack_plugin.sh.in +++ b/tools/h5repack/h5repack_plugin.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS="$srcdir/.." # testfiles source dirs for tools SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" -TESTDIR=testfiles +TESTDIR=testplug test -d $TESTDIR || mkdir $TESTDIR ###################################################################### @@ -66,6 +66,10 @@ $SRC_H5REPACK_TESTFILES/h5repack_layout.h5 $SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl $SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst " +#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5 +#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5-plugin_none.ddl +#$SRC_H5REPACK_TESTFILES/plugin_none.h5repack_layout.UD.h5.tst +#" # # copy test files and expected output files from source dirs to test dir @@ -88,7 +92,7 @@ if [ $? != 0 ]; then fi # setup plugin path -ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR}" +ENVCMD="env HDF5_PLUGIN_PATH=../${PLUGIN_LIBDIR}" COPY_TESTFILES_TO_TESTDIR() { @@ -171,8 +175,8 @@ STDOUT_FILTER() { TOOLTEST_DUMP() { echo $@ - infile=$TESTDIR/$2 - outfile=$TESTDIR/out-$1.$2 + infile=$2 + outfile=out-$1.$2 expect1="$TESTDIR/$1.$2.tst" actual1="$TESTDIR/$1.$2.out" actual1_err="$TESTDIR/$1.$2.err" @@ -186,35 +190,37 @@ TOOLTEST_DUMP() # Run test. TESTING $H5REPACK $@ ( - $ENVCMD $H5REPACK_BIN "$@" $infile $outfile + cd $TESTDIR + $ENVCMD $H5REPACK_BIN "$@" $infile $outfile ) >$actual1 2>$actual1_err RET=$? STDOUT_FILTER $actual1 cat $actual1_err >> $actual1 if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" - else - echo " PASSED" - if cmp -s $expect1 $actual1; then - echo " PASSED" - else echo "*FAILED*" - echo " Expected result (*.tst) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' - fi - VERIFY h5dump output -pH $outfile - ( + else + echo " PASSED" + if cmp -s $expect1 $actual1; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.tst) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /' + fi + VERIFY h5dump output -pH $outfile + ( + cd $TESTDIR $ENVCMD $H5DUMP_BIN -pH $outfile - ) >$actual2 2>$actual2_err - RET=$? - cat $actual2_err >> $actual2 + ) >$actual2 2>$actual2_err + RET=$? + cat $actual2_err >> $actual2 - if cmp -s $expect2 $actual2; then - echo " PASSED" - else - echo "*FAILED*" + if cmp -s $expect2 $actual2; then + echo " PASSED" + else + echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect2 $actual2 |sed 's/^/ /' @@ -237,6 +243,9 @@ COPY_TESTFILES_TO_TESTDIR arg="h5repack_layout.h5 -v -f UD=257,1,9" TOOLTEST_DUMP plugin_test $arg +#arg="h5repack_layout.UD.h5 -v -f NONE" +#TOOLTEST_DUMP plugin_none $arg + # print results if test $nerrors -ne 0 ; then echo "$nerrors errors encountered" diff --git a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index d380201..b8e7e68 100644 --- a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" { +HDF5 "out-deflate_limit.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl b/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl index 0d85352..fb94c21 100644 --- a/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl +++ b/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl @@ -1,4 +1,4 @@ -HDF5 "testfiles/out-plugin_none.h5repack_layout.UD.h5" { +HDF5 "out-plugin_none.h5repack_layout.UD.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index a7ba967..7a3a01e 100644 --- a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -1,4 +1,4 @@ -HDF5 "testfiles/out-plugin_test.h5repack_layout.h5" { +HDF5 "out-plugin_test.h5repack_layout.h5" { GROUP "/" { DATASET "dset1" { DATATYPE H5T_STD_I32LE diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake index 0e4315f..81ddf82 100644 --- a/tools/h5stat/CMakeTests.cmake +++ b/tools/h5stat/CMakeTests.cmake @@ -54,8 +54,8 @@ ADD_CUSTOM_COMMAND ( TARGET h5stat POST_BUILD - COMMAND ${XLATE_UTILITY} - ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3 + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} ) ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES}) diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl index 182d31a..c285ea4 100644 --- a/tools/h5stat/testfiles/h5stat_dims1.ddl +++ b/tools/h5stat/testfiles/h5stat_dims1.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -gd -m 5 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Small groups (with 0 to 9 links): # of groups with 0 link(s): 1 diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl index abf3f61..769749e 100644 --- a/tools/h5stat/testfiles/h5stat_dims2.ddl +++ b/tools/h5stat/testfiles/h5stat_dims2.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -d --di=15 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Dataset dimension information: Max. rank of datasets: 2 diff --git a/tools/h5stat/testfiles/h5stat_err1_dims.ddl b/tools/h5stat/testfiles/h5stat_err1_dims.ddl index 8f0686f..86d375b 100644 --- a/tools/h5stat/testfiles/h5stat_err1_dims.ddl +++ b/tools/h5stat/testfiles/h5stat_err1_dims.ddl @@ -1,4 +1 @@ -############################# -Expected output for 'h5stat -d --dims=-1 h5stat_threshold.h5' -############################# h5stat error: Invalid threshold for small datasets diff --git a/tools/h5stat/testfiles/h5stat_err1_links.ddl b/tools/h5stat/testfiles/h5stat_err1_links.ddl index 07987a2..d43207c 100644 --- a/tools/h5stat/testfiles/h5stat_err1_links.ddl +++ b/tools/h5stat/testfiles/h5stat_err1_links.ddl @@ -1,4 +1 @@ -############################# -Expected output for 'h5stat -l 0 h5stat_threshold.h5' -############################# h5stat error: Invalid threshold for small groups diff --git a/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl index 8eea546..01b6c18 100644 --- a/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl +++ b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl @@ -1,4 +1 @@ -############################# -Expected output for 'h5stat -a -2 h5stat_threshold.h5' -############################# h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl index a1ecb31..01b6c18 100644 --- a/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl +++ b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl @@ -1,4 +1 @@ -############################# -Expected output for 'h5stat --numattrs h5stat_threshold.h5' -############################# h5stat error: Invalid threshold for small # of attributes diff --git a/tools/h5stat/testfiles/h5stat_filters-F.ddl b/tools/h5stat/testfiles/h5stat_filters-F.ddl index fba875a..d44445b 100644 --- a/tools/h5stat/testfiles/h5stat_filters-F.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-F.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -F h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 File space information for file metadata (in bytes): Superblock: 96 diff --git a/tools/h5stat/testfiles/h5stat_filters-UD.ddl b/tools/h5stat/testfiles/h5stat_filters-UD.ddl index decfb81..4efafd1 100644 --- a/tools/h5stat/testfiles/h5stat_filters-UD.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-UD.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -D h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 File space information for datasets' metadata (in bytes): Object headers (total/unused): 4136/1344 diff --git a/tools/h5stat/testfiles/h5stat_filters-UT.ddl b/tools/h5stat/testfiles/h5stat_filters-UT.ddl index 189eaa6..d8de31f 100644 --- a/tools/h5stat/testfiles/h5stat_filters-UT.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-UT.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -T h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 Dataset datatype information: # of unique datatypes used by datasets: 2 diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl index dae1f06..2e0bd64 100644 --- a/tools/h5stat/testfiles/h5stat_filters-d.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -d h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 Dataset dimension information: Max. rank of datasets: 2 diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl index 5c7a4ab..9ef3e82 100644 --- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -dT h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 Dataset dimension information: Max. rank of datasets: 2 diff --git a/tools/h5stat/testfiles/h5stat_filters-file.ddl b/tools/h5stat/testfiles/h5stat_filters-file.ddl index eddc898..5f7eff9 100644 --- a/tools/h5stat/testfiles/h5stat_filters-file.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-file.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -f h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 File information # of unique groups: 1 diff --git a/tools/h5stat/testfiles/h5stat_filters-g.ddl b/tools/h5stat/testfiles/h5stat_filters-g.ddl index 6cb791c..290c82a 100644 --- a/tools/h5stat/testfiles/h5stat_filters-g.ddl +++ b/tools/h5stat/testfiles/h5stat_filters-g.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -g h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 Small groups (with 0 to 9 links): Total # of small groups: 0 diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl index 0a6733d..24522cd 100644 --- a/tools/h5stat/testfiles/h5stat_filters.ddl +++ b/tools/h5stat/testfiles/h5stat_filters.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat h5stat_filters.h5' -############################# Filename: h5stat_filters.h5 File information # of unique groups: 1 diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl index d79c99f..d2a8715 100644 --- a/tools/h5stat/testfiles/h5stat_help1.ddl +++ b/tools/h5stat/testfiles/h5stat_help1.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -h' -############################# Usage: h5stat [OPTIONS] file OPTIONS diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl index af48e3a..d2a8715 100644 --- a/tools/h5stat/testfiles/h5stat_help2.ddl +++ b/tools/h5stat/testfiles/h5stat_help2.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat --help' -############################# Usage: h5stat [OPTIONS] file OPTIONS diff --git a/tools/h5stat/testfiles/h5stat_idx.ddl b/tools/h5stat/testfiles/h5stat_idx.ddl index f604a05..f4403d1 100644 --- a/tools/h5stat/testfiles/h5stat_idx.ddl +++ b/tools/h5stat/testfiles/h5stat_idx.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat h5stat_idx.h5' -############################# Filename: h5stat_idx.h5 File information # of unique groups: 1 diff --git a/tools/h5stat/testfiles/h5stat_links1.ddl b/tools/h5stat/testfiles/h5stat_links1.ddl index e77a788..c650f15 100644 --- a/tools/h5stat/testfiles/h5stat_links1.ddl +++ b/tools/h5stat/testfiles/h5stat_links1.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -g -l 8 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Small groups (with 0 to 7 links): # of groups with 0 link(s): 1 diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl index 5207343..09bf937 100644 --- a/tools/h5stat/testfiles/h5stat_links2.ddl +++ b/tools/h5stat/testfiles/h5stat_links2.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat --links=8 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 File information # of unique groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_links3.ddl b/tools/h5stat/testfiles/h5stat_links3.ddl index d0071d7..f80471a 100644 --- a/tools/h5stat/testfiles/h5stat_links3.ddl +++ b/tools/h5stat/testfiles/h5stat_links3.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat --links=20 -g h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Small groups (with 0 to 19 links): # of groups with 0 link(s): 1 diff --git a/tools/h5stat/testfiles/h5stat_links4.ddl b/tools/h5stat/testfiles/h5stat_links4.ddl index ca3911c..94feffd 100644 --- a/tools/h5stat/testfiles/h5stat_links4.ddl +++ b/tools/h5stat/testfiles/h5stat_links4.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -g h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 Small groups (with 0 to 9 links): # of groups with 0 link(s): 35000 diff --git a/tools/h5stat/testfiles/h5stat_links5.ddl b/tools/h5stat/testfiles/h5stat_links5.ddl index 44ec161..6f33bed 100644 --- a/tools/h5stat/testfiles/h5stat_links5.ddl +++ b/tools/h5stat/testfiles/h5stat_links5.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -g -l 40000 h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 Small groups (with 0 to 39999 links): # of groups with 0 link(s): 35000 diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl index 18f91f3..a5ee7e8 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -A h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 Small # of attributes (objects with 1 to 10 attributes): Total # of objects with small # of attributes: 0 diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl index ecebdef..41195ac 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -G h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 File space information for groups' metadata (in bytes): Object headers (total/unused): 5145147/3220092 diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl index 7d4ef91..33d756b 100644 --- a/tools/h5stat/testfiles/h5stat_newgrat.ddl +++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 File information # of unique groups: 35001 diff --git a/tools/h5stat/testfiles/h5stat_nofile.ddl b/tools/h5stat/testfiles/h5stat_nofile.ddl index cf20995..d8a8b2c 100644 --- a/tools/h5stat/testfiles/h5stat_nofile.ddl +++ b/tools/h5stat/testfiles/h5stat_nofile.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat ' -############################# Usage: h5stat [OPTIONS] file OPTIONS diff --git a/tools/h5stat/testfiles/h5stat_notexist.ddl b/tools/h5stat/testfiles/h5stat_notexist.ddl index ac0fce4..cc25e43 100644 --- a/tools/h5stat/testfiles/h5stat_notexist.ddl +++ b/tools/h5stat/testfiles/h5stat_notexist.ddl @@ -1,5 +1,2 @@ -############################# -Expected output for 'h5stat notexist.h5' -############################# Filename: notexist.h5 h5stat error: unable to open file "notexist.h5" diff --git a/tools/h5stat/testfiles/h5stat_numattrs1.ddl b/tools/h5stat/testfiles/h5stat_numattrs1.ddl index 86cfcb0..fb5568d 100644 --- a/tools/h5stat/testfiles/h5stat_numattrs1.ddl +++ b/tools/h5stat/testfiles/h5stat_numattrs1.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -AS -a 10 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Small # of attributes (objects with 1 to 10 attributes): # of objects with 1 attributes: 2 diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl index 5ee3adf..1313aec 100644 --- a/tools/h5stat/testfiles/h5stat_numattrs2.ddl +++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -a 1 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 File information # of unique groups: 4 diff --git a/tools/h5stat/testfiles/h5stat_numattrs3.ddl b/tools/h5stat/testfiles/h5stat_numattrs3.ddl index 515b76c..de8d6a3 100644 --- a/tools/h5stat/testfiles/h5stat_numattrs3.ddl +++ b/tools/h5stat/testfiles/h5stat_numattrs3.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -A --numattrs=25 h5stat_threshold.h5' -############################# Filename: h5stat_threshold.h5 Small # of attributes (objects with 1 to 25 attributes): # of objects with 1 attributes: 2 diff --git a/tools/h5stat/testfiles/h5stat_numattrs4.ddl b/tools/h5stat/testfiles/h5stat_numattrs4.ddl index 515a4a9..2b0122a 100644 --- a/tools/h5stat/testfiles/h5stat_numattrs4.ddl +++ b/tools/h5stat/testfiles/h5stat_numattrs4.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat -A -a 100 h5stat_newgrat.h5' -############################# Filename: h5stat_newgrat.h5 Small # of attributes (objects with 1 to 100 attributes): # of objects with 100 attributes: 1 diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl index 788421b..37de79b 100644 --- a/tools/h5stat/testfiles/h5stat_tsohm.ddl +++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl @@ -1,6 +1,3 @@ -############################# -Expected output for 'h5stat h5stat_tsohm.h5' -############################# Filename: h5stat_tsohm.h5 File information # of unique groups: 1 diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in index 85cc1d4..2aea61e 100644 --- a/tools/h5stat/testh5stat.sh.in +++ b/tools/h5stat/testh5stat.sh.in @@ -193,9 +193,6 @@ TOOLTEST() { # Run test. TESTING $STAT $@ ( - echo "#############################" - echo "Expected output for '$STAT $@'" - echo "#############################" cd $TESTDIR $RUNSERIAL $STAT_BIN $@ ) >$actual 2>$actual_err diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in index 85205a8..190e824 100644 --- a/tools/misc/testh5mkgrp.sh.in +++ b/tools/misc/testh5mkgrp.sh.in @@ -49,7 +49,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" # testfiles source dirs for tools SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/misc/testfiles" -TESTDIR=./testfiles +TESTDIR=./testgrp test -d $TESTDIR || mkdir -p $TESTDIR ###################################################################### -- cgit v0.12