summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--CTestConfig.cmake6
-rwxr-xr-xautogen.sh147
-rwxr-xr-xbin/bbrelease2
-rw-r--r--config/cmake/HDF5_Examples.cmake.in70
-rw-r--r--config/cmake/HDF5_Process_Flex_Files.cmake21
-rw-r--r--config/cmake/README.txt.cmake.in33
-rw-r--r--hl/src/CMakeLists.txt51
-rw-r--r--release_docs/USING_CMake_Examples.txt57
-rw-r--r--release_docs/USING_HDF5_CMake.txt189
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--test/CMakeTests.cmake7
-rw-r--r--test/cache_common.h1
13 files changed, 355 insertions, 240 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96d5772..1035142 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -212,6 +212,10 @@ if (NOT HDF5_INSTALL_DATA_DIR)
endif (NOT WIN32)
endif (NOT HDF5_INSTALL_DATA_DIR)
+if(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
+ set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
+endif(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
+
#-----------------------------------------------------------------------------
# parse the full version number from H5public.h and include in H5_VERS_INFO
#-----------------------------------------------------------------------------
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 7497b08..36bf4a0 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -23,9 +23,9 @@ set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
-set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
- "Maximum time allowed before CTest will kill the test.")
-set (DART_TESTING_TIMEOUT 1200 CACHE STRING
+set (CTEST_TEST_TIMEOUT 600 CACHE STRING
+ "Maximum time allowed before CTest will kill the test.")
+set (DART_TESTING_TIMEOUT 600 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
diff --git a/autogen.sh b/autogen.sh
index 237e1b1..63be95a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
#
# Copyright by The HDF Group.
# All rights reserved.
@@ -60,7 +60,7 @@
#
# This script takes two potential options:
#
-# -p, --production
+# -p
#
# When this is selected, the autotools versions are set to the paths
# and versions used by The HDF Group to produce the released versions
@@ -70,7 +70,7 @@
# to have recent versions of the autotools this option will probably
# be removed.
#
-# -v, --verbose
+# -v
#
# This emits some extra information, mainly tool versions.
@@ -89,39 +89,24 @@ verbose=false
optspec=":hpv-"
while getopts "$optspec" optchar; do
case "${optchar}" in
- -)
- case "${OPTARG}" in
- production)
- echo "Setting production mode..."
- echo
- production=true
- ;;
- verbose)
- echo "Setting verbosity: high"
- echo
- verbose=true
- ;;
- *)
- if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then
- echo "Unknown option --${OPTARG}" >&2
- fi
- ;;
- esac;;
h)
- echo "usage: $0 [-p|--production]"
+ echo "usage: $0 [OPTIONS]"
echo
- echo " -p Used by THG to ensure that particular versions"
- echo " of the autotools are used and hard-codes"
- echo " autotools paths to THG machines. Not for"
- echo " non-HDF-Group users!"
+ echo " -h Print this help message."
echo
- echo " NOTE: Each autotool can be set via an environment variable."
+ echo " -p Used by THG to use hard-codes autotools"
+ echo " paths on THG machines. Not for non-HDF-Group"
+ echo " users!"
+ echo
+ echo " -v Show more verbose output."
+ echo
+ echo " NOTE: Each tool can be set via an environment variable."
echo " These are documented inside this autogen.sh script."
echo
exit 0
;;
p)
- echo "Setting production mode..."
+ echo "Setting THG production mode..."
echo
production=true
;;
@@ -142,92 +127,33 @@ if [ "$production" = true ] ; then
# Production mode
#
- # Hard-code canonical HDF Group tool locations and ensure
- # version numbers are correct.
-
- # Production versions of the tools
- AUTOCONF_VERSION="autoconf (GNU Autoconf) 2.69"
- AUTOMAKE_VERSION="automake (GNU automake) 1.14.1"
- AUTOHEADER_VERSION="autoheader (GNU Autoconf) 2.69"
- ACLOCAL_VERSION="aclocal (GNU automake) 1.14.1"
- LIBTOOL_VERSION="(GNU libtool) 2.4.2"
- M4_VERSION="m4 (GNU M4) 1.4.17"
- BISON_VERSION="bison (GNU Bison) 2.7"
- FLEX_VERSION="flex 2.5.37"
+ # Hard-code canonical HDF Group tool locations.
# If paths to tools are not specified, assume they are
- # located in /mnt/hdf/packages and set paths accordingly.
+ # located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
if test -z ${HDF5_AUTOCONF}; then
- HDF5_AUTOCONF=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoconf
+ HDF5_AUTOCONF=/usr/hdf/bin/AUTOTOOLS/autoconf
fi
if test -z ${HDF5_AUTOMAKE}; then
- HDF5_AUTOMAKE=/mnt/hdf/packages/automake/automake-1.14.1/bin/automake-1.14
+ HDF5_AUTOMAKE=/usr/hdf/bin/AUTOTOOLS/automake
fi
if test -z ${HDF5_AUTOHEADER}; then
- HDF5_AUTOHEADER=/mnt/hdf/packages/autoconf/autoconf-2.69/bin/autoheader
+ HDF5_AUTOHEADER=/usr/hdf/bin/AUTOTOOLS/autoheader
fi
if test -z ${HDF5_ACLOCAL}; then
- HDF5_ACLOCAL=/mnt/hdf/packages/automake/automake-1.14.1/bin/aclocal-1.14
+ HDF5_ACLOCAL=/usr/hdf/bin/AUTOTOOLS/aclocal
fi
if test -z ${HDF5_LIBTOOL}; then
- HDF5_LIBTOOL=/mnt/hdf/packages/libtool/libtool-2.4.2/bin/libtool
+ HDF5_LIBTOOL=/usr/hdf/bin/AUTOTOOLS/libtool
fi
if test -z ${HDF5_M4}; then
- HDF5_M4=/mnt/hdf/packages/m4/m4-1.4.17/bin/m4
+ HDF5_M4=/usr/hdf/bin/AUTOTOOLS/m4
fi
if test -z ${HDF5_BISON}; then
- HDF5_BISON=/usr/hdf/bin/bison
+ HDF5_BISON=/usr/hdf/bin/AUTOTOOLS/bison
fi
if test -z ${HDF5_FLEX}; then
- HDF5_FLEX=/usr/hdf/bin/flex
- fi
-
- # Check version numbers of all autotools against the "correct" versions
- AC_VERS=`${HDF5_AUTOCONF} --version 2>&1 | grep "^${AUTOCONF_VERSION}"`
- if test -z "${AC_VERS}"; then
- echo "${HDF5_AUTOCONF} version is not ${AUTOCONF_VERSION}"
- ${HDF5_AUTOCONF} --version
- exit 1
- fi
- AM_VERS=`${HDF5_AUTOMAKE} --version 2>&1 | grep "^${AUTOMAKE_VERSION}"`
- if test -z "${AM_VERS}"; then
- echo "${HDF5_AUTOMAKE} version is not ${AUTOMAKE_VERSION}"
- ${HDF5_AUTOMAKE} --version
- exit 1
- fi
- AH_VERS=`${HDF5_AUTOHEADER} --version 2>&1 | grep "^${AUTOHEADER_VERSION}"`
- if test -z "${AH_VERS}"; then
- echo "${HDF5_AUTOHEADER} version is not ${AUTOHEADER_VERSION}"
- ${HDF5_AUTOHEADER} --version
- exit 1
- fi
- AL_VERS=`${HDF5_ACLOCAL} --version 2>&1 | grep "^${ACLOCAL_VERSION}"`
- if test -z "${AL_VERS}"; then
- echo "${HDF5_ACLOCAL} version is not ${ACLOCAL_VERSION}"
- ${HDF5_ACLOCAL} --version
- exit 1
- fi
- LT_VERS=`${HDF5_LIBTOOL} --version 2>&1 | grep "${LIBTOOL_VERSION}"`
- if test -z "${LT_VERS}"; then
- echo "${HDF5_LIBTOOL} version is not ${LIBTOOL_VERSION}"
- ${HDF5_LIBTOOL} --version
- exit 1
- fi
- M4_VERS=`${HDF5_M4} --version 2>&1 | grep "${M4_VERSION}"`
- if test -z "${M4_VERS}"; then
- echo "${HDF5_M4} version is not ${M4_VERSION}"
- ${HDF5_M4} --version
- exit 1
- fi
- BI_VERS=`${HDF5_BISON} --version 2>&1 | grep "^${BISON_VERSION}"`
- if test -z "${BI_VERS}"; then
- echo "${HDF5_BISON} version is not ${BISON_VERSION}"
- exit 1
- fi
- FL_VERS=`${HDF5_FLEX} --version 2>&1 | grep "^${FLEX_VERSION}"`
- if test -z "${FL_VERS}"; then
- echo "${HDF5_FLEX} version is not ${FLEX_VERSION}"
- exit 1
+ HDF5_FLEX=/usr/hdf/bin/AUTOTOOLS/flex
fi
else
@@ -396,15 +322,37 @@ bin/make_overflow src/H5overflow.txt || exit 1
# to install a later version of bison. See the OS X note at the top
# of this script.
echo
-echo "Running flex/bison:"
-cd hl/src
+echo "Generating H5LT parser code (requires yacc/bison):"
echo "Generate hl/src/H5LTparse.c from hl/src/H5LTparse.y"
+# HDF5_BISON is set via the environment or 'which bison', above
+if test -z ${HDF5_BISON}; then
+ echo
+ echo "*************************"
+ echo " ERROR - bison not found"
+ echo "*************************"
+ echo "bison is required to generate parser code in H5LT"
+ echo
+ exit 127
+fi
+cd hl/src
if [ "$verbose" = true ] ; then
${HDF5_BISON} --version
fi
${HDF5_BISON} -pH5LTyy -o H5LTparse.c -d H5LTparse.y
+echo
+echo "Generating H5LT lexer code (requires lex/flex):"
echo "Generate hl/src/H5LTanalyze.c from hl/src/H5LTanalyze.l"
+# HDF5_FLEX is set via the environment or 'which flex', above
+if test -z ${HDF5_FLEX}; then
+ echo
+ echo "************************"
+ echo " ERROR - flex not found"
+ echo "************************"
+ echo "flex is required to generate lexer code in H5LT"
+ echo
+ exit 127
+fi
if [ "$verbose" = true ] ; then
${HDF5_FLEX} --version
fi
@@ -418,6 +366,7 @@ ${HDF5_FLEX} --nounistd -PH5LTyy -o H5LTanalyze.c H5LTanalyze.l
# I propose to not use flex to generate this function, but for now I am
# adding a perl command to find and replace this function declaration in
# H5LTparse.c.
+perl -0777 -pi -e 's/int yyparse/hid_t yyparse/igs' H5LTparse.c
perl -0777 -pi -e 's/int\nyyparse/hid_t\nyyparse/igs' H5LTparse.c
perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' H5LTparse.c
diff --git a/bin/bbrelease b/bin/bbrelease
index 1f6e479..119dc7a 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -269,7 +269,7 @@ if [ X$revmode = Xyes ]; then
# "undo" changes to it.
cp config/lt_vers.am $tmpdir
branch=`svn info | grep ^URL: | awk -F/ '{print $NF}'`
- revision=`svn info | grep "Last Changed Rev:" | awk '{print $4}'`
+ revision=`svn info | grep "Revision:" | awk '{print $2}'`
# Set version information to m.n.r-r$revision.
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-r$revision
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index d0c0509..65e2e9e 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -1,20 +1,48 @@
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
###############################################################################################################
-# This script will build and run the examples from a compressed file
+# This script will build and run the examples from a folder
# Execute from a command line:
-# ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log
+# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log
###############################################################################################################
-set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
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=ON")
-set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_ENABLE_F2003:BOOL=ON")
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}")
+
+# handle input parameters to script.
+#INSTALLDIR - HDF5 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
+#STATICLIBRARIES - Default is YES
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
+if(DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
+endif()
+if(NOT DEFINED INSTALLDIR)
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "HDF5Examples")
+endif()
+if(NOT DEFINED STATICLIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+
+#TAR_SOURCE - name of tarfile
+#if(NOT DEFINED TAR_SOURCE)
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source")
+#endif()
###############################################################################################################
# Adjust the following SET Commands as needed
@@ -42,7 +70,7 @@ endif(WIN32)
# For any comments please contact cdashhelp@hdfgroup.org
#
###############################################################################################################
-
+
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
@@ -53,14 +81,14 @@ if(APPLE)
set(ENV{CC} "${XCODE_CC}")
set(ENV{CXX} "${XCODE_CXX}")
if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
+ # 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} -DHDF_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}\"")
## --------------------------
@@ -69,19 +97,19 @@ if(CTEST_USE_TAR_SOURCE)
## --------------------------
if(WIN32)
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else(WIN32)
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else()
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif(WIN32)
-
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif()
+
if(NOT rv EQUAL 0)
message(STATUS "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)
endif(CTEST_USE_TAR_SOURCE)
-
+
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
@@ -104,11 +132,11 @@ 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")
-
+
#-----------------------------------------------------------------------------
configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
@@ -122,5 +150,5 @@ if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
endif(res GREATER 0)
#-----------------------------------------------------------------------------
-##############################################################################################################
+##############################################################################################################
message(STATUS "DONE") \ No newline at end of file
diff --git a/config/cmake/HDF5_Process_Flex_Files.cmake b/config/cmake/HDF5_Process_Flex_Files.cmake
index da1a842..2306e93 100644
--- a/config/cmake/HDF5_Process_Flex_Files.cmake
+++ b/config/cmake/HDF5_Process_Flex_Files.cmake
@@ -1,6 +1,6 @@
# post process flex/bison files
-message (STATUS "File: ${FILE_PARSE} ${FILE_ANALYZE}")
+message (STATUS "File: ${GEN_DIR} ${FILE_PARSE} ${FILE_ANALYZE}")
if (FILE_PARSE)
# fix H5LTparse.c to declare H5LTyyparse return type as an hid_t
@@ -11,18 +11,19 @@ if (FILE_PARSE)
# I propose to not use flex to generate this function, but for now I am
# adding a perl command to find and replace this function declaration in
# H5LTparse.c.
- file (READ ${FILE_PARSE} TEST_STREAM)
+ file (READ ${GEN_DIR}/${FILE_PARSE}.c TEST_STREAM)
+ string (REGEX REPLACE "int yyparse" "hid_t yyparse" TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE "int\nyyparse" "hid_t\nyyparse" TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE "int H5LTyyparse" "hid_t H5LTyyparse" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${FILE_PARSE} "${TEST_STREAM}")
+ file (WRITE ${FILE_PARSE}.c "${TEST_STREAM}")
message (STATUS "replacing signature in H5LTparse.c")
# Add code that disables warnings in the flex/bison-generated code.
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
- file (READ ${FILE_PARSE} TEST_STREAM)
- file (WRITE ${FILE_PARSE} "
+ file (READ ${FILE_PARSE}.c TEST_STREAM)
+ file (WRITE ${FILE_PARSE}.c "
#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2\n
#pragma GCC diagnostic ignored \"-Wconversion\"\n
#pragma GCC diagnostic ignored \"-Wimplicit-function-declaration\"\n
@@ -44,8 +45,10 @@ if (FILE_PARSE)
#pragma warning(push, 1)\n
#endif\n
")
- file (APPEND ${FILE_PARSE} "${TEST_STREAM}")
- message (STATUS "processing pragma in ${FILE_PARSE}")
+ file (APPEND ${FILE_PARSE}.c "${TEST_STREAM}")
+ message (STATUS "processed pragma in ${FILE_PARSE}")
+ file (READ ${GEN_DIR}/${FILE_PARSE}.h TEST_STREAM)
+ file (WRITE ${FILE_PARSE}.h "${TEST_STREAM}")
endif (FILE_PARSE)
if (FILE_ANALYZE)
@@ -53,7 +56,7 @@ if (FILE_ANALYZE)
#
# Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions
# will simply ignore them, but we want to avoid those warnings.
- file (READ ${FILE_ANALYZE} TEST_STREAM)
+ file (READ ${GEN_DIR}/${FILE_ANALYZE} TEST_STREAM)
file (WRITE ${FILE_ANALYZE} "
#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2\n
#pragma GCC diagnostic ignored \"-Wconversion\"\n
@@ -77,5 +80,5 @@ if (FILE_ANALYZE)
#endif\n
")
file (APPEND ${FILE_ANALYZE} "${TEST_STREAM}")
- message (STATUS "processing pragma in ${FILE_ANALYZE}")
+ message (STATUS "processed pragma in ${FILE_ANALYZE}")
endif (FILE_ANALYZE)
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index a12c5aa..ec40abe 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -1,11 +1,11 @@
@HDF5_PACKAGE_NAME@ version @HDF5_PACKAGE_VERSION_STRING@
------------------------------------------------------------------------------
-This directory contains the binary (release) distribution of
+This directory contains the binary (release) distribution of
@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on;
- @BINARY_PLATFORM@.
+ @BINARY_PLATFORM@.
-It was built with the following options:
+It was built with the following options:
-- @LIB_TYPE@ C/C++/Fortran libraries
-- SZIP (encoder enabled) and ZLIB
-- @LIB_TYPE@ HDF5 tools
@@ -24,27 +24,38 @@ Installation
After Installation
===========================================================================
-The examples folder, HDF5Examples, located in the
+The examples folder, HDF5Examples, located in the
HDF5 install folder, can be built and tested with CMake and the supplied
HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers. Also, the CMake
+been installed in the default location with above compilers. Also, the CMake
utility should be installed.
To test the installation with the examples;
Create a directory to run the examples.
Copy HDF5Examples folder to this directory.
Copy HDF5_Examples.cmake to this directory.
- Edit HDF5_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed.
- (The default should be correct unless you installed into a different folder.)
- Execute from this directory:
- ctest -S HDF5_Examples.cmake,HDF5Examples -C Release -V -O test.log
+ The default source folder is defined as "HDF5Examples". It can be changed
+ with the CTEST_SOURCE_NAME script option.
+ The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
+ It can be changed with the INSTALLDIR script option.
+ The default ctest configuration is defined as "Release". It can be changed
+ with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+ be the same as the value used with the -C command line option.
+ The default build configuration is defined to build and use static libraries.
+ Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
+ Other options can be changed by editing the HDF5_Examples.cmake file.
+
+ If the defaults are okay, execute from this directory:
+ ctest -S HDF5_Examples.cmake -C Release -V -O test.log
+ If the defaults need change, execute from this directory:
+ ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log
When executed, the ctest script will save the results to the log file, test.log, as
-indicated by the ctest command. If you wish the to see more build and test information,
+indicated by the ctest command. If you wish the to see more build and test information,
add "-VV" to the ctest command. The output should show;
100% tests passed, 0 tests failed out of 156.
-For more information see USING_CMake_Examples.txt in the install folder.
+For more information see USING_CMake_Examples.txt in the install folder.
===========================================================================
Documentation for this release can be found at the following URL:
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 25f3cb5..a90e3c8 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -2,59 +2,52 @@ cmake_minimum_required (VERSION 3.1.0)
PROJECT (HDF5_HL_SRC)
if (HDF5_GENERATE_HEADERS)
+ file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/genLT")
find_package (BISON)
if (BISON_FOUND)
find_package (FLEX)
if (FLEX_FOUND)
- BISON_TARGET (H5LT_PARSER H5LTparse.y ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c COMPILE_FLAGS "-d -pH5LTyy")
+ BISON_TARGET (H5LT_PARSER H5LTparse.y ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTparse.c COMPILE_FLAGS "-d -pH5LTyy")
if (WIN32)
- FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c COMPILE_FLAGS "--wincompat --nounistd -PH5LTyy")
+ FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTanalyze.c COMPILE_FLAGS "--wincompat --nounistd -PH5LTyy")
else (WIN32)
- FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c COMPILE_FLAGS "--nounistd -PH5LTyy")
+ FLEX_TARGET (H5LT_SCANNER H5LTanalyze.l ${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTanalyze.c COMPILE_FLAGS "--nounistd -PH5LTyy")
endif (WIN32)
ADD_FLEX_BISON_DEPENDENCY(H5LT_SCANNER H5LT_PARSER)
if (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
- set (HL_SRCS
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c
- )
- set (HL_HEADERS
- ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h
- )
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c GENERATED)
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c GENERATED)
- set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h GENERATED)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.timestamp
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h
COMMAND "${CMAKE_COMMAND}"
- -D "FILE_PARSE=H5LTparse.c"
+ -D "GEN_DIR=genLT"
+ -D "FILE_PARSE=H5LTparse"
-P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake"
- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.timestamp
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTparse.c"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_command (
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.timestamp
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
COMMAND "${CMAKE_COMMAND}"
+ -D "GEN_DIR=genLT"
-D "FILE_ANALYZE=H5LTanalyze.c"
-P "${HDF_RESOURCES_DIR}/HDF5_Process_Flex_Files.cmake"
- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.timestamp
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/genLT/H5LTanalyze.c"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ add_custom_target (process_gen_H5LT
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
- add_custom_target (process_gen_H5LT DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.timestamp ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.timestamp)
-# add_custom_target (process_gen_H5LT
-# COMMAND "${CMAKE_COMMAND}"
-# -D "FILE_PARSE=${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c"
-# -D "FILE_ANALYSE=${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c"
-# -P "${HDF5_RESOURCE_DIR}/HDF5_Process_Flex_Files.cmake"
-# DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c"
-# COMMENT "Prepending pragma statements"
-# )
+ set (HL_SRCS
+ ${CMAKE_CURRENT_BINARY_DIR}/H5LTanalyze.c
+ ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.c
+ )
+ set (HL_HEADERS
+ ${CMAKE_CURRENT_BINARY_DIR}/H5LTparse.h
+ )
else (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED)
message (STATUS "Error during generate of files")
endif (BISON_H5LT_PARSER_DEFINED AND FLEX_H5LT_SCANNER_DEFINED)
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index d52a719..a6854ae 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -28,8 +28,8 @@ I. Preconditions
the HDF Install Utility (the *.msi file in the binary package for
Windows or the *.sh on Linux). If you are using a Windows platform,
you can obtain a pre-built Windows binary from The HDF Group's website
- at www.hdfgroup.org. See Section "III. Common changes to the
- HDF518_Examples.cmake file", for the line to change the location.
+ at www.hdfgroup.org.
+
========================================================================
@@ -37,40 +37,41 @@ II. Building HDF5 Examples with CMake
========================================================================
Files in the HDF5 install directory:
- HDF5Examples-0.1.1-Source folder
+ HDF5Examples folder
HDF518_Examples.cmake
Default installation process:
Create a directory to run the examples, i.e. \test_hdf5.
- Copy HDF5Examples-0.1.1-Source folder to this directory.
- Copy HDF518_Examples.cmake to this directory.
- Edit line 8 of the HDF518_Examples.cmake file and change the INSTALLDIR
- to the HDF5 install location.
-
- Execute from this directory:
- ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
-
-The script will use the examples folder HDF5Examples-0.1.1-Source,
- and create a build directory inside the HDF5Examples-0.1.1-Source directory.
- It will then configure, build, and execute the examples. All the log files
- will be found under the build\Testing\Temporary directory, check these for
- errors.
-
-The amount of script information can be increased by adding -V to the ctest
- command. Even more information can be shown by adding -VV instead of -V.
+ Copy HDF5Examples folder to this directory.
+ Copy HDF5_Examples.cmake to this directory.
+ The default source folder is defined as "HDF5Examples". It can be changed
+ with the CTEST_SOURCE_NAME script option.
+ The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
+ It can be changed with the INSTALLDIR script option.
+ The default ctest configuration is defined as "Release". It can be changed
+ with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+ be the same as the value used with the -C command line option.
+ The default build configuration is defined to build and use static libraries.
+ Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
+ Other options can be changed by editing the HDF5_Examples.cmake file.
+
+ If the defaults are okay, execute from this directory:
+ ctest -S HDF5_Examples.cmake -C Release -V -O test.log
+ If the defaults need change, execute from this directory:
+ ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log
+
+ When executed, the ctest script will save the results to the log file, test.log, as
+ indicated by the ctest command. If you wish the to see more build and test information,
+ add "-VV" to the ctest command. The output should show;
+ 100% tests passed, 0 tests failed out of 156.
========================================================================
-III. Common changes to the HDF518_Examples.cmake file
+III. Other changes to the HDF518_Examples.cmake file
========================================================================
-Line 8: change the INSTALLDIR to a different HDF5 install location.
-
-Line 14: uncomment to allow Mac machines to build shared examples.
-
-Line 15: uncomment to build and test Fortran examples.
-
-Line 16: comment to NOT build and test Fortran examples with F2003 option.
+Line 10: uncomment to build and test Fortran examples.
-Line 17: uncomment to use a compressed source file.
+Line 43-45: uncomment to use a source tarball or zipfile;
+ Add script option "TAR_SOURCE=MySource.tar".
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 5fdb76c..578f957 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -225,46 +225,165 @@ NOTE: these files are available at the HDF web site:
========================================================================
ctest
========================================================================
+cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
############################################################################
# Product specific script, HDF518_Examples.cmake, that uses the
# CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
-# "ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log"
-# where HDF5Examples-0.1.1-Source is the source folder relative to the location of these scripts
-############################################################################
-
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-
+# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+# STATICLIBRARIES - Build/use static libraries
+# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
+###############################################################################################################
+
+set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
-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}")
-set(CTEST_BUILD_CONFIGURATION "Release")
-set(MODEL "Experimental")
-
-# build generator name, see cmake generator list
-set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
-
-# machine description, can be removed on linux
-set(CTEST_SITE "machine.domain")
-set(SITE_OS_NAME "os name")
-set(SITE_OS_VERSION "os version")
-set(SITE_OS_BITS "os size")
-set(SITE_COMPILER_NAME "compiler name")
-set(SITE_COMPILER_VERSION "compiler version")
-
-# needed for source updates, change as required
-set(REPOSITORY_URL "http://svn.${hdfgroup_url}/hdf5-examples/trunk/1_8")
-
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5Examples-1.8")
-
-# location of the installed hdf5 (cmake configuration folder)
-set(ENV{HDF5_DIR} "/usr/share/cmake")
-
-include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
-
-message("DONE")
+#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+
+# handle input parameters to script.
+#INSTALLDIR - HDF5-1.8 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
+#STATICLIBRARIES - Default is YES
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+if(DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
+endif()
+if(NOT DEFINED INSTALLDIR)
+ set(INSTALLDIR "/usr/local/myhdf5")
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "HDF5Examples")
+endif()
+if(NOT DEFINED STATICLIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+
+#TAR_SOURCE - name of tarfile
+#if(NOT DEFINED TAR_SOURCE)
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source")
+#endif()
+
+###############################################################################################################
+# Adjust the following SET Commands as needed
+###############################################################################################################
+if(WIN32)
+ if(STATICLIBRARIES)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
+ 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} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
+ 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} -DHDF_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}\"")
+## --------------------------
+if(CTEST_USE_TAR_SOURCE)
+ ## Uncompress source if tar or zip file provided
+ ## --------------------------
+ if(WIN32)
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else()
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif()
+
+ if(NOT rv EQUAL 0)
+ message(STATUS "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)
+endif(CTEST_USE_TAR_SOURCE)
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_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")
+
+#-----------------------------------------------------------------------------
+configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+## NORMAL process
+## --------------------------
+ctest_start (Experimental)
+ctest_configure (BUILD "${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)
+#-----------------------------------------------------------------------------
#################################################################################
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ff69d5e..32fd1be 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -832,7 +832,7 @@ endif (MSVC OR MINGW)
if (HDF5_GENERATE_HEADERS)
add_dependencies(H5detect generate_precompiled)
else (HDF5_GENERATE_HEADERS)
- add_dependencies(H5detect "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h")
+ add_dependencies(H5detect "${H5_GENERATED_HEADERS}")
endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5detect>)
@@ -851,7 +851,7 @@ endif (MSVC OR MINGW)
if (HDF5_GENERATE_HEADERS)
add_dependencies(H5detect generate_precompiled)
else (HDF5_GENERATE_HEADERS)
- add_dependencies(H5make_libsettings "${HDF5_SRC_DIR}/H5version.h;${HDF5_SRC_DIR}/H5overflow.h")
+ add_dependencies(H5make_libsettings "${H5_GENERATED_HEADERS}")
endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5make_libsettings>)
@@ -900,7 +900,7 @@ endif (HDF5_ENABLE_DEBUG_APIS)
set (install_targets ${HDF5_LIB_TARGET})
if (BUILD_SHARED_LIBS)
- add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
+ add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
if (NOT WIN32)
@@ -945,6 +945,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
install (
FILES
${H5_PUBLIC_HEADERS}
+ ${H5_GENERATED_HEADERS}
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index b093064..98d488f 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -20,6 +20,7 @@ if (HDF5_TEST_VFD)
sec2
stdio
core
+ core_paged
split
multi
family
@@ -1158,10 +1159,16 @@ if (HDF5_TEST_VFD)
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
+ if (NOT CYGWIN)
+ set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
+ endif (NOT CYGWIN)
if (BUILD_SHARED_LIBS)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
+ if (NOT CYGWIN)
+ set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
+ endif (NOT CYGWIN)
endif (BUILD_SHARED_LIBS)
if (HDF5_TEST_FHEAP_VFD)
add_test (
diff --git a/test/cache_common.h b/test/cache_common.h
index 9e8c5ba..c07ab25 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -360,7 +360,6 @@ typedef struct test_entry_t
*/
#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
-#define H5C__HASH_FCN(x) (int)(((x) & H5C__HASH_MASK) >> 3)
#define H5C_TEST__PRE_HT_SEARCH_SC(cache_ptr, Addr) \
if ( ( (cache_ptr) == NULL ) || \