summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeFilters.cmake186
-rw-r--r--CMakeInstallation.cmake410
-rw-r--r--CMakeLists.txt1051
-rw-r--r--CTestConfig.cmake36
-rw-r--r--MANIFEST1
-rw-r--r--UserMacros.cmake8
-rwxr-xr-xbin/cmakehdf54
-rw-r--r--c++/CMakeLists.txt38
-rw-r--r--c++/examples/CMakeLists.txt32
-rw-r--r--c++/examples/CMakeTests.cmake48
-rw-r--r--c++/src/CMakeLists.txt37
-rw-r--r--c++/test/CMakeLists.txt24
-rw-r--r--c++/test/CMakeTests.cmake32
-rw-r--r--config/cmake/CTestCustom.cmake8
-rw-r--r--config/cmake/CheckTypeSize.cmake40
-rw-r--r--config/cmake/ConfigureChecks.cmake985
-rw-r--r--config/cmake/FindHDF5.cmake.in18
-rw-r--r--config/cmake/FindMPI.cmake29
-rw-r--r--config/cmake/FindSZIP.cmake158
-rw-r--r--config/cmake/HDF5Macros.cmake38
-rw-r--r--config/cmake/HDF5UseFortran.cmake68
-rw-r--r--config/cmake/HDFLibMacros.cmake230
-rw-r--r--config/cmake/HDFMacros.cmake140
-rw-r--r--config/cmake/UserMacros/Windows_MT.cmake34
-rw-r--r--config/cmake/cacheinit.cmake70
-rw-r--r--config/cmake/grepTest.cmake68
-rw-r--r--config/cmake/hdf5-config-version.cmake.in22
-rw-r--r--config/cmake/hdf5-config.cmake.build.in76
-rw-r--r--config/cmake/hdf5-config.cmake.install.in86
-rw-r--r--config/cmake/mccacheinit.cmake74
-rw-r--r--config/cmake/prunTest.cmake182
-rw-r--r--config/cmake/runTest.cmake256
-rw-r--r--config/cmake/userblockTest.cmake108
-rw-r--r--config/cmake/vfdTest.cmake60
-rw-r--r--examples/CMakeLists.txt32
-rw-r--r--examples/CMakeTests.cmake41
-rw-r--r--fortran/CMakeLists.txt32
-rw-r--r--fortran/examples/CMakeLists.txt70
-rw-r--r--fortran/examples/CMakeTests.cmake48
-rw-r--r--fortran/src/CMakeLists.txt258
-rw-r--r--fortran/test/CMakeLists.txt118
-rw-r--r--fortran/test/CMakeTests.cmake14
-rw-r--r--fortran/testpar/CMakeLists.txt18
-rw-r--r--fortran/testpar/CMakeTests.cmake2
-rw-r--r--hl/CMakeLists.txt46
-rw-r--r--hl/c++/CMakeLists.txt16
-rw-r--r--hl/c++/examples/CMakeLists.txt14
-rw-r--r--hl/c++/examples/CMakeTests.cmake6
-rw-r--r--hl/c++/src/CMakeLists.txt29
-rw-r--r--hl/c++/test/CMakeLists.txt10
-rw-r--r--hl/c++/test/CMakeTests.cmake2
-rw-r--r--hl/examples/CMakeLists.txt20
-rw-r--r--hl/examples/CMakeTests.cmake36
-rw-r--r--hl/fortran/CMakeLists.txt16
-rw-r--r--hl/fortran/examples/CMakeLists.txt22
-rw-r--r--hl/fortran/examples/CMakeTests.cmake6
-rw-r--r--hl/fortran/src/CMakeLists.txt94
-rw-r--r--hl/fortran/test/CMakeLists.txt36
-rw-r--r--hl/fortran/test/CMakeTests.cmake10
-rw-r--r--hl/src/CMakeLists.txt37
-rw-r--r--hl/test/CMakeLists.txt24
-rw-r--r--hl/test/CMakeTests.cmake40
-rw-r--r--hl/tools/CMakeLists.txt38
-rw-r--r--hl/tools/CMakeTests.cmake12
-rw-r--r--perform/CMakeLists.txt102
-rw-r--r--perform/CMakeTests.cmake42
-rw-r--r--release_docs/INSTALL_CMake.txt122
-rw-r--r--release_docs/INSTALL_parallel6
-rw-r--r--release_docs/RELEASE.txt20
-rw-r--r--release_docs/USING_HDF5_CMake.txt18
-rw-r--r--src/CMakeLists.txt225
-rw-r--r--test/CMakeLists.txt179
-rw-r--r--test/CMakeTests.cmake212
-rw-r--r--testpar/CMakeLists.txt31
-rw-r--r--testpar/CMakeTests.cmake36
-rw-r--r--tools/CMakeLists.txt28
-rw-r--r--tools/h5copy/CMakeLists.txt30
-rw-r--r--tools/h5copy/CMakeTests.cmake214
-rw-r--r--tools/h5diff/CMakeLists.txt46
-rw-r--r--tools/h5diff/CMakeTests.cmake222
-rw-r--r--tools/h5dump/CMakeLists.txt34
-rw-r--r--tools/h5dump/CMakeTests.cmake394
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake82
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake90
-rw-r--r--tools/h5import/CMakeLists.txt26
-rw-r--r--tools/h5import/CMakeTests.cmake142
-rw-r--r--tools/h5jam/CMakeLists.txt48
-rw-r--r--tools/h5jam/CMakeTests.cmake228
-rw-r--r--tools/h5ls/CMakeLists.txt18
-rw-r--r--tools/h5ls/CMakeTests.cmake76
-rw-r--r--tools/h5repack/CMakeLists.txt52
-rw-r--r--tools/h5repack/CMakeTests.cmake752
-rw-r--r--tools/h5repack/Makefile.am4
-rw-r--r--tools/h5repack/Makefile.in19
-rw-r--r--tools/h5repack/dynlib_rpk.c97
-rw-r--r--tools/h5stat/CMakeLists.txt30
-rw-r--r--tools/h5stat/CMakeTests.cmake64
-rw-r--r--tools/lib/CMakeLists.txt42
-rw-r--r--tools/misc/CMakeLists.txt54
-rw-r--r--tools/misc/CMakeTests.cmake120
100 files changed, 4973 insertions, 4736 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index bc78fa6..1a74460 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -3,12 +3,12 @@
# Options for HDF5 Filters
#-----------------------------------------------------------------------------
MACRO (HDF5_SETUP_FILTERS FILTER)
- OPTION (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
- IF (HDF5_USE_FILTER_${FILTER})
- SET (H5_HAVE_FILTER_${FILTER} 1)
- SET (FILTERS "${FILTERS} ${FILTER}")
- ENDIF (HDF5_USE_FILTER_${FILTER})
- # MESSAGE (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
+ option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
+ if (HDF5_USE_FILTER_${FILTER})
+ set (H5_HAVE_FILTER_${FILTER} 1)
+ set (FILTERS "${FILTERS} ${FILTER}")
+ endif (HDF5_USE_FILTER_${FILTER})
+ # message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
ENDMACRO (HDF5_SETUP_FILTERS)
HDF5_SETUP_FILTERS (SHUFFLE)
@@ -16,107 +16,107 @@ HDF5_SETUP_FILTERS (FLETCHER32)
HDF5_SETUP_FILTERS (NBIT)
HDF5_SETUP_FILTERS (SCALEOFFSET)
-INCLUDE (ExternalProject)
-OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
-IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- OPTION (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
- OPTION (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
- SET (ZLIB_URL ${ZLIB_SVN_URL})
- SET (SZIP_URL ${SZIP_SVN_URL})
- ELSEIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- IF (NOT TGZPATH)
- SET (TGZPATH ${HDF5_SOURCE_DIR})
- ENDIF (NOT TGZPATH)
- SET (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
- SET (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
- SET (ZLIB_USE_EXTERNAL 0)
- SET (SZIP_USE_EXTERNAL 0)
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
-ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+include (ExternalProject)
+option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
+if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
+ option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ set (ZLIB_URL ${ZLIB_SVN_URL})
+ set (SZIP_URL ${SZIP_SVN_URL})
+ elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT TGZPATH)
+ set (TGZPATH ${HDF5_SOURCE_DIR})
+ endif (NOT TGZPATH)
+ set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
+ set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
+ else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ set (ZLIB_USE_EXTERNAL 0)
+ set (SZIP_USE_EXTERNAL 0)
+ endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
-IF (HDF5_ENABLE_Z_LIB_SUPPORT)
- IF (NOT H5_ZLIB_HEADER)
- IF (NOT ZLIB_USE_EXTERNAL)
+option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
+if (HDF5_ENABLE_Z_LIB_SUPPORT)
+ if (NOT H5_ZLIB_HEADER)
+ if (NOT ZLIB_USE_EXTERNAL)
FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
- IF (NOT ZLIB_FOUND)
+ if (NOT ZLIB_FOUND)
FIND_PACKAGE (ZLIB) # Legacy find
- ENDIF (NOT ZLIB_FOUND)
- ENDIF (NOT ZLIB_USE_EXTERNAL)
- IF (ZLIB_FOUND)
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- SET (H5_ZLIB_HEADER "zlib.h")
- SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
- SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
- ELSE (ZLIB_FOUND)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (NOT ZLIB_FOUND)
+ endif (NOT ZLIB_USE_EXTERNAL)
+ if (ZLIB_FOUND)
+ set (H5_HAVE_FILTER_DEFLATE 1)
+ set (H5_HAVE_ZLIB_H 1)
+ set (H5_HAVE_LIBZ 1)
+ set (H5_ZLIB_HEADER "zlib.h")
+ set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
+ set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ else (ZLIB_FOUND)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- MESSAGE (STATUS "Filter ZLIB is built")
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (ZLIB_FOUND)
- ELSE (NOT H5_ZLIB_HEADER)
+ set (H5_HAVE_FILTER_DEFLATE 1)
+ set (H5_HAVE_ZLIB_H 1)
+ set (H5_HAVE_LIBZ 1)
+ message (STATUS "Filter ZLIB is built")
+ else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
+ endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (ZLIB_FOUND)
+ else (NOT H5_ZLIB_HEADER)
# This project is being called from within another and ZLib is already configured
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- ENDIF (NOT H5_ZLIB_HEADER)
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
- SET (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
+ set (H5_HAVE_FILTER_DEFLATE 1)
+ set (H5_HAVE_ZLIB_H 1)
+ set (H5_HAVE_LIBZ 1)
+ endif (NOT H5_ZLIB_HEADER)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
+ endif (H5_HAVE_FILTER_DEFLATE)
+ set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
- MESSAGE (STATUS "Filter ZLIB is ON")
-ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT)
+ message (STATUS "Filter ZLIB is ON")
+endif (HDF5_ENABLE_Z_LIB_SUPPORT)
#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
-IF (HDF5_ENABLE_SZIP_SUPPORT)
- OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
- IF (NOT SZIP_USE_EXTERNAL)
+option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
+if (HDF5_ENABLE_SZIP_SUPPORT)
+ option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
+ if (NOT SZIP_USE_EXTERNAL)
FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
- IF (NOT SZIP_FOUND)
+ if (NOT SZIP_FOUND)
FIND_PACKAGE (SZIP) # Legacy find
- ENDIF (NOT SZIP_FOUND)
- ENDIF (NOT SZIP_USE_EXTERNAL)
- IF (SZIP_FOUND)
- SET (H5_HAVE_FILTER_SZIP 1)
- SET (H5_HAVE_SZLIB_H 1)
- SET (H5_HAVE_LIBSZ 1)
- SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
- SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- ELSE (SZIP_FOUND)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (NOT SZIP_FOUND)
+ endif (NOT SZIP_USE_EXTERNAL)
+ if (SZIP_FOUND)
+ set (H5_HAVE_FILTER_SZIP 1)
+ set (H5_HAVE_SZLIB_H 1)
+ set (H5_HAVE_LIBSZ 1)
+ set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
+ set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
+ else (SZIP_FOUND)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
- SET (H5_HAVE_FILTER_SZIP 1)
- SET (H5_HAVE_SZLIB_H 1)
- SET (H5_HAVE_LIBSZ 1)
- MESSAGE (STATUS "Filter SZIP is built")
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (SZIP_FOUND)
- SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
+ set (H5_HAVE_FILTER_SZIP 1)
+ set (H5_HAVE_SZLIB_H 1)
+ set (H5_HAVE_LIBSZ 1)
+ message (STATUS "Filter SZIP is built")
+ else (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
+ endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (SZIP_FOUND)
+ set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
- MESSAGE (STATUS "Filter SZIP is ON")
- IF (H5_HAVE_FILTER_SZIP)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
- ENDIF (H5_HAVE_FILTER_SZIP)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (H5_HAVE_SZIP_ENCODER 1)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
-ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
+ message (STATUS "Filter SZIP is ON")
+ if (H5_HAVE_FILTER_SZIP)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
+ endif (H5_HAVE_FILTER_SZIP)
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (H5_HAVE_SZIP_ENCODER 1)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
+ endif (HDF5_ENABLE_SZIP_ENCODING)
+endif (HDF5_ENABLE_SZIP_SUPPORT)
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 1d74786..0631c61 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -2,48 +2,48 @@
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
- INSTALL (
+if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+ install (
FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
-ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- INSTALL (
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ install (
EXPORT ${HDF5_EXPORTED_TARGETS}
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
COMPONENT configinstall
)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
EXPORT (
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the hdf5-config.cmake file for the build directory
#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDES_BUILD_TIME
+set (HDF5_INCLUDES_BUILD_TIME
${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
)
-SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
-SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
-SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
+set (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
+set (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
+set (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
-CONFIGURE_FILE (
+configure_file (
${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in
${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
@@ -51,61 +51,61 @@ CONFIGURE_FILE (
#-----------------------------------------------------------------------------
# Configure the FindHDF5.cmake file for the install directory
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ configure_file (
${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
)
- INSTALL (
+ install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the hdf5-config.cmake file for the install directory
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ configure_file (
${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
)
- INSTALL (
+ install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ configure_file (
${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in
${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
)
- INSTALL (
+ install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT configinstall
)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Configure the libhdf5.settings file for the lib info
#-----------------------------------------------------------------------------
-IF (H5_WORDS_BIGENDIAN)
- SET (BYTESEX big-endian)
-ELSE (H5_WORDS_BIGENDIAN)
- SET (BYTESEX little-endian)
-ENDIF (H5_WORDS_BIGENDIAN)
-CONFIGURE_FILE (
+if (H5_WORDS_BIGENDIAN)
+ set (BYTESEX big-endian)
+else (H5_WORDS_BIGENDIAN)
+ set (BYTESEX little-endian)
+endif (H5_WORDS_BIGENDIAN)
+configure_file (
${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in
${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
)
-INSTALL (
+install (
FILES ${HDF5_BINARY_DIR}/libhdf5.settings
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
COMPONENT libraries
@@ -114,72 +114,72 @@ INSTALL (
#-----------------------------------------------------------------------------
# Configure the HDF518_Examples.cmake file and the examples
#-----------------------------------------------------------------------------
-OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
-IF (HDF5_PACK_EXAMPLES)
- CONFIGURE_FILE (
+option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
+if (HDF5_PACK_EXAMPLES)
+ configure_file (
${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
)
- INSTALL (
+ install (
FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
- IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
- INSTALL (
+ if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
+ install (
FILES
${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
- ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
-ENDIF (HDF5_PACK_EXAMPLES)
+ endif (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
+endif (HDF5_PACK_EXAMPLES)
#-----------------------------------------------------------------------------
# Configure the README.txt file for the binary package
#-----------------------------------------------------------------------------
-SET (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
-SET (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}")
-IF (WIN32)
- SET (BINARY_EXAMPLE_ENDING "zip")
- SET (BINARY_INSTALL_ENDING "exe")
- IF (CMAKE_CL_64)
- SET (BINARY_SYSTEM_NAME "win64")
- ELSE (CMAKE_CL_64)
- SET (BINARY_SYSTEM_NAME "win32")
- ENDIF (CMAKE_CL_64)
- IF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
- ELSEIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
- ENDIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
- IF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
- ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
- ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
- ELSE (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
- ENDIF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
-ELSEIF (APPLE)
- SET (BINARY_EXAMPLE_ENDING "tar.gz")
- SET (BINARY_INSTALL_ENDING "dmg")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-ELSE (WIN32)
- SET (BINARY_EXAMPLE_ENDING "tar.gz")
- SET (BINARY_INSTALL_ENDING "sh")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
- SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-ENDIF (WIN32)
-IF (HDF4_BUILD_FORTRAN)
- SET (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
-ENDIF (HDF4_BUILD_FORTRAN)
+set (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
+set (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}")
+if (WIN32)
+ set (BINARY_EXAMPLE_ENDING "zip")
+ set (BINARY_INSTALL_ENDING "exe")
+ if (CMAKE_CL_64)
+ set (BINARY_SYSTEM_NAME "win64")
+ else (CMAKE_CL_64)
+ set (BINARY_SYSTEM_NAME "win32")
+ endif (CMAKE_CL_64)
+ if (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
+ elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
+ endif (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
+ if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
+ else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
+ endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+elseif (APPLE)
+ set (BINARY_EXAMPLE_ENDING "tar.gz")
+ set (BINARY_INSTALL_ENDING "dmg")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
+else (WIN32)
+ set (BINARY_EXAMPLE_ENDING "tar.gz")
+ set (BINARY_INSTALL_ENDING "sh")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
+endif (WIN32)
+if (HDF4_BUILD_FORTRAN)
+ set (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
+endif (HDF4_BUILD_FORTRAN)
-CONFIGURE_FILE (
+configure_file (
${HDF5_RESOURCES_DIR}/README.txt.cmake.in
${HDF5_BINARY_DIR}/README.txt @ONLY
)
@@ -187,168 +187,168 @@ CONFIGURE_FILE (
#-----------------------------------------------------------------------------
# Add Document File(s) to CMake Install
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- INSTALL (
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ install (
FILES
${HDF5_SOURCE_DIR}/COPYING
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
- IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
- SET (release_files
+ if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
+ set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
- IF (WIN32 AND NOT CYGWIN)
- SET (release_files
+ if (WIN32 AND NOT CYGWIN)
+ set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
)
- ENDIF (WIN32 AND NOT CYGWIN)
- IF (HDF5_PACK_INSTALL_DOCS)
- SET (release_files
+ endif (WIN32 AND NOT CYGWIN)
+ if (HDF5_PACK_INSTALL_DOCS)
+ set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL
)
- IF (WIN32)
- IF (NOT CYGWIN)
- SET (release_files
+ if (WIN32)
+ if (NOT CYGWIN)
+ set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
)
- ELSE (NOT CYGWIN)
- SET (release_files
+ else (NOT CYGWIN)
+ set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
)
- ENDIF (NOT CYGWIN)
- ENDIF (WIN32)
- IF (HDF5_ENABLE_PARALLEL)
- SET (release_files
+ endif (NOT CYGWIN)
+ endif (WIN32)
+ if (HDF5_ENABLE_PARALLEL)
+ set (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
)
- ENDIF (HDF5_ENABLE_PARALLEL)
- ENDIF (HDF5_PACK_INSTALL_DOCS)
- INSTALL (
+ endif (HDF5_ENABLE_PARALLEL)
+ endif (HDF5_PACK_INSTALL_DOCS)
+ install (
FILES ${release_files}
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Set the cpack variables
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
- SET (CPACK_PACKAGE_VENDOR "HDF_Group")
- SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
- IF (CDASH_LOCAL)
- SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
- ELSE (CDASH_LOCAL)
- SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}")
- ENDIF (CDASH_LOCAL)
- SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
- SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
- SET (CPACK_PACKAGE_VERSION_PATCH "")
- 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")
- SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
- SET (CPACK_PACKAGE_RELOCATABLE TRUE)
- SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
- SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp")
+if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
+ set (CPACK_PACKAGE_VENDOR "HDF_Group")
+ set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
+ if (CDASH_LOCAL)
+ set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
+ else (CDASH_LOCAL)
+ set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}")
+ endif (CDASH_LOCAL)
+ set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
+ set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
+ set (CPACK_PACKAGE_VERSION_PATCH "")
+ 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")
+ set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
+ endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
+ set (CPACK_PACKAGE_RELOCATABLE TRUE)
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
+ set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp")
- SET (CPACK_GENERATOR "TGZ")
- IF (WIN32)
+ set (CPACK_GENERATOR "TGZ")
+ if (WIN32)
LIST (APPEND CPACK_GENERATOR "NSIS")
# 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
- SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}")
- IF (CMAKE_CL_64)
- SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
- SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
- ELSE (CMAKE_CL_64)
- SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
- SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
- ENDIF (CMAKE_CL_64)
+ set (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}")
+ if (CMAKE_CL_64)
+ set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+ set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
+ else (CMAKE_CL_64)
+ set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
+ set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
+ endif (CMAKE_CL_64)
# set the install/unistall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
- SET (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
- SET (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico")
# set the package header icon for MUI
- SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp")
- SET (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data")
- 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)
- ELSEIF (APPLE)
+ set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp")
+ set (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data")
+ 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)
+ elseif (APPLE)
LIST (APPEND CPACK_GENERATOR "DragNDrop")
- SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
- SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
- SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
- SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
- SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
+ set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+ set (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
+ set (CPACK_PACKAGING_INSTALL_PREFIX "/")
+ set (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
+ set (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
- IF (HDF5_PACK_MACOSX_BUNDLE)
+ if (HDF5_PACK_MACOSX_BUNDLE)
LIST (APPEND CPACK_GENERATOR "Bundle")
- SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
- SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
- SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
- SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
- SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
- SET (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
- SET (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
- SET (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
- SET (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
- SET (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}")
- SET (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
+ set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
+ set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
+ set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
+ set (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns")
+ set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
+ set (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities")
+ set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.")
+ set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
+ set (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
+ set (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}")
+ set (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
#-----------------------------------------------------------------------------
# Configure the Info.plist file for the install bundle
#-----------------------------------------------------------------------------
- CONFIGURE_FILE (
+ configure_file (
${HDF5_RESOURCES_DIR}/CPack.Info.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
)
- CONFIGURE_FILE (
+ configure_file (
${HDF5_RESOURCES_DIR}/PkgInfo.in
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
)
- CONFIGURE_FILE (
+ configure_file (
${HDF5_RESOURCES_DIR}/version.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
)
- INSTALL (
+ install (
FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo
${HDF5_BINARY_DIR}/CMakeFiles/version.plist
DESTINATION ..
)
ENDIF(HDF5_PACK_MACOSX_BUNDLE)
- ELSE (WIN32)
+ else (WIN32)
LIST (APPEND CPACK_GENERATOR "STGZ")
- SET (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+ set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
- SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
- SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
+ set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
+ set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
# LIST (APPEND CPACK_GENERATOR "RPM")
- SET (CPACK_RPM_PACKAGE_RELEASE "1")
- SET (CPACK_RPM_COMPONENT_INSTALL ON)
- SET (CPACK_RPM_PACKAGE_RELOCATABLE ON)
- SET (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
- SET (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
- SET (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
- SET (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
- SET (CPACK_RPM_PACKAGE_DESCRIPTION
+ set (CPACK_RPM_PACKAGE_RELEASE "1")
+ set (CPACK_RPM_COMPONENT_INSTALL ON)
+ set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
+ set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
+ set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
+ set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
+ set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
+ set (CPACK_RPM_PACKAGE_DESCRIPTION
"The HDF5 technology suite includes:
* A versatile data model that can represent very complex data objects and a wide variety of metadata.
@@ -368,34 +368,34 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
#-----------------------------------------------------------------------------
# Configure the spec file for the install RPM
#-----------------------------------------------------------------------------
-# CONFIGURE_FILE ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
-# SET (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
- ENDIF (WIN32)
+# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
+# 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)
+ 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;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
- IF (HDF5_PACKAGE_EXTLIBS)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
- ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- IF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
- ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (HDF5_PACKAGE_EXTLIBS)
+ if (HDF5_PACKAGE_EXTLIBS)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
+ endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
+ endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (HDF5_PACKAGE_EXTLIBS)
- INCLUDE (CPack)
+ include (CPack)
#---------------------------------------------------------------------------
# Now list the cpack commands
@@ -424,7 +424,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
GROUP Development
)
- IF (HDF5_BUILD_FORTRAN)
+ if (HDF5_BUILD_FORTRAN)
CPACK_ADD_COMPONENT (fortlibraries
DISPLAY_NAME "HDF5 Fortran Libraries"
DEPENDS libraries
@@ -435,9 +435,9 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
DEPENDS fortlibraries
GROUP Development
)
- ENDIF (HDF5_BUILD_FORTRAN)
+ endif (HDF5_BUILD_FORTRAN)
- IF (HDF5_BUILD_CPP_LIB)
+ if (HDF5_BUILD_CPP_LIB)
CPACK_ADD_COMPONENT (cpplibraries
DISPLAY_NAME "HDF5 C++ Libraries"
DEPENDS libraries
@@ -448,9 +448,9 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
DEPENDS cpplibraries
GROUP Development
)
- ENDIF (HDF5_BUILD_CPP_LIB)
+ endif (HDF5_BUILD_CPP_LIB)
- IF (HDF5_BUILD_TOOLS)
+ if (HDF5_BUILD_TOOLS)
CPACK_ADD_COMPONENT (toolsapplications
DISPLAY_NAME "HDF5 Tools Applications"
DEPENDS toolslibraries
@@ -466,9 +466,9 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
DEPENDS toolslibraries
GROUP Development
)
- ENDIF (HDF5_BUILD_TOOLS)
+ endif (HDF5_BUILD_TOOLS)
- IF (HDF5_BUILD_HL_LIB)
+ if (HDF5_BUILD_HL_LIB)
CPACK_ADD_COMPONENT (hllibraries
DISPLAY_NAME "HDF5 HL Libraries"
DEPENDS libraries
@@ -499,6 +499,6 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
DEPENDS fortlibraries
GROUP Runtime
)
- ENDIF (HDF5_BUILD_HL_LIB)
+ endif (HDF5_BUILD_HL_LIB)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48134d6..33010aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5 C CXX)
#-----------------------------------------------------------------------------
@@ -20,7 +20,7 @@ PROJECT (HDF5 C CXX)
# HDF5_EXPORTED_TARGETS :
# Set this to the name of the targets variable which controls exports
# If unset (because parent project does not support/use the
-# INSTALL (EXPORT target...) syntax), then targets are not configured
+# install (EXPORT target...) syntax), then targets are not configured
# for export during install.
#
# HDF5_LIB_DEPENDENCIES :
@@ -44,30 +44,30 @@ PROJECT (HDF5 C CXX)
# any project making use of this build of HDF5 will use the correct zlib
#
# # Tell hdf5 that we are manually overriding certain settings
-# SET(HDF5_EXTERNALLY_CONFIGURED 1)
+# set (HDF5_EXTERNALLY_CONFIGURED 1)
# # Avoid duplicating names of installed libraries
-# SET(HDF5_EXTERNAL_LIB_PREFIX "vtk")
+# set (HDF5_EXTERNAL_LIB_PREFIX "vtk")
# # Export configuration to this export variable
-# SET(HDF5_EXPORTED_TARGETS "paraview-targets")
+# set (HDF5_EXPORTED_TARGETS "paraview-targets")
#
# # Setup all necessary overrides for zlib so that HDF5 uses our
# # internally compiled zlib rather than any other version
-# IF(HDF5_ENABLE_Z_LIB_SUPPORT)
+# if (HDF5_ENABLE_Z_LIB_SUPPORT)
# # We must tell the main HDF5 library that it depends on our zlib
-# SET(HDF5_LIB_DEPENDENCIES vtkzlib)
+# set (HDF5_LIB_DEPENDENCIES vtkzlib)
# # Override the zlib header file
-# IF(VTK_USE_SYSTEM_ZLIB)
-# SET(H5_ZLIB_HEADER "zlib.h")
-# ELSE(VTK_USE_SYSTEM_ZLIB)
-# SET(H5_ZLIB_HEADER "vtk_zlib.h")
+# if (VTK_USE_SYSTEM_ZLIB)
+# set (H5_ZLIB_HEADER "zlib.h")
+# else (VTK_USE_SYSTEM_ZLIB)
+# set (H5_ZLIB_HEADER "vtk_zlib.h")
# # Set vars that FindZlib would have set if used in sub project
-# SET(ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}")
-# SET(ZLIB_LIBRARIES vtkzlib)
-# ENDIF(VTK_USE_SYSTEM_ZLIB)
-# ENDIF(HDF5_ENABLE_Z_LIB_SUPPORT)
+# set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}")
+# set (ZLIB_LIBRARIES vtkzlib)
+# endif (VTK_USE_SYSTEM_ZLIB)
+# endif (HDF5_ENABLE_Z_LIB_SUPPORT)
#
# # Add the sub project
-# ADD_SUBDIRECTORY(Utilities/hdf5-1.8)
+# add_subdirectory (Utilities/hdf5-1.8)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
@@ -77,281 +77,277 @@ PROJECT (HDF5 C CXX)
# organization feature. Default to ON for non-Express users. Express users must
# explicitly turn off this option to build HDF5 in the Express IDE...
#
-OPTION (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
-MARK_AS_ADVANCED (HDF5_USE_FOLDERS)
-IF (HDF5_USE_FOLDERS)
- SET_PROPERTY (GLOBAL PROPERTY USE_FOLDERS ON)
-ENDIF (HDF5_USE_FOLDERS)
-OPTION (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
-MARK_AS_ADVANCED (HDF5_NO_PACKAGES)
+option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
+mark_as_advanced (HDF5_USE_FOLDERS)
+if (HDF5_USE_FOLDERS)
+ set_property (GLOBAL PROPERTY USE_FOLDERS ON)
+endif (HDF5_USE_FOLDERS)
+option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
+mark_as_advanced (HDF5_NO_PACKAGES)
#-----------------------------------------------------------------------------
# Set the core names of all the libraries
#-----------------------------------------------------------------------------
-SET (HDF5_LIB_CORENAME "hdf5")
-SET (HDF5_TEST_LIB_CORENAME "hdf5_test")
-SET (HDF5_CPP_LIB_CORENAME "hdf5_cpp")
-SET (HDF5_HL_LIB_CORENAME "hdf5_hl")
-SET (HDF5_HL_CPP_LIB_CORENAME "hdf5_hl_cpp")
-SET (HDF5_TOOLS_LIB_CORENAME "hdf5_tools")
-SET (HDF5_F90_LIB_CORENAME "hdf5_fortran")
-SET (HDF5_F90_C_LIB_CORENAME "hdf5_f90cstub")
-SET (HDF5_F90_TEST_LIB_CORENAME "hdf5_test_fortran")
-SET (HDF5_F90_C_TEST_LIB_CORENAME "hdf5_test_f90cstub")
-SET (HDF5_HL_F90_LIB_CORENAME "hdf5_hl_fortran")
-SET (HDF5_HL_F90_C_LIB_CORENAME "hdf5_hl_f90cstub")
+set (HDF5_LIB_CORENAME "hdf5")
+set (HDF5_TEST_LIB_CORENAME "hdf5_test")
+set (HDF5_CPP_LIB_CORENAME "hdf5_cpp")
+set (HDF5_HL_LIB_CORENAME "hdf5_hl")
+set (HDF5_HL_CPP_LIB_CORENAME "hdf5_hl_cpp")
+set (HDF5_TOOLS_LIB_CORENAME "hdf5_tools")
+set (HDF5_F90_LIB_CORENAME "hdf5_fortran")
+set (HDF5_F90_C_LIB_CORENAME "hdf5_f90cstub")
+set (HDF5_F90_TEST_LIB_CORENAME "hdf5_test_fortran")
+set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5_test_f90cstub")
+set (HDF5_HL_F90_LIB_CORENAME "hdf5_hl_fortran")
+set (HDF5_HL_F90_C_LIB_CORENAME "hdf5_hl_f90cstub")
#-----------------------------------------------------------------------------
# Set the true names of all the libraries if customized by external project
#-----------------------------------------------------------------------------
-SET (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}")
-SET (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}")
-SET (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}")
-SET (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}")
-SET (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}")
-SET (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}")
-SET (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}")
-SET (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}")
-SET (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}")
-SET (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}")
-SET (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
-SET (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
+set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}")
+set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}")
+set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}")
+set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}")
+set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}")
+set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}")
+set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}")
+set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}")
+set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}")
+set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}")
+set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
+set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
#-----------------------------------------------------------------------------
# Set the target names of all the libraries
#-----------------------------------------------------------------------------
-SET (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})
-SET (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME})
-SET (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME})
-SET (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME})
-SET (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME})
-SET (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME})
-SET (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME})
-SET (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME})
-SET (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME})
-SET (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME})
-SET (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME})
-SET (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
+set (HDF5_LIB_TARGET ${HDF5_LIB_CORENAME})
+set (HDF5_TEST_LIB_TARGET ${HDF5_TEST_LIB_CORENAME})
+set (HDF5_CPP_LIB_TARGET ${HDF5_CPP_LIB_CORENAME})
+set (HDF5_HL_LIB_TARGET ${HDF5_HL_LIB_CORENAME})
+set (HDF5_HL_CPP_LIB_TARGET ${HDF5_HL_CPP_LIB_CORENAME})
+set (HDF5_TOOLS_LIB_TARGET ${HDF5_TOOLS_LIB_CORENAME})
+set (HDF5_F90_LIB_TARGET ${HDF5_F90_LIB_CORENAME})
+set (HDF5_F90_C_LIB_TARGET ${HDF5_F90_C_LIB_CORENAME})
+set (HDF5_F90_TEST_LIB_TARGET ${HDF5_F90_TEST_LIB_CORENAME})
+set (HDF5_F90_C_TEST_LIB_TARGET ${HDF5_F90_C_TEST_LIB_CORENAME})
+set (HDF5_HL_F90_LIB_TARGET ${HDF5_HL_F90_LIB_CORENAME})
+set (HDF5_HL_F90_C_LIB_TARGET ${HDF5_HL_F90_C_LIB_CORENAME})
#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
#-----------------------------------------------------------------------------
-SET (HDF5_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
-SET (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
-SET (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
-SET (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
-SET (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
-SET (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
-SET (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
-SET (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools)
-SET (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/perform)
-SET (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
-
-IF (NOT HDF5_INSTALL_BIN_DIR)
- SET (HDF5_INSTALL_BIN_DIR bin)
-ENDIF (NOT HDF5_INSTALL_BIN_DIR)
-IF (NOT HDF5_INSTALL_LIB_DIR)
- SET (HDF5_INSTALL_LIB_DIR lib)
-ENDIF (NOT HDF5_INSTALL_LIB_DIR)
-IF (NOT HDF5_INSTALL_INCLUDE_DIR)
- SET (HDF5_INSTALL_INCLUDE_DIR include)
-ENDIF (NOT HDF5_INSTALL_INCLUDE_DIR)
-IF (NOT HDF5_INSTALL_DATA_DIR)
- IF (NOT WIN32)
- SET (HDF5_INSTALL_DATA_DIR share)
- SET (HDF5_INSTALL_CMAKE_DIR share/cmake)
- ELSE (NOT WIN32)
- SET (HDF5_INSTALL_DATA_DIR ".")
- SET (HDF5_INSTALL_CMAKE_DIR cmake)
- ENDIF (NOT WIN32)
-ENDIF (NOT HDF5_INSTALL_DATA_DIR)
+set (HDF5_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
+set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
+set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
+set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
+set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
+set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
+set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
+set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools)
+set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/perform)
+set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
+
+if (NOT HDF5_INSTALL_BIN_DIR)
+ set (HDF5_INSTALL_BIN_DIR bin)
+endif (NOT HDF5_INSTALL_BIN_DIR)
+if (NOT HDF5_INSTALL_LIB_DIR)
+ set (HDF5_INSTALL_LIB_DIR lib)
+endif (NOT HDF5_INSTALL_LIB_DIR)
+if (NOT HDF5_INSTALL_INCLUDE_DIR)
+ set (HDF5_INSTALL_INCLUDE_DIR include)
+endif (NOT HDF5_INSTALL_INCLUDE_DIR)
+if (NOT HDF5_INSTALL_DATA_DIR)
+ if (NOT WIN32)
+ set (HDF5_INSTALL_DATA_DIR share)
+ set (HDF5_INSTALL_CMAKE_DIR share/cmake)
+ else (NOT WIN32)
+ set (HDF5_INSTALL_DATA_DIR ".")
+ set (HDF5_INSTALL_CMAKE_DIR cmake)
+ endif (NOT WIN32)
+endif (NOT HDF5_INSTALL_DATA_DIR)
#-----------------------------------------------------------------------------
# parse the full version number from H5public.h and include in H5_VERS_INFO
#-----------------------------------------------------------------------------
-FILE (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents)
-STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$"
+file (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents)
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MAJOR ${_h5public_h_contents})
-STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$"
"\\1" H5_VERS_MINOR ${_h5public_h_contents})
-STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
-STRING (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*)\".*$"
+string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
-#MESSAGE (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
+#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
#-----------------------------------------------------------------------------
# parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO
#-----------------------------------------------------------------------------
-FILE (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents)
-STRING (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
+file (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents)
+string (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_SOVERS_INTERFACE ${_lt_vers_am_contents})
-STRING (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
+string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_SOVERS_MINOR ${_lt_vers_am_contents})
-STRING (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
+string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_SOVERS_RELEASE ${_lt_vers_am_contents})
-MATH(EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE})
-MESSAGE (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
+MATH (EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE})
+message (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
#-----------------------------------------------------------------------------
# Basic HDF5 stuff here
#-----------------------------------------------------------------------------
-SET (HDF5_PACKAGE "hdf5")
-SET (HDF5_PACKAGE_NAME "HDF5")
-SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
-SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
-SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
-IF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
- SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
-ELSE (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
- SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
-ENDIF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
-SET (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
-SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}")
-SET (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}")
-SET (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
-SET (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
+set (HDF5_PACKAGE "hdf5")
+set (HDF5_PACKAGE_NAME "HDF5")
+set (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
+set (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
+set (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
+if (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+ set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
+else (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+ set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
+endif (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+set (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}")
+set (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}")
+set (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}")
+set (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
+set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
#-----------------------------------------------------------------------------
# Set Install folder value
#-----------------------------------------------------------------------------
-IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- IF(CMAKE_HOST_UNIX)
- SET(CMAKE_INSTALL_PREFIX "/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ if (CMAKE_HOST_UNIX)
+ set (CMAKE_INSTALL_PREFIX "/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- ELSE(CMAKE_HOST_UNIX)
+ else (CMAKE_HOST_UNIX)
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
- SET(CMAKE_INSTALL_PREFIX
+ set (CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- SET(CMAKE_GENERIC_PROGRAM_FILES)
- ENDIF(CMAKE_HOST_UNIX)
-ENDIF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set (CMAKE_GENERIC_PROGRAM_FILES)
+ endif (CMAKE_HOST_UNIX)
+endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#-----------------------------------------------------------------------------
# Include some macros for reusable code
#-----------------------------------------------------------------------------
-INCLUDE (${HDF5_RESOURCES_DIR}/HDFMacros.cmake)
-INCLUDE (${HDF5_RESOURCES_DIR}/HDFLibMacros.cmake)
-INCLUDE (${HDF5_RESOURCES_DIR}/HDF5Macros.cmake)
+include (${HDF5_RESOURCES_DIR}/HDFMacros.cmake)
+include (${HDF5_RESOURCES_DIR}/HDFLibMacros.cmake)
+include (${HDF5_RESOURCES_DIR}/HDF5Macros.cmake)
#-----------------------------------------------------------------------------
# Setup output Directories
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables."
)
- SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries"
)
- SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries."
)
- SET (CMAKE_Fortran_MODULE_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin/fortran CACHE PATH "Single Directory for all fortran modules."
+ set (CMAKE_Fortran_MODULE_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules."
)
-ELSE (NOT HDF5_EXTERNALLY_CONFIGURED)
+else (NOT HDF5_EXTERNALLY_CONFIGURED)
# if we are externally configured, but the project uses old cmake scripts
# this may not be set and utilities like H5detect will fail
- IF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
- SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
- ENDIF (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+ endif (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Targets built within this project are exported at Install time for use
# by other projects using FindHDF5.
#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXPORTED_TARGETS)
- SET (HDF5_EXPORTED_TARGETS "hdf5-targets")
-ENDIF (NOT HDF5_EXPORTED_TARGETS)
+if (NOT HDF5_EXPORTED_TARGETS)
+ set (HDF5_EXPORTED_TARGETS "hdf5-targets")
+endif (NOT HDF5_EXPORTED_TARGETS)
#-----------------------------------------------------------------------------
# To include a library in the list exported by the project AT BUILD TIME,
# add it to this variable. This is NOT used by Make Install, but for projects
# which include hdf5 as a sub-project within their build tree
#-----------------------------------------------------------------------------
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "")
-SET (EXTERNAL_HEADER_LIST "")
-SET (EXTERNAL_LIBRARY_LIST "")
-SET (EXTERNAL_LIBRARYDLL_LIST "")
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "")
+set (EXTERNAL_HEADER_LIST "")
+set (EXTERNAL_LIBRARY_LIST "")
+set (EXTERNAL_LIBRARYDLL_LIST "")
#-----------------------------------------------------------------------------
# Run all the CMake configuration tests for our build environment
#-----------------------------------------------------------------------------
-INCLUDE (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake)
+include (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake)
+
+set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
#-----------------------------------------------------------------------------
# Option to Build Shared/Static libs, default is static
#-----------------------------------------------------------------------------
-OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
-SET (LIB_TYPE STATIC)
-SET (H5_ENABLE_SHARED_LIB NO)
-SET (H5_ENABLE_STATIC_LIB NO)
-IF (BUILD_SHARED_LIBS)
- SET (LIB_TYPE SHARED)
- SET (H5_BUILT_AS_DYNAMIC_LIB 1)
- SET (H5_ENABLE_SHARED_LIB YES)
-ELSE (BUILD_SHARED_LIBS)
- SET (H5_BUILT_AS_STATIC_LIB 1)
- SET (H5_ENABLE_STATIC_LIB YES)
- 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)
+option (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
+set (LIB_TYPE STATIC)
+set (H5_ENABLE_SHARED_LIB NO)
+set (H5_ENABLE_STATIC_LIB NO)
+if (BUILD_SHARED_LIBS)
+ set (LIB_TYPE SHARED)
+ set (H5_BUILT_AS_DYNAMIC_LIB 1)
+ set (H5_ENABLE_SHARED_LIB YES)
+else (BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_STATIC_LIB 1)
+ set (H5_ENABLE_STATIC_LIB YES)
+ set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
-OPTION (BUILD_STATIC_EXECS "Build Static Executabless" OFF)
-IF (BUILD_STATIC_EXECS)
- IF (NOT WIN32)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
- ENDIF (NOT WIN32)
-ENDIF (BUILD_STATIC_EXECS)
+option (BUILD_STATIC_EXECS "Build Static Executabless" OFF)
+if (BUILD_STATIC_EXECS)
+ if (NOT WIN32)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
+ endif (NOT WIN32)
+endif (BUILD_STATIC_EXECS)
#-----------------------------------------------------------------------------
# Option to use code coverage
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
-IF (HDF5_ENABLE_COVERAGE)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- SET (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
-ENDIF (HDF5_ENABLE_COVERAGE)
+option (HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF)
+if (HDF5_ENABLE_COVERAGE)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
+endif (HDF5_ENABLE_COVERAGE)
#-----------------------------------------------------------------------------
# Option to indicate using dmalloc
#-----------------------------------------------------------------------------
-# OPTION (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF)
-# IF (HDF5_ENABLE_USING_DMALLOC)
-# FIND_PACKAGE (DMALLOC)
-# SET (H5_HAVE_DMALLOC DMALLOC_FOUND)
-# ENDIF (HDF5_ENABLE_USING_DMALLOC)
+# option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF)
+# if (HDF5_ENABLE_USING_DMALLOC)
+# find_package (DMALLOC)
+# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
+# endif (HDF5_ENABLE_USING_DMALLOC)
#-----------------------------------------------------------------------------
# Option to indicate using a memory checker
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
-IF (HDF5_ENABLE_USING_MEMCHECKER)
- SET (H5_USING_MEMCHECKER 1)
-ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+option (HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF)
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ set (H5_USING_MEMCHECKER 1)
+endif (HDF5_ENABLE_USING_MEMCHECKER)
#-----------------------------------------------------------------------------
# Option to use deprecated public API symbols
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
-IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- SET (H5_NO_DEPRECATED_SYMBOLS 0)
-ELSE (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- SET (H5_NO_DEPRECATED_SYMBOLS 1)
-ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+option (HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
+if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ set (H5_NO_DEPRECATED_SYMBOLS 0)
+else (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ set (H5_NO_DEPRECATED_SYMBOLS 1)
+endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-----------------------------------------------------------------------------
# When building utility executables that generate other (source) files :
@@ -359,296 +355,290 @@ ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
# Certain systems may add /Debug or /Release to output paths
# and we need to call the executable from inside the CMake configuration
#-----------------------------------------------------------------------------
-SET (EXE_EXT "")
-IF (WIN32)
- SET (EXE_EXT ".exe")
- IF (NOT CYGWIN)
- ADD_DEFINITIONS (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
- ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
- ADD_DEFINITIONS (-D_CONSOLE)
- ENDIF (NOT CYGWIN)
-ENDIF (WIN32)
-
-IF (MSVC)
- SET (CMAKE_MFC_FLAG 0)
- SET (WIN_COMPILE_FLAGS "")
- SET (WIN_LINK_FLAGS "")
-ENDIF (MSVC)
-
-SET (MAKE_SYSTEM)
-IF (CMAKE_BUILD_TOOL MATCHES "make")
- SET (MAKE_SYSTEM 1)
-ENDIF (CMAKE_BUILD_TOOL MATCHES "make")
-
-SET (CFG_INIT "/${CMAKE_CFG_INTDIR}")
-IF (MAKE_SYSTEM)
- SET (CFG_INIT "")
-ENDIF (MAKE_SYSTEM)
+set (EXE_EXT "")
+if (WIN32)
+ set (EXE_EXT ".exe")
+ if (NOT CYGWIN)
+ add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
+ add_definitions (-D_CONSOLE)
+ endif (NOT CYGWIN)
+endif (WIN32)
+
+if (MSVC)
+ set (CMAKE_MFC_FLAG 0)
+ set (WIN_COMPILE_FLAGS "")
+ set (WIN_LINK_FLAGS "")
+endif (MSVC)
+
+set (MAKE_SYSTEM)
+if (CMAKE_BUILD_TOOL MATCHES "make")
+ set (MAKE_SYSTEM 1)
+endif (CMAKE_BUILD_TOOL MATCHES "make")
+
+set (CFG_INIT "/${CMAKE_CFG_INTDIR}")
+if (MAKE_SYSTEM)
+ set (CFG_INIT "")
+endif (MAKE_SYSTEM)
#-----------------------------------------------------------------------------
# Add some definitions for Debug Builds
#-----------------------------------------------------------------------------
-IF (CMAKE_BUILD_TYPE MATCHES Debug)
- ADD_DEFINITIONS (-DDEBUG)
- ADD_DEFINITIONS (
- -DH5Z_DEBUG -DH5V_DEBUG -DH5T_DEBUG
- -DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG
- -DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG
- -DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG
- )
+if (CMAKE_BUILD_TYPE MATCHES Debug)
+ add_definitions (-DDEBUG)
# Enable tracing of the API
- OPTION (HDF5_ENABLE_TRACE "Enable API tracing capability" ON)
- IF (HDF5_ENABLE_TRACE)
- ADD_DEFINITIONS (-DH5_DEBUG_API )
- ENDIF (HDF5_ENABLE_TRACE)
+ option (HDF5_ENABLE_TRACE "Enable API tracing capability" ON)
+ if (HDF5_ENABLE_TRACE)
+ add_definitions (-DH5_DEBUG_API )
+ endif (HDF5_ENABLE_TRACE)
# Enable instrumenting of the library's internal operations
- OPTION (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)
- IF (HDF5_ENABLE_INSTRUMENT)
- SET (H5_HAVE_INSTRUMENTED_LIBRARY 1)
- ENDIF (HDF5_ENABLE_INSTRUMENT)
- MARK_AS_ADVANCED (HDF5_Enable_Instrument)
+ option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)
+ if (HDF5_ENABLE_INSTRUMENT)
+ set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
+ endif (HDF5_ENABLE_INSTRUMENT)
+ mark_as_advanced (HDF5_Enable_Instrument)
#-- NMake Makefiles will overwhelm the console with warnings if -Wall is used.
- IF (NOT WIN32)
- ADD_DEFINITIONS (-Wall)
- ENDIF (NOT WIN32)
-ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
- ADD_DEFINITIONS (-DNDEBUG)
- OPTION (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
- IF (HDF5_ENABLE_TRACE)
- ADD_DEFINITIONS (-DH5_DEBUG_API )
- ENDIF (HDF5_ENABLE_TRACE)
-ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
+ if (NOT WIN32)
+ add_definitions (-Wall)
+ endif (NOT WIN32)
+else (CMAKE_BUILD_TYPE MATCHES Debug)
+ add_definitions (-DNDEBUG)
+ option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
+ if (HDF5_ENABLE_TRACE)
+ add_definitions (-DH5_DEBUG_API )
+ endif (HDF5_ENABLE_TRACE)
+endif (CMAKE_BUILD_TYPE MATCHES Debug)
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
-IF (CMAKE_COMPILER_IS_GNUCC)
- IF (CMAKE_BUILD_TYPE MATCHES Debug)
- SET (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -finline-functions -fno-common")
- ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
- SET (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common")
- ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
-ENDIF (CMAKE_COMPILER_IS_GNUCC)
-IF (CMAKE_COMPILER_IS_GNUCXX)
- IF (CMAKE_BUILD_TYPE MATCHES Debug)
- SET (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -finline-functions -fno-common")
- ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
- SET (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common")
- ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
-ENDIF (CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCC)
+ if (CMAKE_BUILD_TYPE MATCHES Debug)
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -finline-functions -fno-common")
+ else (CMAKE_BUILD_TYPE MATCHES Debug)
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common")
+ endif (CMAKE_BUILD_TYPE MATCHES Debug)
+endif (CMAKE_COMPILER_IS_GNUCC)
+if (CMAKE_COMPILER_IS_GNUCXX)
+ if (CMAKE_BUILD_TYPE MATCHES Debug)
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -finline-functions -fno-common")
+ else (CMAKE_BUILD_TYPE MATCHES Debug)
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common")
+ endif (CMAKE_BUILD_TYPE MATCHES Debug)
+endif (CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
# Option to embed library info into executables
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON)
-IF (HDF5_ENABLE_EMBEDDED_LIBINFO)
- SET (H5_HAVE_EMBEDDED_LIBINFO 1)
-ENDIF (HDF5_ENABLE_EMBEDDED_LIBINFO)
+option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON)
+if (HDF5_ENABLE_EMBEDDED_LIBINFO)
+ set (H5_HAVE_EMBEDDED_LIBINFO 1)
+endif (HDF5_ENABLE_EMBEDDED_LIBINFO)
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
#-----------------------------------------------------------------------------
-OPTION (HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF)
-IF (HDF5_DISABLE_COMPILER_WARNINGS)
+option (HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF)
+if (HDF5_DISABLE_COMPILER_WARNINGS)
# MSVC uses /w to suppress warnings. It also complains if another
# warning level is given, so remove it.
- IF (MSVC)
- SET (HDF5_WARNINGS_BLOCKED 1)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
- ENDIF (MSVC)
- IF (WIN32 AND NOT CYGWIN)
- ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS)
- ENDIF (WIN32 AND NOT CYGWIN)
+ if (MSVC)
+ set (HDF5_WARNINGS_BLOCKED 1)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
+ endif (MSVC)
+ if (WIN32 AND NOT CYGWIN)
+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
+ endif (WIN32 AND NOT CYGWIN)
# Borland uses -w- to suppress warnings.
- IF (BORLAND)
- SET (HDF5_WARNINGS_BLOCKED 1)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
- ENDIF (BORLAND)
+ if (BORLAND)
+ set (HDF5_WARNINGS_BLOCKED 1)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
+ endif (BORLAND)
# Most compilers use -w to suppress warnings.
- IF (NOT HDF5_WARNINGS_BLOCKED)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
- ENDIF (NOT HDF5_WARNINGS_BLOCKED)
-ENDIF (HDF5_DISABLE_COMPILER_WARNINGS)
+ if (NOT HDF5_WARNINGS_BLOCKED)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
+ endif (NOT HDF5_WARNINGS_BLOCKED)
+endif (HDF5_DISABLE_COMPILER_WARNINGS)
#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so
# break into groups (from the config/gnu-flags file)
#-----------------------------------------------------------------------------
-IF (NOT MSVC)
- 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")
+if (NOT MSVC)
+ 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")
+ # set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional")
# Don't use the '-Wtraditional-conversion' flag, there's too many warnings
# from GCC's assert macro
- # SET (H5_CFLAGS "${H5_CFLAGS} -Wtraditional-conversion")
+ # set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional-conversion")
# Append warning flags from gcc-3* case
# (don't use -Wpadded flag for normal builds, many of the warnings its
# issuing can't be fixed and they are making it hard to detect other,
# more important warnings)
- #SET (H5_CFLAGS "${H5_CFLAGS} -Wfloat-equal -Wmissing-format-attribute -Wpadded")
- SET (H5_CFLAGS1 "${H5_CFLAGS1} -Wfloat-equal -Wmissing-format-attribute")
+ #set (H5_CFLAGS "${H5_CFLAGS} -Wfloat-equal -Wmissing-format-attribute -Wpadded")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wfloat-equal -Wmissing-format-attribute")
# Append warning flags from gcc-3.2* case
- SET (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn -Wpacked -Wdisabled-optimization")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn -Wpacked -Wdisabled-optimization")
# Enable more format checking flags, beyond the basic -Wformat included
# in -Wall
- SET (H5_CFLAGS1 "${H5_CFLAGS1} -Wformat=2")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wformat=2")
# The "unreachable code" warning appears to be reliable now...
# (this warning was removed in gcc 4.5+)
- #SET (H5_CFLAGS "${H5_CFLAGS} -Wunreachable-code")
+ #set (H5_CFLAGS "${H5_CFLAGS} -Wunreachable-code")
# Append warning flags from gcc-3.3* case
- SET (H5_CFLAGS1 "${H5_CFLAGS1} -Wendif-labels")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wendif-labels")
# Append warning flags from gcc-3.4* case
- SET (H5_CFLAGS2 "${H5_CFLAGS2} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
# Append more extra warning flags that only gcc4.0+ know about
- SET (H5_CFLAGS2 "${H5_CFLAGS2} -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros")
# Append more extra warning flags that only gcc 4.1+ know about
- SET (H5_CFLAGS3 "${H5_CFLAGS3} -Wunsafe-loop-optimizations -Wc++-compat")
+ set (H5_CFLAGS3 "${H5_CFLAGS3} -Wunsafe-loop-optimizations -Wc++-compat")
# Append more extra warning flags that only gcc 4.2+ know about
- SET (H5_CFLAGS3 "${H5_CFLAGS3} -Wstrict-overflow")
+ set (H5_CFLAGS3 "${H5_CFLAGS3} -Wstrict-overflow")
# Append more extra warning flags that only gcc 4.3+ know about
#
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... -QAK
- SET (H5_CFLAGS3 "${H5_CFLAGS3} -Wlogical-op -Wlarger-than=2048 -Wvla")
+ set (H5_CFLAGS3 "${H5_CFLAGS3} -Wlogical-op -Wlarger-than=2048 -Wvla")
# Append more extra warning flags that only gcc 4.4+ know about
- SET (H5_CFLAGS4 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
+ set (H5_CFLAGS4 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
# Append more extra warning flags that only gcc 4.5+ know about
- SET (H5_CFLAGS4 "${H5_CFLAGS4} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
+ set (H5_CFLAGS4 "${H5_CFLAGS4} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
# Append more extra warning flags that only gcc 4.6+ know about
- SET (H5_CFLAGS5 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines")
+ set (H5_CFLAGS5 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines")
# Append more extra warning flags that only gcc 4.7+ know about
- SET (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
-ENDIF (NOT MSVC)
+ set (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
+endif (NOT MSVC)
#-----------------------------------------------------------------------------
# Option to allow the user to enable all warnings
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
-IF (HDF5_ENABLE_ALL_WARNINGS)
- IF (MSVC)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
- ELSE (MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
- ENDIF (MSVC)
-ENDIF (HDF5_ENABLE_ALL_WARNINGS)
+option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
+if (HDF5_ENABLE_ALL_WARNINGS)
+ if (MSVC)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
+ else (MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
+ endif (MSVC)
+endif (HDF5_ENABLE_ALL_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPZERO_WARNINGS "Enable group zero warnings" OFF)
-IF (HDF5_ENABLE_GROUPZERO_WARNINGS)
- IF (MSVC)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
- ELSE (MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
- ENDIF (MSVC)
-ENDIF (HDF5_ENABLE_GROUPZERO_WARNINGS)
+option (HDF5_ENABLE_GROUPZERO_WARNINGS "Enable group zero warnings" OFF)
+if (HDF5_ENABLE_GROUPZERO_WARNINGS)
+ if (MSVC)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
+ else (MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
+ endif (MSVC)
+endif (HDF5_ENABLE_GROUPZERO_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPONE_WARNINGS "Enable group one warnings" OFF)
-IF (HDF5_ENABLE_GROUPONE_WARNINGS)
- IF (MSVC)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
- ELSE (MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
- ENDIF (MSVC)
-ENDIF (HDF5_ENABLE_GROUPONE_WARNINGS)
+option (HDF5_ENABLE_GROUPONE_WARNINGS "Enable group one warnings" OFF)
+if (HDF5_ENABLE_GROUPONE_WARNINGS)
+ if (MSVC)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
+ else (MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
+ endif (MSVC)
+endif (HDF5_ENABLE_GROUPONE_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPTWO_WARNINGS "Enable group two warnings" OFF)
-IF (HDF5_ENABLE_GROUPTWO_WARNINGS)
- IF (MSVC)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
- ELSE (MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
- ENDIF (MSVC)
-ENDIF (HDF5_ENABLE_GROUPTWO_WARNINGS)
+option (HDF5_ENABLE_GROUPTWO_WARNINGS "Enable group two warnings" OFF)
+if (HDF5_ENABLE_GROUPTWO_WARNINGS)
+ if (MSVC)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+ else (MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
+ endif (MSVC)
+endif (HDF5_ENABLE_GROUPTWO_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPTHREE_WARNINGS "Enable group three warnings" OFF)
-IF (HDF5_ENABLE_GROUPTHREE_WARNINGS)
- IF (MSVC)
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
- STRING (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
- ELSE (MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
- ENDIF (MSVC)
-ENDIF (HDF5_ENABLE_GROUPTHREE_WARNINGS)
+option (HDF5_ENABLE_GROUPTHREE_WARNINGS "Enable group three warnings" OFF)
+if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
+ if (MSVC)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ else (MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
+ endif (MSVC)
+endif (HDF5_ENABLE_GROUPTHREE_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF)
-IF (HDF5_ENABLE_GROUPFOUR_WARNINGS)
- IF (NOT MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS4}")
- ENDIF (NOT MSVC)
-ENDIF (HDF5_ENABLE_GROUPFOUR_WARNINGS)
+option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF)
+if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
+ if (NOT MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS4}")
+ endif (NOT MSVC)
+endif (HDF5_ENABLE_GROUPFOUR_WARNINGS)
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_GROUPFIVE_WARNINGS "Enable group five warnings" OFF)
-IF (HDF5_ENABLE_GROUPFIVE_WARNINGS)
- IF (NOT MSVC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS5}")
- ENDIF (NOT MSVC)
-ENDIF (HDF5_ENABLE_GROUPFIVE_WARNINGS)
+option (HDF5_ENABLE_GROUPFIVE_WARNINGS "Enable group five warnings" OFF)
+if (HDF5_ENABLE_GROUPFIVE_WARNINGS)
+ if (NOT MSVC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS5}")
+ endif (NOT MSVC)
+endif (HDF5_ENABLE_GROUPFIVE_WARNINGS)
#-----------------------------------------------------------------------------
# This is in here to help some of the GCC based IDES like Eclipse
# and code blocks parse the compiler errors and warnings better.
#-----------------------------------------------------------------------------
-IF (CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
-ENDIF (CMAKE_COMPILER_IS_GNUCC)
-IF (CMAKE_COMPILER_IS_GNUCXX)
- SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
-ENDIF (CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
+endif (CMAKE_COMPILER_IS_GNUCC)
+if (CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
+endif (CMAKE_COMPILER_IS_GNUCXX)
#-----------------------------------------------------------------------------
# All libs/tests/examples need the main include directories
@@ -658,143 +648,143 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_D
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
-SET (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
-OPTION (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
-IF (HDF5_ENABLE_PARALLEL)
- INCLUDE (FindMPI)
+set (CMAKE_MODULE_PATH ${HDF5_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
+option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
+if (HDF5_ENABLE_PARALLEL)
+ include (FindMPI)
INCLUDE_DIRECTORIES (${MPI_C_INCLUDE_PATH})
- IF (MPI_C_FOUND)
- SET (H5_HAVE_PARALLEL 1)
+ if (MPI_C_FOUND)
+ set (H5_HAVE_PARALLEL 1)
# MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail
# and once set, they are cached as false and not regenerated
- SET (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}" )
+ set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}" )
CHECK_FUNCTION_EXISTS (MPI_File_get_size H5_HAVE_MPI_GET_SIZE)
- SET (H5_MPI_FILE_SET_SIZE_BIG 1)
+ set (H5_MPI_FILE_SET_SIZE_BIG 1)
# Used by Fortran + MPI
CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
- ELSE (MPI_C_FOUND)
- MESSAGE (STATUS "Parallel libraries not found")
- ENDIF (MPI_C_FOUND)
-ENDIF (HDF5_ENABLE_PARALLEL)
+ else (MPI_C_FOUND)
+ message (STATUS "Parallel libraries not found")
+ endif (MPI_C_FOUND)
+endif (HDF5_ENABLE_PARALLEL)
# Parallel IO usage requires MPI to be Linked and Included
-IF (H5_HAVE_PARALLEL)
- SET (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES})
- IF (MPI_C_LINK_FLAGS)
- SET (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
- ENDIF (MPI_C_LINK_FLAGS)
-ENDIF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
+ set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES})
+ if (MPI_C_LINK_FLAGS)
+ set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
+ endif (MPI_C_LINK_FLAGS)
+endif (H5_HAVE_PARALLEL)
-SET (DEFAULT_API_VERSION "v18")
+set (DEFAULT_API_VERSION "v18")
#-----------------------------------------------------------------------------
# Option to use 1.6.x API
#-----------------------------------------------------------------------------
-OPTION (HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF)
-SET (H5_USE_16_API_DEFAULT 0)
-IF (HDF5_USE_16_API_DEFAULT)
- SET (H5_USE_16_API_DEFAULT 1)
- SET (DEFAULT_API_VERSION "v16")
-ENDIF (HDF5_USE_16_API_DEFAULT)
+option (HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF)
+set (H5_USE_16_API_DEFAULT 0)
+if (HDF5_USE_16_API_DEFAULT)
+ set (H5_USE_16_API_DEFAULT 1)
+ set (DEFAULT_API_VERSION "v16")
+endif (HDF5_USE_16_API_DEFAULT)
#-----------------------------------------------------------------------------
# Include user macros
#-----------------------------------------------------------------------------
-INCLUDE (UserMacros.cmake)
+include (UserMacros.cmake)
-INCLUDE (CMakeFilters.cmake)
+include (CMakeFilters.cmake)
#-----------------------------------------------------------------------------
# Option for external libraries on windows
#-----------------------------------------------------------------------------
-OPTION (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- IF (HDF5_PACKAGE_EXTLIBS)
- SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
- IF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (HDF5_PACKAGE_EXTLIBS)
+ set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
+ if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+ endif (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
- IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
+ if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
- ENDIF (HDF5_PACKAGE_EXTLIBS)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ endif (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
+ endif (HDF5_PACKAGE_EXTLIBS)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Option to use threadsafe
# Note: Currently CMake only allows configuring of threadsafe on WINDOWS.
#-----------------------------------------------------------------------------
-IF (WIN32 AND NOT CYGWIN)
- OPTION (HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF)
- IF (HDF5_ENABLE_THREADSAFE)
+if (WIN32 AND NOT CYGWIN)
+ option (HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF)
+ if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
- IF (HDF5_ENABLE_PARALLEL)
- MESSAGE (FATAL_ERROR " **** Parallel and Threadsafe options are mutually exclusive **** ")
- ENDIF (HDF5_ENABLE_PARALLEL)
- SET (H5_HAVE_THREADSAFE 1)
- IF (H5_HAVE_IOEO)
- MESSAGE (STATUS " **** Windows Threads only available in WINVER>=0x600 (Vista or Windows 7) **** ")
- SET (H5_HAVE_WIN_THREADS 1)
- ELSE (H5_HAVE_IOEO)
- IF (NOT H5_HAVE_PTHREAD_H)
- SET (H5_HAVE_THREADSAFE 0)
- MESSAGE (FATAL_ERROR " **** Threadsafe option requires thread library **** ")
- ENDIF (NOT H5_HAVE_PTHREAD_H)
- ENDIF (H5_HAVE_IOEO)
- ENDIF (HDF5_ENABLE_THREADSAFE)
-ENDIF (WIN32 AND NOT CYGWIN)
+ if (HDF5_ENABLE_PARALLEL)
+ message (FATAL_ERROR " **** Parallel and Threadsafe options are mutually exclusive **** ")
+ endif (HDF5_ENABLE_PARALLEL)
+ set (H5_HAVE_THREADSAFE 1)
+ if (H5_HAVE_IOEO)
+ message (STATUS " **** Windows Threads only available in WINVER>=0x600 (Vista or Windows 7) **** ")
+ set (H5_HAVE_WIN_THREADS 1)
+ else (H5_HAVE_IOEO)
+ if (NOT H5_HAVE_PTHREAD_H)
+ set (H5_HAVE_THREADSAFE 0)
+ message (FATAL_ERROR " **** Threadsafe option requires thread library **** ")
+ endif (NOT H5_HAVE_PTHREAD_H)
+ endif (H5_HAVE_IOEO)
+ endif (HDF5_ENABLE_THREADSAFE)
+endif (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Add the HDF5 Library Target to the build
#-----------------------------------------------------------------------------
-ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
+add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src)
-IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} ZLIB)
- ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- IF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
ADD_DEPENDENCIES (${HDF5_LIB_TARGET} SZIP)
- ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
-ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
#-----------------------------------------------------------------------------
-OPTION (BUILD_TESTING "Build HDF5 Unit Testing" OFF)
-IF (BUILD_TESTING)
- SET (DART_TESTING_TIMEOUT 1200
+option (BUILD_TESTING "Build HDF5 Unit Testing" OFF)
+if (BUILD_TESTING)
+ set (DART_TESTING_TIMEOUT 1200
CACHE INTEGER
"Timeout in seconds for each test (default 1200=20minutes)"
)
- ENABLE_TESTING ()
- INCLUDE (CTest)
- IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- IF (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test)
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
- IF (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform)
- ENDIF(EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
- IF (H5_HAVE_PARALLEL)
- IF (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar)
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
- ENDIF (H5_HAVE_PARALLEL)
- ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
- OPTION (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
- MARK_AS_ADVANCED (HDF5_TEST_VFD)
- IF (HDF5_TEST_VFD)
- OPTION (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
- MARK_AS_ADVANCED (HDF5_TEST_FHEAP_VFD)
- ENDIF (HDF5_TEST_VFD)
+ enable_testing ()
+ include (CTest)
+ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
+ add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib)
+ add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test)
+ endif (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
+ if (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
+ add_subdirectory (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform)
+ endif (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform")
+ if (H5_HAVE_PARALLEL)
+ if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
+ add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar)
+ endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
+ endif (H5_HAVE_PARALLEL)
+ endif (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+ option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
+ mark_as_advanced (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
+ option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+ endif (HDF5_TEST_VFD)
- INCLUDE (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
-ENDIF (BUILD_TESTING)
+ include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ configure_file (${HDF5_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Option to build Fortran bindings/tests/examples
@@ -802,88 +792,83 @@ ENDIF (BUILD_TESTING)
# so that fortran name mangling is detected before writing H5pubconf.h
#-----------------------------------------------------------------------------
# Set default name mangling : overridden by Fortran detection in fortran dir
-SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
-SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
-IF (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
- OPTION (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
- IF (HDF5_BUILD_FORTRAN)
- IF (BUILD_SHARED_LIBS AND APPLE)
- MESSAGE (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
- ENDIF (BUILD_SHARED_LIBS AND APPLE)
- OPTION (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF)
- INCLUDE (${HDF5_RESOURCES_DIR}/HDF5UseFortran.cmake)
- IF (HDF5_ENABLE_F2003)
- IF (NOT FORTRAN_HAVE_ISO_C_BINDING)
- SET (HDF5_ENABLE_F2003 OFF)
- ENDIF (NOT FORTRAN_HAVE_ISO_C_BINDING)
- ENDIF (HDF5_ENABLE_F2003)
-
- # -----------------------------------------------------------------------
- # wrapper script variables
- #
-# SET (FCFLAGS "${Fortran_DEFINES}")
-
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
- IF (HDF5_BUILD_HL_LIB)
- IF (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
+set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
+if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+ option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
+ if (HDF5_BUILD_FORTRAN)
+ if (BUILD_SHARED_LIBS AND APPLE)
+ message (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
+ endif (BUILD_SHARED_LIBS AND APPLE)
+ option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF)
+ include (${HDF5_RESOURCES_DIR}/HDF5UseFortran.cmake)
+ if (HDF5_ENABLE_F2003)
+ if (NOT FORTRAN_HAVE_ISO_C_BINDING)
+ set (HDF5_ENABLE_F2003 OFF)
+ endif (NOT FORTRAN_HAVE_ISO_C_BINDING)
+ endif (HDF5_ENABLE_F2003)
+
+ add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran)
+ if (HDF5_BUILD_HL_LIB)
+ if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
#-- Build the High Level Fortran source codes
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran)
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
- ENDIF (HDF5_BUILD_HL_LIB)
- ENDIF (HDF5_BUILD_FORTRAN)
-ENDIF (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
+ add_subdirectory (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran)
+ endif (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran")
+ endif (HDF5_BUILD_HL_LIB)
+ endif (HDF5_BUILD_FORTRAN)
+endif (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
#-----------------------------------------------------------------------------
# Option to build examples
#-----------------------------------------------------------------------------
-IF (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
- OPTION (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF)
- IF (HDF5_BUILD_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
- ENDIF (HDF5_BUILD_EXAMPLES)
-ENDIF (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
+if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
+ option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF)
+ if (HDF5_BUILD_EXAMPLES)
+ add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples)
+ endif (HDF5_BUILD_EXAMPLES)
+endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
#-----------------------------------------------------------------------------
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
-IF (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
- OPTION (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
- IF (HDF5_BUILD_CPP_LIB)
+if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
+ option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
+ if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
- IF (HDF5_ENABLE_PARALLEL)
- MESSAGE (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
- ENDIF (HDF5_ENABLE_PARALLEL)
- IF (CMAKE_NO_STD_NAMESPACE)
- SET (H5_NO_STD 1)
- ENDIF (CMAKE_NO_STD_NAMESPACE)
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++)
- ENDIF (HDF5_BUILD_CPP_LIB)
-ENDIF (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
+ if (HDF5_ENABLE_PARALLEL)
+ message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ endif (HDF5_ENABLE_PARALLEL)
+ if (CMAKE_NO_STD_NAMESPACE)
+ set (H5_NO_STD 1)
+ endif (CMAKE_NO_STD_NAMESPACE)
+ add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++)
+ endif (HDF5_BUILD_CPP_LIB)
+endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
#-----------------------------------------------------------------------------
# Option to build HDF5 Tools
#-----------------------------------------------------------------------------
-IF (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
- OPTION (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF)
- IF (HDF5_BUILD_TOOLS)
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
- ENDIF (HDF5_BUILD_TOOLS)
-ENDIF (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
+if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
+ option (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF)
+ if (HDF5_BUILD_TOOLS)
+ add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools)
+ endif (HDF5_BUILD_TOOLS)
+endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
#-----------------------------------------------------------------------------
# Option to build High Level API's
#-----------------------------------------------------------------------------
-IF (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
- OPTION (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
- IF (HDF5_BUILD_HL_LIB)
- SET (H5_INCLUDE_HL 1)
- ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
- ENDIF (HDF5_BUILD_HL_LIB)
-ENDIF (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
+if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
+ option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF)
+ if (HDF5_BUILD_HL_LIB)
+ set (H5_INCLUDE_HL 1)
+ add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl)
+ endif (HDF5_BUILD_HL_LIB)
+endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
+configure_file (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
-INCLUDE (CMakeInstallation.cmake)
+include (CMakeInstallation.cmake)
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index 184aea3..a14f686 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -4,28 +4,28 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
-SET (CTEST_PROJECT_NAME "HDF5")
-SET (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
+set (CTEST_PROJECT_NAME "HDF5")
+set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
-SET (CTEST_DROP_METHOD "http")
-IF (CDASH_LOCAL)
- SET (CTEST_DROP_SITE "72.36.68.252")
- SET (CTEST_DROP_LOCATION "/submit.php?project=HDF5.1.8")
-ELSE (CDASH_LOCAL)
- SET (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
- SET (CTEST_DROP_LOCATION "/submit.php?project=HDF518")
-ENDIF (CDASH_LOCAL)
-SET (CTEST_DROP_SITE_CDASH TRUE)
+set (CTEST_DROP_METHOD "http")
+if (CDASH_LOCAL)
+ set (CTEST_DROP_SITE "72.36.68.252")
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF5.1.8")
+else (CDASH_LOCAL)
+ set (CTEST_DROP_SITE "cdash.hdfgroup.uiuc.edu")
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF518")
+endif (CDASH_LOCAL)
+set (CTEST_DROP_SITE_CDASH TRUE)
-SET (UPDATE_TYPE svn)
-SET (VALGRIND_COMMAND "/usr/bin/valgrind")
-SET (VALGRIND_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_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 (UPDATE_TYPE svn)
+set (VALGRIND_COMMAND "/usr/bin/valgrind")
+set (VALGRIND_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_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 3600 CACHE STRING
+set (CTEST_TEST_TIMEOUT 3600 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
-SET (DART_TESTING_TIMEOUT 3600 CACHE STRING
+set (DART_TESTING_TIMEOUT 3600 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
diff --git a/MANIFEST b/MANIFEST
index 9c20a3d..5411372 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1111,6 +1111,7 @@
# h5repack sources
./tools/h5repack/Makefile.am
./tools/h5repack/Makefile.in
+./tools/h5repack/dynlib_rpk.c
./tools/h5repack/h5repack.sh.in
./tools/h5repack/h5repack_plugin.sh.in
./tools/h5repack/h5repack.c
diff --git a/UserMacros.cmake b/UserMacros.cmake
index 4c680ed..65ea5d4 100644
--- a/UserMacros.cmake
+++ b/UserMacros.cmake
@@ -8,14 +8,14 @@
# Option to Build with User Defined Values
#-----------------------------------------------------------------------------
MACRO (MACRO_USER_DEFINED_LIBS)
- SET (USER_DEFINED_VALUE "FALSE")
+ set (USER_DEFINED_VALUE "FALSE")
ENDMACRO (MACRO_USER_DEFINED_LIBS)
#-------------------------------------------------------------------------------
-OPTION (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
-IF (BUILD_USER_DEFINED_LIBS)
+option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
+if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
-ENDIF (BUILD_USER_DEFINED_LIBS)
+endif (BUILD_USER_DEFINED_LIBS)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index e3ad541..1150994 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -286,8 +286,8 @@ set($ENV{LC_MESSAGES} "en_EN")
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-SET (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-SET (CTEST_CONFIGURE_COMMAND
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+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}\"")
# Print summary information.
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 50ea838..89426c5 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -1,24 +1,24 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
-ELSE (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_STATIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_DYNAMIC_LIB 1)
+else (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_STATIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
@@ -31,23 +31,23 @@ INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
-IF (H5_HAVE_PARALLEL)
- ADD_DEFINITIONS ("-DMPICH_SKIP_MPICXX")
- ADD_DEFINITIONS ("-DMPICH_IGNORE_CXX_SEEK")
-ENDIF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
+ add_definitions ("-DMPICH_SKIP_MPICXX")
+ add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
+endif (H5_HAVE_PARALLEL)
-ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
+add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the CPP Examples
#-----------------------------------------------------------------------------
-IF (HDF5_BUILD_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_EXAMPLES)
+if (HDF5_BUILD_EXAMPLES)
+ add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples)
+endif (HDF5_BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# Build the CPP unit tests
#-----------------------------------------------------------------------------
-IF (BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test)
+endif (BUILD_TESTING)
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index c79f6c2..e3e1077 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
# with "cpp_ex_". This allows for easier filtering of the examples.
@@ -10,7 +10,7 @@ PROJECT (HDF5_CPP_EXAMPLES)
# Define examples
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
create
readdata
writedata
@@ -20,7 +20,7 @@ SET (examples
h5group
)
-SET (tutr_examples
+set (tutr_examples
h5tutr_cmprss
h5tutr_crtdat
h5tutr_crtatt
@@ -32,22 +32,22 @@ SET (tutr_examples
h5tutr_subset
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
+foreach (example ${examples})
+ add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
-ENDFOREACH (example ${examples})
+ target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+endforeach (example ${examples})
-FOREACH (example ${tutr_examples})
- ADD_EXECUTABLE (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
+foreach (example ${tutr_examples})
+ add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
TARGET_NAMING (cpp_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
-ENDFOREACH (example ${tutr_examples})
+ target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+endforeach (example ${tutr_examples})
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index b39dcfe..352b799 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME cpp_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -15,23 +15,23 @@
SDSextendible.h5
Select.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex-clear-objects")
- FOREACH (example ${examples})
- ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_${example}")
- ENDFOREACH (example ${examples})
+ foreach (example ${examples})
+ add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_${example}")
+ endforeach (example ${examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(cpp_ex_readdata PROPERTIES DEPENDS cpp_ex_create)
# SET_TESTS_PROPERTIES(cpp_ex_chunks PROPERTIES DEPENDS cpp_ex_extend_ds)
- ADD_TEST (
+ add_test (
NAME cpp_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -42,18 +42,18 @@
h5tutr_groups.h5
h5tutr_subset.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_tutr-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_tutr-clear-objects")
- FOREACH (example ${tutr_examples})
- ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_${example}")
- ENDFOREACH (example ${tutr_examples})
+ foreach (example ${tutr_examples})
+ add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "cpp_ex_${example}")
+ endforeach (example ${tutr_examples})
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_crtatt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(cpp_ex_h5tutr_rdwt PROPERTIES DEPENDS cpp_ex_h5tutr_crtdat)
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index af6283a..7a48260 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,24 +1,24 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_CPP_SRC)
#-----------------------------------------------------------------------------
# Shared/Static Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (CPP_BUILT_AS_DYNAMIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (CPP_BUILT_AS_DYNAMIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
-SET (CPP_SRCS
+set (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp
${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp
@@ -48,7 +48,7 @@ SET (CPP_SRCS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.cpp
)
-SET (CPP_HDRS
+set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5Alltypes.h
${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.h
@@ -83,17 +83,20 @@ SET (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
)
-ADD_LIBRARY (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
+add_library (${HDF5_CPP_LIB_TARGET} ${LIB_TYPE} ${CPP_SRCS} ${CPP_HDRS})
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
+target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIB_TARGET} ${HDF5_CPP_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/cpp)
+set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES
+ FOLDER libraries/cpp
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${CPP_HDRS}
DESTINATION
@@ -105,12 +108,12 @@ INSTALL (
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_CPP_LIB_TARGET}
EXPORT
@@ -119,4 +122,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT cpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT cpplibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index e498fc5..9966163 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_CPP_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
@@ -11,7 +11,7 @@ PROJECT (HDF5_CPP_TEST)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (CPP_TEST_SRCS
+set (CPP_TEST_SRCS
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tcompound.cpp
@@ -29,27 +29,27 @@ SET (CPP_TEST_SRCS
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
-
-ADD_EXECUTABLE (cpp_testhdf5 ${CPP_TEST_SRCS} )
+add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
TARGET_C_PROPERTIES (cpp_testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (cpp_testhdf5
+target_link_libraries (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
-SET_TARGET_PROPERTIES (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+set_target_properties (cpp_testhdf5 PROPERTIES
+ FOLDER test/cpp
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET cpp_testhdf5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 3e4f6d9..2b05fea 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -17,12 +17,12 @@ ADD_TEST (
tfattrs.h5
)
-ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
-SET_TESTS_PROPERTIES (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
+add_test (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
+set_tests_properties (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
- SET (VFD_LIST
+ set (VFD_LIST
sec2
stdio
core
@@ -31,13 +31,13 @@ IF (HDF5_TEST_VFD)
family
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -48,7 +48,7 @@ IF (HDF5_TEST_VFD)
tattr_scalar.h5
tfattrs.h5
)
- ADD_TEST (
+ add_test (
NAME VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
@@ -59,13 +59,13 @@ IF (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- SET_TESTS_PROPERTIES (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
+ endforeach (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+endif (HDF5_TEST_VFD)
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 236519b..b1178b0 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -1,6 +1,6 @@
-SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
+set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
-SET (CTEST_CUSTOM_WARNING_EXCEPTION
+set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:"
"H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument"
@@ -17,7 +17,7 @@ SET (CTEST_CUSTOM_WARNING_EXCEPTION
# "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro"
)
-SET (CTEST_CUSTOM_MEMCHECK_IGNORE
+set (CTEST_CUSTOM_MEMCHECK_IGNORE
${CTEST_CUSTOM_MEMCHECK_IGNORE}
flush1 #designed to fail
flush2 #designed to need flush1
@@ -34,6 +34,7 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE
h5test-clear-error_test-objects
h5test-clear-links_env-objects
PERFORM_h5perform-clear-objects
+ HL_TOOLS-clear-objects
hl_test-clear-objects
hl_fortran_test-clear-objects
######### tools/h5copy #########
@@ -201,6 +202,7 @@ SET (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK_VERIFY_LAYOUT-contig_small_fixed_compa #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-layout_long_switches #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-layout_short_switches #uses grepTest.cmake
+ H5REPACK-plugin
######### tools/h5stat #########
H5STAT-clearall-objects
######### tools/misc #########
diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake
index eca6e76..4af5741 100644
--- a/config/cmake/CheckTypeSize.cmake
+++ b/config/cmake/CheckTypeSize.cmake
@@ -8,23 +8,23 @@
#
MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
- SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
- IF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- SET (MACRO_CHECK_TYPE_SIZE_FLAGS
+ set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
+ if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ set (MACRO_CHECK_TYPE_SIZE_FLAGS
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}"
)
- FOREACH (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
- IF ("${def}")
- SET (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
+ foreach (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
+ if ("${def}")
+ set (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
ENDIF("${def}")
- ENDFOREACH (def)
+ endforeach (def)
- MESSAGE (STATUS "Check size of ${TYPE}")
- IF (CMAKE_REQUIRED_LIBRARIES)
- SET (CHECK_TYPE_SIZE_ADD_LIBRARIES
+ message (STATUS "Check size of ${TYPE}")
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set (CHECK_TYPE_SIZE_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
)
- ENDIF (CMAKE_REQUIRED_LIBRARIES)
+ endif (CMAKE_REQUIRED_LIBRARIES)
TRY_RUN (${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/CheckTypeSize.c
@@ -32,17 +32,17 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
- IF (HAVE_${VARIABLE})
- MESSAGE (STATUS "Check size of ${TYPE} - done")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+ if (HAVE_${VARIABLE})
+ message (STATUS "Check size of ${TYPE} - done")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
)
- ELSE (HAVE_${VARIABLE})
- MESSAGE (STATUS "Check size of ${TYPE} - failed")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ else (HAVE_${VARIABLE})
+ message (STATUS "Check size of ${TYPE} - failed")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n"
)
- ENDIF (HAVE_${VARIABLE})
- ENDIF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
+ endif (HAVE_${VARIABLE})
+ endif ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
ENDMACRO (HDF_CHECK_TYPE_SIZE)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index ede3c6e..9816755 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -1,68 +1,68 @@
#-----------------------------------------------------------------------------
# Include all the necessary files for macros
#-----------------------------------------------------------------------------
-INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
-INCLUDE (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
+include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
+include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+include (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
+include (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
+include (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+include (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
+include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
+include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
+include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
+include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
# APPLE/Darwin setup
#-----------------------------------------------------------------------------
-IF (APPLE)
- LIST(LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
- IF(ARCH_LENGTH GREATER 1)
+if (APPLE)
+ list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
+ if (ARCH_LENGTH GREATER 1)
set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
message(FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
"due to technical reasons. The best approach would be build each architecture in separate directories"
"and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
"variable has been set to a blank value which will build the default architecture for this system.")
- ENDIF()
- SET (H5_AC_APPLE_UNIVERSAL_BUILD 0)
-ENDIF (APPLE)
+ endif ()
+ set (H5_AC_APPLE_UNIVERSAL_BUILD 0)
+endif (APPLE)
# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- SET (H5_HAVE_DARWIN 1)
-ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+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")
+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
#-----------------------------------------------------------------------------
-OPTION (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
-IF (HDF5_Enable_Clear_File_Buffers)
- SET (H5_CLEAR_MEMORY 1)
-ENDIF (HDF5_Enable_Clear_File_Buffers)
+option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
+if (HDF5_Enable_Clear_File_Buffers)
+ set (H5_CLEAR_MEMORY 1)
+endif (HDF5_Enable_Clear_File_Buffers)
MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
#-----------------------------------------------------------------------------
-OPTION (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
-IF (HDF5_STRICT_FORMAT_CHECKS)
- SET (H5_STRICT_FORMAT_CHECKS 1)
-ENDIF (HDF5_STRICT_FORMAT_CHECKS)
+option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
+if (HDF5_STRICT_FORMAT_CHECKS)
+ set (H5_STRICT_FORMAT_CHECKS 1)
+endif (HDF5_STRICT_FORMAT_CHECKS)
MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
# Option for --enable-metadata-trace-file
#-----------------------------------------------------------------------------
-OPTION (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
-IF (HDF5_METADATA_TRACE_FILE)
- SET (H5_METADATA_TRACE_FILE 1)
-ENDIF (HDF5_METADATA_TRACE_FILE)
+option (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
+if (HDF5_METADATA_TRACE_FILE)
+ set (H5_METADATA_TRACE_FILE 1)
+endif (HDF5_METADATA_TRACE_FILE)
MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# ----------------------------------------------------------------------
@@ -71,10 +71,10 @@ MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# though the data may be wrong (for example, some compilers don't
# support denormalized floating values) to maximize speed.
#
-OPTION (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON)
-IF (HDF5_WANT_DATA_ACCURACY)
- SET (H5_WANT_DATA_ACCURACY 1)
-ENDIF(HDF5_WANT_DATA_ACCURACY)
+option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON)
+if (HDF5_WANT_DATA_ACCURACY)
+ set (H5_WANT_DATA_ACCURACY 1)
+endif (HDF5_WANT_DATA_ACCURACY)
MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# ----------------------------------------------------------------------
@@ -83,192 +83,192 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# for the speed optimization of hard conversions. Soft conversions can
# actually benefit little.
#
-OPTION (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON)
-IF (HDF5_WANT_DCONV_EXCEPTION)
- SET (H5_WANT_DCONV_EXCEPTION 1)
-ENDIF (HDF5_WANT_DCONV_EXCEPTION)
+option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON)
+if (HDF5_WANT_DCONV_EXCEPTION)
+ set (H5_WANT_DCONV_EXCEPTION 1)
+endif (HDF5_WANT_DCONV_EXCEPTION)
MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
# ----------------------------------------------------------------------
# Check if they would like the function stack support compiled in
#
-OPTION (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
-IF (HDF5_ENABLE_CODESTACK)
- SET (H5_HAVE_CODESTACK 1)
-ENDIF (HDF5_ENABLE_CODESTACK)
+option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
+if (HDF5_ENABLE_CODESTACK)
+ set (H5_HAVE_CODESTACK 1)
+endif (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
-OPTION (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
+option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
# floating-point to long long values.
# (This flag should be _unset_ for all machines)
#
-# SET (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
+# set (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
# so far we have no check for this
-SET(H5_HAVE_TMPFILE 1)
+set (H5_HAVE_TMPFILE 1)
#-----------------------------------------------------------------------------
# This MACRO checks IF the symbol exists in the library and IF it
# does, it appends library to the list.
#-----------------------------------------------------------------------------
-SET (LINK_LIBS "")
+set (LINK_LIBS "")
MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
- IF (${VARIABLE})
- SET (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
- ENDIF (${VARIABLE})
+ if (${VARIABLE})
+ set (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
+ endif (${VARIABLE})
ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
# ----------------------------------------------------------------------
# WINDOWS Hard code Values
# ----------------------------------------------------------------------
-SET (WINDOWS)
-IF (WIN32)
- IF (MINGW)
- SET (H5_HAVE_MINGW 1)
- SET (WINDOWS 1) # MinGW tries to imitate Windows
- SET (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- ENDIF (MINGW)
- SET (H5_HAVE_WIN32_API 1)
- SET (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
- IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- SET (WINDOWS 1)
- SET (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
- IF (MSVC)
- SET (H5_HAVE_VISUAL_STUDIO 1)
- ENDIF (MSVC)
- ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
-ENDIF (WIN32)
+set (WINDOWS)
+if (WIN32)
+ if (MINGW)
+ set (H5_HAVE_MINGW 1)
+ set (WINDOWS 1) # MinGW tries to imitate Windows
+ set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
+ endif (MINGW)
+ set (H5_HAVE_WIN32_API 1)
+ set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
+ if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+ set (WINDOWS 1)
+ set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
+ if (MSVC)
+ set (H5_HAVE_VISUAL_STUDIO 1)
+ endif (MSVC)
+ endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+endif (WIN32)
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
#
-SET (H5_DEFAULT_VFD H5FD_SEC2)
-
-IF (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
- IF (WINDOWS)
- SET (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin")
- ELSE (WINDOWS)
- SET (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
- ENDIF (WINDOWS)
-ENDIF (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
-
-IF (WINDOWS)
- SET (H5_HAVE_WINDOWS 1)
+set (H5_DEFAULT_VFD H5FD_SEC2)
+
+if (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
+ if (WINDOWS)
+ set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin")
+ else (WINDOWS)
+ set (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
+ endif (WINDOWS)
+endif (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
+
+if (WINDOWS)
+ set (H5_HAVE_WINDOWS 1)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine has window style pathname,
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
- SET (H5_HAVE_WINDOW_PATH 1)
-ENDIF (WINDOWS)
-
-IF (WINDOWS)
- SET (H5_HAVE_STDDEF_H 1)
- SET (H5_HAVE_SYS_STAT_H 1)
- SET (H5_HAVE_SYS_TYPES_H 1)
- SET (H5_HAVE_LIBM 1)
- SET (H5_HAVE_STRDUP 1)
- SET (H5_HAVE_SYSTEM 1)
- SET (H5_HAVE_LONGJMP 1)
- IF (NOT MINGW)
- SET (H5_HAVE_GETHOSTNAME 1)
- ENDIF (NOT MINGW)
- IF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1)
- ENDIF (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- SET (H5_HAVE_FUNCTION 1)
- SET (H5_GETTIMEOFDAY_GIVES_TZ 1)
- SET (H5_HAVE_TIMEZONE 1)
- SET (H5_HAVE_GETTIMEOFDAY 1)
- SET (H5_LONE_COLON 0)
- IF (MINGW)
- SET (H5_HAVE_WINSOCK2_H 1)
- ENDIF (MINGW)
- SET (H5_HAVE_LIBWS2_32 1)
- SET (H5_HAVE_LIBWSOCK32 1)
+ set (H5_HAVE_WINDOW_PATH 1)
+endif (WINDOWS)
+
+if (WINDOWS)
+ set (H5_HAVE_STDDEF_H 1)
+ set (H5_HAVE_SYS_STAT_H 1)
+ set (H5_HAVE_SYS_TYPES_H 1)
+ set (H5_HAVE_LIBM 1)
+ set (H5_HAVE_STRDUP 1)
+ set (H5_HAVE_SYSTEM 1)
+ set (H5_HAVE_LONGJMP 1)
+ if (NOT MINGW)
+ set (H5_HAVE_GETHOSTNAME 1)
+ endif (NOT MINGW)
+ if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+ set (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1)
+ endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+ set (H5_HAVE_FUNCTION 1)
+ set (H5_GETTIMEOFDAY_GIVES_TZ 1)
+ set (H5_HAVE_TIMEZONE 1)
+ set (H5_HAVE_GETTIMEOFDAY 1)
+ set (H5_LONE_COLON 0)
+ if (MINGW)
+ set (H5_HAVE_WINSOCK2_H 1)
+ endif (MINGW)
+ set (H5_HAVE_LIBWS2_32 1)
+ set (H5_HAVE_LIBWSOCK32 1)
#-----------------------------------------------------------------------------
# These tests need to be manually SET for windows since there is currently
# something not quite correct with the actual test implementation. This affects
# the 'dt_arith' test and most likely lots of other code
# ----------------------------------------------------------------------------
- SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
-ENDIF (WINDOWS)
+ set (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
+endif (WINDOWS)
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
-IF (CYGWIN)
- SET (H5_HAVE_LSEEK64 0)
-ENDIF (CYGWIN)
+if (CYGWIN)
+ set (H5_HAVE_LSEEK64 0)
+endif (CYGWIN)
#-----------------------------------------------------------------------------
# Check for the math library "m"
#-----------------------------------------------------------------------------
-IF (NOT WINDOWS)
+if (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
-ENDIF (NOT WINDOWS)
+endif (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB)
CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET)
CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL)
-IF (NOT NOT_NEED_LIBNSL)
+if (NOT NOT_NEED_LIBNSL)
CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname H5_HAVE_LIBNSL)
-ENDIF (NOT NOT_NEED_LIBNSL)
+endif (NOT NOT_NEED_LIBNSL)
# For other tests to use the same libraries
-SET (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
+set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
-SET (USE_INCLUDES "")
-IF (WINDOWS)
- SET (USE_INCLUDES ${USE_INCLUDES} "windows.h")
-ENDIF (WINDOWS)
+set (USE_INCLUDES "")
+if (WINDOWS)
+ set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
+endif (WINDOWS)
-IF (NOT WINDOWS)
- TEST_BIG_ENDIAN(H5_WORDS_BIGENDIAN)
-ENDIF (NOT WINDOWS)
+if (NOT WINDOWS)
+ TEST_BIG_ENDIAN (H5_WORDS_BIGENDIAN)
+endif (NOT WINDOWS)
# For other specific tests, use this MACRO.
MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
- IF ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- SET (OTHER_TEST_ADD_LIBRARIES)
- IF (CMAKE_REQUIRED_LIBRARIES)
- SET (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ENDIF (CMAKE_REQUIRED_LIBRARIES)
-
- FOREACH (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- ENDFOREACH (def)
-
- FOREACH (def
+ if ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
+ set (OTHER_TEST_ADD_LIBRARIES)
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ endif (CMAKE_REQUIRED_LIBRARIES)
+
+ foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
+ endforeach (def)
+
+ foreach (def
HAVE_SYS_TIME_H
HAVE_UNISTD_H
HAVE_SYS_TYPES_H
HAVE_SYS_SOCKET_H
)
- IF ("${H5_${def}}")
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- ENDIF ("${H5_${def}}")
- ENDFOREACH (def)
+ if ("${H5_${def}}")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
+ endif ("${H5_${def}}")
+ endforeach (def)
- IF (LARGEFILE)
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS
+ if (LARGEFILE)
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
"${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- ENDIF (LARGEFILE)
+ endif (LARGEFILE)
- #MESSAGE (STATUS "Performing ${OTHER_TEST}")
+ #message (STATUS "Performing ${OTHER_TEST}")
TRY_COMPILE (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/HDF5Tests.c
@@ -276,18 +276,18 @@ MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
"${OTHER_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
- IF (${OTHER_TEST})
- SET (H5_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
- MESSAGE (STATUS "Performing Other Test ${OTHER_TEST} - Success")
- ELSE (${OTHER_TEST})
- MESSAGE (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
- SET (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ if (${OTHER_TEST})
+ set (H5_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
+ message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
+ else (${OTHER_TEST})
+ message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
+ set (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Performing Other Test ${OTHER_TEST} failed with the following output:\n"
"${OUTPUT}\n"
)
- ENDIF (${OTHER_TEST})
- ENDIF ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
+ endif (${OTHER_TEST})
+ endif ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
ENDMACRO (HDF5_FUNCTION_TEST)
#-----------------------------------------------------------------------------
@@ -299,58 +299,58 @@ CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME)
#CHECK_FUNCTION_EXISTS (gettimeofday H5_HAVE_GETTIMEOFDAY)
# Since gettimeofday is not defined any where standard, lets look in all the
# usual places. On MSVC we are just going to use ::clock()
-IF (NOT MSVC)
- IF ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
+if (NOT MSVC)
+ if ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_TIME_H
OUTPUT_VARIABLE OUTPUT
)
- IF (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE")
- SET (H5_HAVE_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_TIME_GETTIMEOFDAY")
- SET (H5_HAVE_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_GETTIMEOFDAY")
- ENDIF (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE")
- ENDIF ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
+ if (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE")
+ set (H5_HAVE_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_TIME_GETTIMEOFDAY")
+ set (H5_HAVE_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_GETTIMEOFDAY")
+ endif (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE")
+ endif ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
- IF ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
+ if ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_SYS_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_SYS_TIME_H
OUTPUT_VARIABLE OUTPUT
)
- IF (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE")
- SET (H5_HAVE_SYS_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_SYS_TIME_GETTIMEOFDAY")
- SET (H5_HAVE_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_GETTIMEOFDAY")
- ENDIF (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE")
- ENDIF ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
-
- IF (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY)
- MESSAGE (STATUS "---------------------------------------------------------------")
- MESSAGE (STATUS "Function 'gettimeofday()' was not found. HDF5 will use its")
- MESSAGE (STATUS " own implementation.. This can happen on older versions of")
- MESSAGE (STATUS " MinGW on Windows. Consider upgrading your MinGW installation")
- MESSAGE (STATUS " to a newer version such as MinGW 3.12")
- MESSAGE (STATUS "---------------------------------------------------------------")
- ENDIF (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY)
-ENDIF (NOT MSVC)
+ if (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE")
+ set (H5_HAVE_SYS_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_SYS_TIME_GETTIMEOFDAY")
+ set (H5_HAVE_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_GETTIMEOFDAY")
+ endif (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE")
+ endif ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
+
+ if (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY)
+ message (STATUS "---------------------------------------------------------------")
+ message (STATUS "Function 'gettimeofday()' was not found. HDF5 will use its")
+ message (STATUS " own implementation.. This can happen on older versions of")
+ message (STATUS " MinGW on Windows. Consider upgrading your MinGW installation")
+ message (STATUS " to a newer version such as MinGW 3.12")
+ message (STATUS "---------------------------------------------------------------")
+ endif (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY)
+endif (NOT MSVC)
# Find the library containing clock_gettime()
-IF (NOT WINDOWS)
+if (NOT WINDOWS)
CHECK_FUNCTION_EXISTS(clock_gettime CLOCK_GETTIME_IN_LIBC)
CHECK_LIBRARY_EXISTS(rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
CHECK_LIBRARY_EXISTS(posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4)
- IF(CLOCK_GETTIME_IN_LIBC)
- SET(H5_HAVE_CLOCK_GETTIME 1)
- ELSEIF(CLOCK_GETTIME_IN_LIBRT)
- SET(H5_HAVE_CLOCK_GETTIME 1)
- LIST(APPEND LINK_LIBS rt)
- ELSEIF(CLOCK_GETTIME_IN_LIBPOSIX4)
- SET(H5_HAVE_CLOCK_GETTIME 1)
- LIST(APPEND LINK_LIBS posix4)
- ENDIF(CLOCK_GETTIME_IN_LIBC)
-ENDIF (NOT WINDOWS)
+ if (CLOCK_GETTIME_IN_LIBC)
+ set (H5_HAVE_CLOCK_GETTIME 1)
+ elseif (CLOCK_GETTIME_IN_LIBRT)
+ set (H5_HAVE_CLOCK_GETTIME 1)
+ list (APPEND LINK_LIBS rt)
+ elseif (CLOCK_GETTIME_IN_LIBPOSIX4)
+ set (H5_HAVE_CLOCK_GETTIME 1)
+ list (APPEND LINK_LIBS posix4)
+ endif (CLOCK_GETTIME_IN_LIBC)
+endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
@@ -358,9 +358,9 @@ ENDIF (NOT WINDOWS)
#-----------------------------------------------------------------------------
MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
- IF (${VARIABLE})
- SET (USE_INCLUDES ${USE_INCLUDES} ${FILE})
- ENDIF (${VARIABLE})
+ if (${VARIABLE})
+ set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
+ endif (${VARIABLE})
ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
#-----------------------------------------------------------------------------
@@ -382,31 +382,31 @@ CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H)
# IF the c compiler found stdint, check the C++ as well. On some systems this
# file will be found by C but not C++, only do this test IF the C++ compiler
# has been initialized (e.g. the project also includes some c++)
-IF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
+if (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
CHECK_INCLUDE_FILE_CXX ("stdint.h" H5_HAVE_STDINT_H_CXX)
- IF (NOT H5_HAVE_STDINT_H_CXX)
- SET (H5_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
- SET (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
- ENDIF (NOT H5_HAVE_STDINT_H_CXX)
-ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
+ if (NOT H5_HAVE_STDINT_H_CXX)
+ set (H5_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
+ set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
+ endif (NOT H5_HAVE_STDINT_H_CXX)
+endif (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
# Darwin
CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" H5_HAVE_MACH_MACH_TIME_H)
# Windows
CHECK_INCLUDE_FILE_CONCAT ("io.h" H5_HAVE_IO_H)
-IF (NOT CYGWIN)
+if (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK2_H)
-ENDIF (NOT CYGWIN)
+endif (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" H5_HAVE_SYS_TIMEB_H)
-IF (CMAKE_SYSTEM_NAME MATCHES "OSF")
+if (CMAKE_SYSTEM_NAME MATCHES "OSF")
CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" H5_HAVE_SYS_SYSINFO_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" H5_HAVE_SYS_PROC_H)
-ELSE (CMAKE_SYSTEM_NAME MATCHES "OSF")
- SET (H5_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- SET (H5_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-ENDIF (CMAKE_SYSTEM_NAME MATCHES "OSF")
+else (CMAKE_SYSTEM_NAME MATCHES "OSF")
+ set (H5_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
+ set (H5_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
+endif (CMAKE_SYSTEM_NAME MATCHES "OSF")
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" H5_HAVE_GLOBUS_COMMON_H)
CHECK_INCLUDE_FILE_CONCAT ("pdb.h" H5_HAVE_PDB_H)
@@ -426,12 +426,12 @@ CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
#-----------------------------------------------------------------------------
# The linux-lfs option is deprecated.
-SET (LINUX_LFS 0)
+set (LINUX_LFS 0)
-SET (HDF5_EXTRA_C_FLAGS)
-SET (HDF5_EXTRA_FLAGS)
-IF (NOT WINDOWS)
- IF(NOT H5_HAVE_SOLARIS)
+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
@@ -439,93 +439,93 @@ IF (NOT WINDOWS)
# correctly.
# POSIX feature information can be found in the gcc manual at:
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- SET (HDF5_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=199506L)
- SET (HDF5_EXTRA_FLAGS -D_BSD_SOURCE)
+ set (HDF5_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=199506L)
+ set (HDF5_EXTRA_FLAGS -D_BSD_SOURCE)
- OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- IF (HDF5_ENABLE_LARGE_FILE)
- SET (msg "Performing TEST_LFS_WORKS")
+ option (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
+ if (HDF5_ENABLE_LARGE_FILE)
+ set (msg "Performing TEST_LFS_WORKS")
TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS
OUTPUT_VARIABLE OUTPUT
)
- IF (TEST_LFS_WORKS_COMPILE)
- IF (TEST_LFS_WORKS_RUN MATCHES 0)
- SET (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
- SET (LARGEFILE 1)
- SET (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- MESSAGE (STATUS "${msg}... yes")
- ELSE (TEST_LFS_WORKS_RUN MATCHES 0)
- SET (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ if (TEST_LFS_WORKS_COMPILE)
+ if (TEST_LFS_WORKS_RUN MATCHES 0)
+ set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
+ set (LARGEFILE 1)
+ set (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ message (STATUS "${msg}... yes")
+ else (TEST_LFS_WORKS_RUN MATCHES 0)
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
- ENDIF (TEST_LFS_WORKS_RUN MATCHES 0)
- ELSE (TEST_LFS_WORKS_COMPILE )
- SET (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ endif (TEST_LFS_WORKS_RUN MATCHES 0)
+ else (TEST_LFS_WORKS_COMPILE )
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
- 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)
+ 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})
+add_definitions (${HDF5_EXTRA_FLAGS})
#-----------------------------------------------------------------------------
# Check for HAVE_OFF64_T functionality
#-----------------------------------------------------------------------------
-IF (NOT WINDOWS OR MINGW)
+if (NOT WINDOWS OR MINGW)
HDF5_FUNCTION_TEST (HAVE_OFF64_T)
- IF (H5_HAVE_OFF64_T)
+ if (H5_HAVE_OFF64_T)
CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64)
CHECK_FUNCTION_EXISTS (fseeko64 H5_HAVE_FSEEKO64)
CHECK_FUNCTION_EXISTS (ftello64 H5_HAVE_FTELLO64)
CHECK_FUNCTION_EXISTS (ftruncate64 H5_HAVE_FTRUNCATE64)
- ENDIF (H5_HAVE_OFF64_T)
+ endif (H5_HAVE_OFF64_T)
CHECK_FUNCTION_EXISTS (fseeko H5_HAVE_FSEEKO)
CHECK_FUNCTION_EXISTS (ftello H5_HAVE_FTELLO)
HDF5_FUNCTION_TEST (HAVE_STAT64_STRUCT)
- IF (HAVE_STAT64_STRUCT)
+ if (HAVE_STAT64_STRUCT)
CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64)
CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64)
- ENDIF (HAVE_STAT64_STRUCT)
-ENDIF (NOT WINDOWS OR MINGW)
+ endif (HAVE_STAT64_STRUCT)
+endif (NOT WINDOWS OR MINGW)
#-----------------------------------------------------------------------------
# Check the size in bytes of all the int and float types
#-----------------------------------------------------------------------------
MACRO (H5_CHECK_TYPE_SIZE type var)
- SET (aType ${type})
- SET (aVar ${var})
-# MESSAGE (STATUS "Checking size of ${aType} and storing into ${aVar}")
+ set (aType ${type})
+ set (aVar ${var})
+# message (STATUS "Checking size of ${aType} and storing into ${aVar}")
CHECK_TYPE_SIZE (${aType} ${aVar})
- IF (NOT ${aVar})
- SET (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
-# MESSAGE (STATUS "Size of ${aType} was NOT Found")
- ENDIF (NOT ${aVar})
+ if (NOT ${aVar})
+ set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
+# message (STATUS "Size of ${aType} was NOT Found")
+ endif (NOT ${aVar})
ENDMACRO (H5_CHECK_TYPE_SIZE)
H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
H5_CHECK_TYPE_SIZE (unsigned H5_SIZEOF_UNSIGNED)
-IF (NOT APPLE)
+if (NOT APPLE)
H5_CHECK_TYPE_SIZE (long H5_SIZEOF_LONG)
-ENDIF (NOT APPLE)
+endif (NOT APPLE)
H5_CHECK_TYPE_SIZE ("long long" H5_SIZEOF_LONG_LONG)
H5_CHECK_TYPE_SIZE (__int64 H5_SIZEOF___INT64)
-IF (NOT H5_SIZEOF___INT64)
- SET (H5_SIZEOF___INT64 0)
-ENDIF (NOT H5_SIZEOF___INT64)
+if (NOT H5_SIZEOF___INT64)
+ set (H5_SIZEOF___INT64 0)
+endif (NOT H5_SIZEOF___INT64)
H5_CHECK_TYPE_SIZE (float H5_SIZEOF_FLOAT)
H5_CHECK_TYPE_SIZE (double H5_SIZEOF_DOUBLE)
@@ -559,24 +559,24 @@ H5_CHECK_TYPE_SIZE (uint_least64_t H5_SIZEOF_UINT_LEAST64_T)
H5_CHECK_TYPE_SIZE (int_fast64_t H5_SIZEOF_INT_FAST64_T)
H5_CHECK_TYPE_SIZE (uint_fast64_t H5_SIZEOF_UINT_FAST64_T)
-IF (NOT APPLE)
+if (NOT APPLE)
H5_CHECK_TYPE_SIZE (size_t H5_SIZEOF_SIZE_T)
H5_CHECK_TYPE_SIZE (ssize_t H5_SIZEOF_SSIZE_T)
- IF (NOT H5_SIZEOF_SSIZE_T)
- SET (H5_SIZEOF_SSIZE_T 0)
- ENDIF (NOT H5_SIZEOF_SSIZE_T)
- IF (NOT WINDOWS)
+ if (NOT H5_SIZEOF_SSIZE_T)
+ set (H5_SIZEOF_SSIZE_T 0)
+ endif (NOT H5_SIZEOF_SSIZE_T)
+ if (NOT WINDOWS)
H5_CHECK_TYPE_SIZE (ptrdiff_t H5_SIZEOF_PTRDIFF_T)
- ENDIF (NOT WINDOWS)
-ENDIF (NOT APPLE)
+ endif (NOT WINDOWS)
+endif (NOT APPLE)
H5_CHECK_TYPE_SIZE (off_t H5_SIZEOF_OFF_T)
H5_CHECK_TYPE_SIZE (off64_t H5_SIZEOF_OFF64_T)
-IF (NOT H5_SIZEOF_OFF64_T)
- SET (H5_SIZEOF_OFF64_T 0)
-ENDIF (NOT H5_SIZEOF_OFF64_T)
+if (NOT H5_SIZEOF_OFF64_T)
+ set (H5_SIZEOF_OFF64_T 0)
+endif (NOT H5_SIZEOF_OFF64_T)
-IF (NOT WINDOWS)
+if (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check if the dev_t type is a scalar type
#-----------------------------------------------------------------------------
@@ -591,7 +591,7 @@ IF (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check a bunch of time functions
#-----------------------------------------------------------------------------
- FOREACH (test
+ foreach (test
HAVE_TM_GMTOFF
HAVE___TM_GMTOFF
# HAVE_TIMEZONE
@@ -602,11 +602,11 @@ IF (NOT WINDOWS)
HAVE_STRUCT_TM_TM_ZONE
)
HDF5_FUNCTION_TEST (${test})
- ENDFOREACH (test)
- IF (NOT CYGWIN AND NOT MINGW)
+ endforeach (test)
+ if (NOT CYGWIN AND NOT MINGW)
HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
- ENDIF (NOT CYGWIN AND NOT MINGW)
+ endif (NOT CYGWIN AND NOT MINGW)
# ----------------------------------------------------------------------
# Does the struct stat have the st_blocks field? This field is not Posix.
@@ -622,12 +622,12 @@ IF (NOT WINDOWS)
CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG)
CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO)
CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE)
- IF (NOT CYGWIN AND NOT MINGW)
+ if (NOT CYGWIN AND NOT MINGW)
CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO)
- ENDIF (NOT CYGWIN AND NOT MINGW)
+ endif (NOT CYGWIN AND NOT MINGW)
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD)
-ENDIF (NOT WINDOWS)
+endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check for some functions that are used
@@ -666,23 +666,23 @@ CHECK_FUNCTION_EXISTS (vasprintf H5_HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (waitpid H5_HAVE_WAITPID)
CHECK_FUNCTION_EXISTS (vsnprintf H5_HAVE_VSNPRINTF)
-IF (NOT WINDOWS)
- IF (H5_HAVE_VSNPRINTF)
+if (NOT WINDOWS)
+ if (H5_HAVE_VSNPRINTF)
HDF5_FUNCTION_TEST (VSNPRINTF_WORKS)
- ENDIF (H5_HAVE_VSNPRINTF)
-ENDIF (NOT WINDOWS)
+ endif (H5_HAVE_VSNPRINTF)
+endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
# sigsetjmp is special; may actually be a macro
#-----------------------------------------------------------------------------
-IF (NOT H5_HAVE_SIGSETJMP)
- IF (H5_HAVE_SETJMP_H)
+if (NOT H5_HAVE_SIGSETJMP)
+ if (H5_HAVE_SETJMP_H)
CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" H5_HAVE_MACRO_SIGSETJMP)
- IF (H5_HAVE_MACRO_SIGSETJMP)
- SET (H5_HAVE_SIGSETJMP 1)
- ENDIF (H5_HAVE_MACRO_SIGSETJMP)
- ENDIF (H5_HAVE_SETJMP_H)
-ENDIF (NOT H5_HAVE_SIGSETJMP)
+ if (H5_HAVE_MACRO_SIGSETJMP)
+ set (H5_HAVE_SIGSETJMP 1)
+ endif (H5_HAVE_MACRO_SIGSETJMP)
+ endif (H5_HAVE_SETJMP_H)
+endif (NOT H5_HAVE_SIGSETJMP)
#-----------------------------------------------------------------------------
# Check for Symbols
@@ -691,8 +691,8 @@ CHECK_SYMBOL_EXISTS (tzname "time.h" H5_HAVE_DECL_TZNAME)
#-----------------------------------------------------------------------------
# Check a bunch of other functions
#-----------------------------------------------------------------------------
-IF (NOT WINDOWS)
- FOREACH (test
+if (NOT WINDOWS)
+ foreach (test
LONE_COLON
HAVE_ATTRIBUTE
HAVE_C99_FUNC
@@ -703,40 +703,40 @@ IF (NOT WINDOWS)
CXX_HAVE_OFFSETOF
)
HDF5_FUNCTION_TEST (${test})
- ENDFOREACH (test)
-ENDIF (NOT WINDOWS)
+ endforeach (test)
+endif (NOT WINDOWS)
# For other CXX specific tests, use this MACRO.
MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST)
- IF ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- SET (OTHER_TEST_ADD_LIBRARIES)
- IF (CMAKE_REQUIRED_LIBRARIES)
- SET (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ENDIF (CMAKE_REQUIRED_LIBRARIES)
-
- FOREACH (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- ENDFOREACH (def)
-
- FOREACH (def
+ if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
+ set (OTHER_TEST_ADD_LIBRARIES)
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ endif (CMAKE_REQUIRED_LIBRARIES)
+
+ foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
+ endforeach (def)
+
+ foreach (def
HAVE_SYS_TIME_H
HAVE_UNISTD_H
HAVE_SYS_TYPES_H
HAVE_SYS_SOCKET_H
)
- IF ("${H5_${def}}")
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- ENDIF ("${H5_${def}}")
- ENDFOREACH (def)
+ if ("${H5_${def}}")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
+ endif ("${H5_${def}}")
+ endforeach (def)
- IF (LARGEFILE)
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS
+ if (LARGEFILE)
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
"${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- ENDIF (LARGEFILE)
+ endif (LARGEFILE)
- #MESSAGE (STATUS "Performing ${OTHER_TEST}")
+ #message (STATUS "Performing ${OTHER_TEST}")
TRY_COMPILE (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF5_RESOURCES_DIR}/HDF5CXXTests.cpp
@@ -744,25 +744,25 @@ MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST)
"${OTHER_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
- IF ("${OTHER_TEST}" EQUAL 0)
- SET (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- MESSAGE (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
- ELSE ("${OTHER_TEST}" EQUAL 0)
- MESSAGE (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
- SET (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ if ("${OTHER_TEST}" EQUAL 0)
+ set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
+ message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
+ else ("${OTHER_TEST}" EQUAL 0)
+ message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
+ set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
"${OUTPUT}\n"
)
- ENDIF ("${OTHER_TEST}" EQUAL 0)
- ENDIF ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
+ endif ("${OTHER_TEST}" EQUAL 0)
+ endif ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
ENDMACRO (HDF5_CXX_FUNCTION_TEST)
#-----------------------------------------------------------------------------
# Check a bunch of cxx functions
#-----------------------------------------------------------------------------
-IF (CMAKE_CXX_COMPILER_LOADED)
- FOREACH (test
+if (CMAKE_CXX_COMPILER_LOADED)
+ foreach (test
OLD_HEADER_FILENAME
H5_NO_NAMESPACE
H5_NO_STD
@@ -770,71 +770,71 @@ IF (CMAKE_CXX_COMPILER_LOADED)
NO_STATIC_CAST
)
HDF5_CXX_FUNCTION_TEST (${test})
- ENDFOREACH (test)
-ENDIF (CMAKE_CXX_COMPILER_LOADED)
+ endforeach (test)
+endif (CMAKE_CXX_COMPILER_LOADED)
#-----------------------------------------------------------------------------
# Check if Direct I/O driver works
#-----------------------------------------------------------------------------
-IF (NOT WINDOWS)
- OPTION (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" ON)
- IF (HDF5_ENABLE_DIRECT_VFD)
- SET (msg "Performing TEST_DIRECT_VFD_WORKS")
- SET (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
+if (NOT WINDOWS)
+ option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" ON)
+ if (HDF5_ENABLE_DIRECT_VFD)
+ set (msg "Performing TEST_DIRECT_VFD_WORKS")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
TRY_RUN (TEST_DIRECT_VFD_WORKS_RUN TEST_DIRECT_VFD_WORKS_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
)
- IF (TEST_DIRECT_VFD_WORKS_COMPILE)
- IF (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+ if (TEST_DIRECT_VFD_WORKS_COMPILE)
+ if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
HDF5_FUNCTION_TEST (HAVE_DIRECT)
- SET (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
- ADD_DEFINITIONS ("-D_GNU_SOURCE")
- ELSE (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
- SET (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
+ add_definitions ("-D_GNU_SOURCE")
+ else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+ set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
- ENDIF (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
- ELSE (TEST_DIRECT_VFD_WORKS_COMPILE )
- SET (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ endif (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+ else (TEST_DIRECT_VFD_WORKS_COMPILE )
+ set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
- ENDIF (TEST_DIRECT_VFD_WORKS_COMPILE)
- ENDIF (HDF5_ENABLE_DIRECT_VFD)
-ENDIF (NOT WINDOWS)
+ endif (TEST_DIRECT_VFD_WORKS_COMPILE)
+ endif (HDF5_ENABLE_DIRECT_VFD)
+endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check if InitOnceExecuteOnce is available
#-----------------------------------------------------------------------------
-IF (WINDOWS)
- IF (NOT HDF5_NO_IOEO_TEST)
- MESSAGE (STATUS "Checking for InitOnceExecuteOnce:")
- IF("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- IF (LARGEFILE)
- SET (CMAKE_REQUIRED_DEFINITIONS
+if (WINDOWS)
+ if (NOT HDF5_NO_IOEO_TEST)
+ message (STATUS "Checking for InitOnceExecuteOnce:")
+ if ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
+ if (LARGEFILE)
+ set (CMAKE_REQUIRED_DEFINITIONS
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- ENDIF (LARGEFILE)
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ endif (LARGEFILE)
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
"-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
- IF(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
+ else (CMAKE_REQUIRED_LIBRARIES)
+ set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif (CMAKE_REQUIRED_LIBRARIES)
+ if (CMAKE_REQUIRED_INCLUDES)
+ set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
+ else (CMAKE_REQUIRED_INCLUDES)
+ set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
+ endif (CMAKE_REQUIRED_INCLUDES)
TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
${CMAKE_BINARY_DIR}
@@ -846,96 +846,96 @@ IF (WINDOWS)
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
COMPILE_OUTPUT_VARIABLE OUTPUT)
# if it did not compile make the return value fail code of 1
- IF(NOT HAVE_IOEO_COMPILED)
- SET(HAVE_IOEO_EXITCODE 1)
- ENDIF(NOT HAVE_IOEO_COMPILED)
+ if (NOT HAVE_IOEO_COMPILED)
+ set (HAVE_IOEO_EXITCODE 1)
+ endif (NOT HAVE_IOEO_COMPILED)
# if the return value was 0 then it worked
- IF("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- SET(H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
- MESSAGE(STATUS "Performing Test InitOnceExecuteOnce - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
+ set (H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
+ message (STATUS "Performing Test InitOnceExecuteOnce - Success")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${HAVE_IOEO}\n")
- ELSE("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- IF(CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(H5_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
- ELSE(CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(H5_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
- ENDIF(CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
-
- MESSAGE(STATUS "Performing Test InitOnceExecuteOnce - Failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
+ if (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set (H5_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
+ else (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set (H5_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
+ endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
+
+ message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing InitOnceExecuteOnce Test failed with the following output:\n"
"${OUTPUT}\n"
"Return value: ${HAVE_IOEO_EXITCODE}\n")
- ENDIF("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- ENDIF("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- ENDIF (NOT HDF5_NO_IOEO_TEST)
-ENDIF (WINDOWS)
+ endif ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
+ endif ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
+ endif (NOT HDF5_NO_IOEO_TEST)
+endif (WINDOWS)
#-----------------------------------------------------------------------------
# Determine how 'inline' is used
#-----------------------------------------------------------------------------
-SET (HDF5_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE)
-FOREACH (inline_test inline __inline__ __inline)
- SET (INLINE_TEST_INLINE ${inline_test})
+set (HDF5_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE)
+foreach (inline_test inline __inline__ __inline)
+ set (INLINE_TEST_INLINE ${inline_test})
HDF5_FUNCTION_TEST (INLINE_TEST_${inline_test})
-ENDFOREACH (inline_test)
-
-SET (HDF5_EXTRA_TEST_DEFINITIONS)
-IF (INLINE_TEST___inline__)
- SET (H5_inline __inline__)
-ELSE (INLINE_TEST___inline__)
- IF (INLINE_TEST___inline)
- SET (H5_inline __inline)
- ELSE (INLINE_TEST___inline)
- IF (INLINE_TEST_inline)
- SET (H5_inline inline)
- ENDIF (INLINE_TEST_inline)
- ENDIF (INLINE_TEST___inline)
-ENDIF (INLINE_TEST___inline__)
+endforeach (inline_test)
+
+set (HDF5_EXTRA_TEST_DEFINITIONS)
+if (INLINE_TEST___inline__)
+ set (H5_inline __inline__)
+else (INLINE_TEST___inline__)
+ if (INLINE_TEST___inline)
+ set (H5_inline __inline)
+ else (INLINE_TEST___inline)
+ if (INLINE_TEST_inline)
+ set (H5_inline inline)
+ endif (INLINE_TEST_inline)
+ endif (INLINE_TEST___inline)
+endif (INLINE_TEST___inline__)
#-----------------------------------------------------------------------------
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
-IF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- SET (PRINT_LL_FOUND 0)
- MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
- FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
- SET (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- IF (H5_SIZEOF_LONG_LONG)
- SET (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- ENDIF (H5_SIZEOF_LONG_LONG)
+if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
+ set (PRINT_LL_FOUND 0)
+ message (STATUS "Checking for appropriate format for 64 bit long:")
+ foreach (HDF5_PRINTF_LL l64 l L q I64 ll)
+ set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
+ if (H5_SIZEOF_LONG_LONG)
+ set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
+ endif (H5_SIZEOF_LONG_LONG)
TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
)
- IF (HDF5_PRINTF_LL_TEST_COMPILE)
- IF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- SET (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- SET (PRINT_LL_FOUND 1)
- ELSE (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- MESSAGE ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- ENDIF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- ELSE (HDF5_PRINTF_LL_TEST_COMPILE)
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ if (HDF5_PRINTF_LL_TEST_COMPILE)
+ if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ set (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
+ set (PRINT_LL_FOUND 1)
+ else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ message ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
+ endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ else (HDF5_PRINTF_LL_TEST_COMPILE)
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
)
- ENDIF (HDF5_PRINTF_LL_TEST_COMPILE)
- ENDFOREACH (HDF5_PRINTF_LL)
-
- IF (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
- ELSE (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: not found")
- SET (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
+ endif (HDF5_PRINTF_LL_TEST_COMPILE)
+ endforeach (HDF5_PRINTF_LL)
+
+ if (PRINT_LL_FOUND)
+ message (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
+ else (PRINT_LL_FOUND)
+ message (STATUS "Checking for apropriate format for 64 bit long: not found")
+ set (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
"Width for printf for type `long long' or `__int64', us. `ll"
)
- ENDIF (PRINT_LL_FOUND)
-ENDIF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
+ endif (PRINT_LL_FOUND)
+endif (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
@@ -943,62 +943,62 @@ ENDIF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
# (This flag should be set for all machines, except for the Crays, where
# the cache value is set in it's config file)
#
-SET (H5_CONVERT_DENORMAL_FLOAT 1)
+set (H5_CONVERT_DENORMAL_FLOAT 1)
#-----------------------------------------------------------------------------
# Are we going to use HSIZE_T
#-----------------------------------------------------------------------------
-IF (HDF5_ENABLE_HSIZET)
- SET (H5_HAVE_LARGE_HSIZET 1)
-ENDIF (HDF5_ENABLE_HSIZET)
+if (HDF5_ENABLE_HSIZET)
+ set (H5_HAVE_LARGE_HSIZET 1)
+endif (HDF5_ENABLE_HSIZET)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
#-----------------------------------------------------------------------------
MACRO (H5ConversionTests TEST msg)
- IF ("${TEST}" MATCHES "^${TEST}$")
- # MESSAGE (STATUS "===> ${TEST}")
+ if ("${TEST}" MATCHES "^${TEST}$")
+ # message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/ConversionTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
OUTPUT_VARIABLE OUTPUT
)
- IF (${TEST}_COMPILE)
- IF (${TEST}_RUN MATCHES 0)
- SET (${TEST} 1 CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... yes")
- ELSE (${TEST}_RUN MATCHES 0)
- SET (${TEST} "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ if (${TEST}_COMPILE)
+ if (${TEST}_RUN MATCHES 0)
+ set (${TEST} 1 CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... yes")
+ else (${TEST}_RUN MATCHES 0)
+ set (${TEST} "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
- ENDIF (${TEST}_RUN MATCHES 0)
- ELSE (${TEST}_COMPILE )
- SET (${TEST} "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ endif (${TEST}_RUN MATCHES 0)
+ else (${TEST}_COMPILE )
+ set (${TEST} "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
- ENDIF (${TEST}_COMPILE)
+ endif (${TEST}_COMPILE)
- ENDIF("${TEST}" MATCHES "^${TEST}$")
+ endif ("${TEST}" MATCHES "^${TEST}$")
ENDMACRO (H5ConversionTests)
#-----------------------------------------------------------------------------
# Macro to make some of the conversion tests easier to write/read
#-----------------------------------------------------------------------------
MACRO (H5MiscConversionTest VAR TEST msg)
- IF ("${TEST}" MATCHES "^${TEST}$")
- IF (${VAR})
- SET (${TEST} 1 CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... yes")
- ELSE (${VAR})
- SET (${TEST} "" CACHE INTERNAL ${msg})
- MESSAGE (STATUS "${msg}... no")
- ENDIF (${VAR})
- ENDIF ("${TEST}" MATCHES "^${TEST}$")
+ if ("${TEST}" MATCHES "^${TEST}$")
+ if (${VAR})
+ set (${TEST} 1 CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... yes")
+ else (${VAR})
+ set (${TEST} "" CACHE INTERNAL ${msg})
+ message (STATUS "${msg}... no")
+ endif (${VAR})
+ endif ("${TEST}" MATCHES "^${TEST}$")
ENDMACRO (H5MiscConversionTest)
#-----------------------------------------------------------------------------
@@ -1021,9 +1021,9 @@ H5MiscConversionTest (H5_SIZEOF_LONG_DOUBLE H5_LDOUBLE_TO_INTEGER_ACCURATE "chec
# integers except 'unsigned long long'. Other HP-UX systems are unknown
# yet. (1/8/05 - SLU)
#
-IF (NOT MSVC)
+if (NOT MSVC)
H5ConversionTests (H5_LDOUBLE_TO_INTEGER_WORKS "Checking IF converting from long double to integers works")
-ENDIF (NOT MSVC)
+endif (NOT MSVC)
# -----------------------------------------------------------------------
# Set flag to indicate that the machine can handle conversion from
# integers to long double. (This flag should be set "yes" for all
@@ -1049,11 +1049,11 @@ H5ConversionTests (H5_ULONG_TO_FLOAT_ACCURATE "Checking IF accurately converting
# 64-bit machines, where the short program below tests if round-up is
# correctly handled.
#
-IF (CMAKE_SYSTEM MATCHES "solaris2.*")
+if (CMAKE_SYSTEM MATCHES "solaris2.*")
H5ConversionTests (H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE "Checking IF accurately converting unsigned long long to floating-point values")
-ELSE (CMAKE_SYSTEM MATCHES "solaris2.*")
- SET(H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE 1)
-ENDIF (CMAKE_SYSTEM MATCHES "solaris2.*")
+else (CMAKE_SYSTEM MATCHES "solaris2.*")
+ set (H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE 1)
+endif (CMAKE_SYSTEM MATCHES "solaris2.*")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'float' or 'double' to 'unsigned long long' values.
@@ -1081,19 +1081,19 @@ H5ConversionTests (H5_LDOUBLE_TO_UINT_ACCURATE "Checking IF correctly converting
# 'unsigned long long' to 'float' and 'double' typecasts.
# (This flag should be set for all machines.)
#
-IF (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$)
- SET (H5_ULLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling unsigned long long to floating-point typecasts work")
- MESSAGE (STATUS "Checking IF compiling unsigned long long to floating-point typecasts work... yes")
-ENDIF (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$)
+if (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$)
+ set (H5_ULLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling unsigned long long to floating-point typecasts work")
+ message (STATUS "Checking IF compiling unsigned long long to floating-point typecasts work... yes")
+endif (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can _compile_
# 'long long' to 'float' and 'double' typecasts.
# (This flag should be set for all machines.)
#
-IF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
- SET (H5_LLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling long long to floating-point typecasts work")
- MESSAGE (STATUS "Checking IF compiling long long to floating-point typecasts work... yes")
-ENDIF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
+if (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
+ set (H5_LLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling long long to floating-point typecasts work")
+ message (STATUS "Checking IF compiling long long to floating-point typecasts work... yes")
+endif (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can convert from
# 'unsigned long long' to 'long double' without precision loss.
@@ -1101,9 +1101,9 @@ ENDIF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
# where the last 2 bytes of mantissa are lost when compiler tries to do
# the conversion, and Cygwin where compiler doesn't do rounding correctly.)
#
-IF (NOT MSVC)
+if (NOT MSVC)
H5ConversionTests (H5_ULLONG_TO_LDOUBLE_PRECISION "Checking IF converting unsigned long long to long double with precision")
-ENDIF (NOT MSVC)
+endif (NOT MSVC)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle overflow converting
# all floating-point to all integer types.
@@ -1121,10 +1121,10 @@ H5ConversionTests (H5_FP_TO_INTEGER_OVERFLOW_WORKS "Checking IF overflows norma
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
#
-IF (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
- SET (H5_LDOUBLE_TO_LONG_SPECIAL 0 CACHE INTERNAL "Define if your system converts long double to (unsigned) long values with special algorithm")
- MESSAGE (STATUS "Checking IF your system converts long double to (unsigned) long values with special algorithm... no")
-ENDIF (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
+if (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
+ set (H5_LDOUBLE_TO_LONG_SPECIAL 0 CACHE INTERNAL "Define if your system converts long double to (unsigned) long values with special algorithm")
+ message (STATUS "Checking IF your system converts long double to (unsigned) long values with special algorithm... no")
+endif (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
@@ -1133,10 +1133,10 @@ ENDIF (H5_LDOUBLE_TO_LONG_SPECIAL MATCHES ^H5_LDOUBLE_TO_LONG_SPECIAL$)
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
#
-IF (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
- SET (H5_LONG_TO_LDOUBLE_SPECIAL 0 CACHE INTERNAL "Define if your system can convert (unsigned) long to long double values with special algorithm")
- MESSAGE (STATUS "Checking IF your system can convert (unsigned) long to long double values with special algorithm... no")
-ENDIF (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
+if (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
+ set (H5_LONG_TO_LDOUBLE_SPECIAL 0 CACHE INTERNAL "Define if your system can convert (unsigned) long to long double values with special algorithm")
+ message (STATUS "Checking IF your system can convert (unsigned) long to long double values with special algorithm... no")
+endif (H5_LONG_TO_LDOUBLE_SPECIAL MATCHES ^H5_LONG_TO_LDOUBLE_SPECIAL$)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'long double' to '(unsigned) long long' values. (This flag should be set for
@@ -1161,11 +1161,32 @@ H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting
# (This flag should be set to no for all machines, except for SGI IRIX64,
# where the cache value is set to yes in it's config file)
#
-IF (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
- SET (H5_BAD_LOG2_CODE_GENERATED 0 CACHE INTERNAL "Define if your system generates wrong code for log2 routine")
- MESSAGE (STATUS "Checking IF your system generates wrong code for log2 routine... no")
-ENDIF (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
+if (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
+ set (H5_BAD_LOG2_CODE_GENERATED 0 CACHE INTERNAL "Define if your system generates wrong code for log2 routine")
+ message (STATUS "Checking IF your system generates wrong code for log2 routine... no")
+endif (H5_BAD_LOG2_CODE_GENERATED MATCHES ^H5_BAD_LOG2_CODE_GENERATED$)
# ----------------------------------------------------------------------
# Check if pointer alignments are enforced
#
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
+
+# Define a macro for Cygwin (on XP only) where the compiler has rounding
+# problem converting from unsigned long long to long double */
+if (CYGWIN)
+ set (H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1)
+endif (CYGWIN)
+
+# -----------------------------------------------------------------------
+# wrapper script variables
+#
+set (prefix ${CMAKE_INSTALL_PREFIX})
+set (exec_prefix "\${prefix}")
+set (libdir "${exec_prefix}/lib")
+set (includedir "\${prefix}/include")
+set (host_os ${CMAKE_HOST_SYSTEM_NAME})
+set (CC ${CMAKE_C_COMPILER})
+set (CXX ${CMAKE_CXX_COMPILER})
+set (FC ${CMAKE_Fortran_COMPILER})
+foreach (LINK_LIB ${LINK_LIBS})
+ set (LIBS "${LIBS} -l${LINK_LIB}")
+endforeach (LINK_LIB ${LINK_LIBS})
diff --git a/config/cmake/FindHDF5.cmake.in b/config/cmake/FindHDF5.cmake.in
index 1b51ed4..0ac8bc9 100644
--- a/config/cmake/FindHDF5.cmake.in
+++ b/config/cmake/FindHDF5.cmake.in
@@ -38,18 +38,18 @@
# To aid in finding HDF5 as part of a subproject set
# HDF5_ROOT_DIR_HINT to the location where @HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake lies
-INCLUDE (SelectLibraryConfigurations)
-INCLUDE (FindPackageHandleStandardArgs)
+include (SelectLibraryConfigurations)
+include (FindPackageHandleStandardArgs)
# The HINTS option should only be used for values computed from the system.
-SET (_HDF5_HINTS
+set (_HDF5_HINTS
$ENV{HOME}/.local
$ENV{HDF5_ROOT}
$ENV{HDF5_ROOT_DIR_HINT}
)
# Hard-coded guesses should still go in PATHS. This ensures that the user
# environment can always override hard guesses.
-SET (_HDF5_PATHS
+set (_HDF5_PATHS
$ENV{HOME}/.local
$ENV{HDF5_ROOT}
$ENV{HDF5_ROOT_DIR_HINT}
@@ -78,9 +78,9 @@ FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h"
# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
# HDF5_INCLUDE_DIRS
-SET ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
+set ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
-IF (HDF5_INCLUDE_DIR)
- SET (HDF5_FOUND "YES")
- INCLUDE (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake)
-ENDIF (HDF5_INCLUDE_DIR)
+if (HDF5_INCLUDE_DIR)
+ set (HDF5_FOUND "YES")
+ include (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake)
+endif (HDF5_INCLUDE_DIR)
diff --git a/config/cmake/FindMPI.cmake b/config/cmake/FindMPI.cmake
index b16c9c3..1b67a30 100644
--- a/config/cmake/FindMPI.cmake
+++ b/config/cmake/FindMPI.cmake
@@ -86,7 +86,7 @@ include(GetPrerequisites)
#
# The compilers are detected in this order:
#
-# 1. Try to find the most generic availble MPI compiler, as this is usually set up by
+# 1. Try to find the most generic available MPI compiler, as this is usually set up by
# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's
# the right compiler.
#
@@ -354,6 +354,20 @@ function (interrogate_mpi_compiler lang try_libs)
# Extract the set of libraries to link against from the link command
# line
string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
+ # add the compiler implicit directories because some compilers
+ # such as the intel compiler have libraries that show up
+ # in the showme list that can only be found in the implicit
+ # link directories of the compiler. Do this for C++ and C
+ # compilers if the implicit link directories are defined.
+ if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES)
+ set(MPI_LINK_PATH
+ "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}")
+ endif ()
+
+ if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES)
+ set(MPI_LINK_PATH
+ "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
+ endif ()
# Determine full path names for all of the libraries that one needs
# to link against in an MPI program
@@ -413,18 +427,18 @@ function (interrogate_mpi_compiler lang try_libs)
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
PATH_SUFFIXES lib)
if (MPI_LIBRARIES_WORK AND MPI_LIB)
- set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB})
+ list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
endif()
endif()
if (${lang} STREQUAL Fortran)
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB
- NAMES fmpi fmpich fmpich2 fmpich2g
+ NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc
HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib)
+ PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
if (MPI_LIBRARIES_WORK AND MPI_LIB)
- set(MPI_LIBRARIES_WORK ${MPI_LIBRARIES_WORK} ${MPI_LIB})
+ list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
endif()
endif()
@@ -573,6 +587,11 @@ foreach (lang C CXX Fortran)
try_regular_compiler(${lang} regular_compiler_worked)
endif()
+ set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY})
+ set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED})
+ set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION})
+ set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
+
if (regular_compiler_worked)
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
else()
diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake
index b358862..f657cfa 100644
--- a/config/cmake/FindSZIP.cmake
+++ b/config/cmake/FindSZIP.cmake
@@ -11,7 +11,7 @@
# SZIP_LIBRARY_DEBUG - Debug version of SZIP library
# SZIP_LIBRARY_RELEASE - Release Version of SZIP library
-# MESSAGE (STATUS "Finding SZIP library and headers..." )
+# message (STATUS "Finding SZIP library and headers..." )
############################################
#
@@ -25,41 +25,41 @@
#########################################################################
MACRO (SZIP_ADJUST_LIB_VARS basename)
- IF (${basename}_INCLUDE_DIR)
+ if (${basename}_INCLUDE_DIR)
# if only the release version was found, set the debug variable also to the release version
- IF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
- SET (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
- SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
- SET (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
- ENDIF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
+ if (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
+ set (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
+ set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
+ set (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
+ endif (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
# if only the debug version was found, set the release variable also to the debug version
- IF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- SET (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
- SET (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
- SET (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
- ENDIF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- IF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
+ if (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
+ set (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
+ set (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
+ set (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
+ endif (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
+ if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
+ if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
- SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
- ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- ENDIF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
+ set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
+ endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
+ endif (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
- SET (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
+ set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
- IF (${basename}_LIBRARY)
- SET (${basename}_FOUND 1)
- ENDIF (${basename}_LIBRARY)
+ if (${basename}_LIBRARY)
+ set (${basename}_FOUND 1)
+ endif (${basename}_LIBRARY)
- ENDIF (${basename}_INCLUDE_DIR )
+ endif (${basename}_INCLUDE_DIR )
# Make variables changeble to the advanced user
MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
@@ -67,19 +67,19 @@ ENDMACRO (SZIP_ADJUST_LIB_VARS)
# Look for the header file.
-SET (SZIP_INCLUDE_SEARCH_DIRS
+set (SZIP_INCLUDE_SEARCH_DIRS
$ENV{SZIP_INSTALL}/include
$ENV{SZIP_INSTALL}/include/szip
/usr/include
/usr/include/szip
)
-SET (SZIP_LIB_SEARCH_DIRS
+set (SZIP_LIB_SEARCH_DIRS
$ENV{SZIP_INSTALL}/lib
/usr/lib
)
-SET (SZIP_BIN_SEARCH_DIRS
+set (SZIP_BIN_SEARCH_DIRS
$ENV{SZIP_INSTALL}/bin
/usr/bin
)
@@ -90,13 +90,13 @@ FIND_PATH (SZIP_INCLUDE_DIR
NO_DEFAULT_PATH
)
-IF (WIN32)
- SET (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
- SET (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-ELSE (WIN32)
- SET (SZIP_SEARCH_DEBUG_NAMES "sz_d")
- SET (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-ENDIF (WIN32)
+if (WIN32)
+ set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
+ set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
+else (WIN32)
+ set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
+ set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
+endif (WIN32)
# Look for the library.
FIND_LIBRARY (SZIP_LIBRARY_DEBUG
@@ -113,67 +113,67 @@ FIND_LIBRARY (SZIP_LIBRARY_RELEASE
SZIP_ADJUST_LIB_VARS (SZIP)
-IF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- SET (SZIP_FOUND 1)
- SET (SZIP_LIBRARIES ${SZIP_LIBRARY})
- SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- IF (SZIP_LIBRARY_DEBUG)
+if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+ set (SZIP_FOUND 1)
+ set (SZIP_LIBRARIES ${SZIP_LIBRARY})
+ set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
+ if (SZIP_LIBRARY_DEBUG)
GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
- SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- ELSEIF (SZIP_LIBRARY_RELEASE)
+ set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
+ elseif (SZIP_LIBRARY_RELEASE)
GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
- SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- ENDIF (SZIP_LIBRARY_DEBUG)
+ set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
+ endif (SZIP_LIBRARY_DEBUG)
-ELSE (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- SET (SZIP_FOUND 0)
- SET (SZIP_LIBRARIES)
- SET (SZIP_INCLUDE_DIRS)
-ENDIF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+else (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+ set (SZIP_FOUND 0)
+ set (SZIP_LIBRARIES)
+ set (SZIP_INCLUDE_DIRS)
+endif (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
# Report the results.
-IF (NOT SZIP_FOUND)
- SET (SZIP_DIR_MESSAGE
+if (NOT SZIP_FOUND)
+ set (SZIP_DIR_MESSAGE
"SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable."
)
- IF (NOT SZIP_FIND_QUIETLY)
- MESSAGE (STATUS "${SZIP_DIR_MESSAGE}")
- ELSE (NOT SZIP_FIND_QUIETLY)
- IF (SZIP_FIND_REQUIRED)
- MESSAGE (FATAL_ERROR "SZip was NOT found and is Required by this project")
- ENDIF (SZIP_FIND_REQUIRED)
- ENDIF (NOT SZIP_FIND_QUIETLY)
-ENDIF (NOT SZIP_FOUND)
-
-IF (SZIP_FOUND)
- INCLUDE (CheckSymbolExists)
+ if (NOT SZIP_FIND_QUIETLY)
+ message (STATUS "${SZIP_DIR_MESSAGE}")
+ else (NOT SZIP_FIND_QUIETLY)
+ if (SZIP_FIND_REQUIRED)
+ message (FATAL_ERROR "SZip was NOT found and is Required by this project")
+ endif (SZIP_FIND_REQUIRED)
+ endif (NOT SZIP_FIND_QUIETLY)
+endif (NOT SZIP_FOUND)
+
+if (SZIP_FOUND)
+ include (CheckSymbolExists)
#############################################
# Find out if SZIP was build using dll's
#############################################
# Save required variable
- SET (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
- SET (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
+ set (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
+ set (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
# Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- SET (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
+ set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
CHECK_SYMBOL_EXISTS (SZIP_BUILT_AS_DYNAMIC_LIB "SZconfig.h" HAVE_SZIP_DLL)
- IF (HAVE_SZIP_DLL STREQUAL "TRUE")
- SET (HAVE_SZIP_DLL "1")
- ENDIF (HAVE_SZIP_DLL STREQUAL "TRUE")
+ if (HAVE_SZIP_DLL STREQUAL "TRUE")
+ set (HAVE_SZIP_DLL "1")
+ endif (HAVE_SZIP_DLL STREQUAL "TRUE")
# Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
- SET (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
- SET (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+ set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
+ set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
#
#############################################
-ENDIF (SZIP_FOUND)
-
-IF (FIND_SZIP_DEBUG)
- MESSAGE (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
- MESSAGE (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
- MESSAGE (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
- MESSAGE (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
- MESSAGE (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}")
- MESSAGE (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-ENDIF (FIND_SZIP_DEBUG)
+endif (SZIP_FOUND)
+
+if (FIND_SZIP_DEBUG)
+ message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
+ message (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
+ message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
+ message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
+ message (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}")
+ message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+endif (FIND_SZIP_DEBUG)
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index 3e6ee18..d0379db 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -1,31 +1,31 @@
#-------------------------------------------------------------------------------
MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
- SET (LIB_OUT_NAME "${libname}")
- IF (${libtype} MATCHES "SHARED")
- IF (WIN32)
- SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
- ELSE (WIN32)
- SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION})
- ENDIF (WIN32)
- SET_TARGET_PROPERTIES (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION})
- IF (WIN32)
- SET (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${HDF5_PACKAGE_SOVERSION}")
- ELSE (WIN32)
- SET_TARGET_PROPERTIES (${libtarget} PROPERTIES SOVERSION ${HDF5_PACKAGE_SOVERSION})
- ENDIF (WIN32)
- ENDIF (${libtype} MATCHES "SHARED")
+ set (LIB_OUT_NAME "${libname}")
+ if (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
+ else (WIN32)
+ set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION})
+ endif (WIN32)
+ set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION})
+ if (WIN32)
+ set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${HDF5_PACKAGE_SOVERSION}")
+ else (WIN32)
+ set_target_properties (${libtarget} PROPERTIES SOVERSION ${HDF5_PACKAGE_SOVERSION})
+ endif (WIN32)
+ endif (${libtype} MATCHES "SHARED")
HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype})
#-- Apple Specific install_name for libraries
- IF (APPLE)
- OPTION (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
- IF (HDF5_BUILD_WITH_INSTALL_NAME)
+ if (APPLE)
+ option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
+ if (HDF5_BUILD_WITH_INSTALL_NAME)
SET_TARGET_PROPERTIES(${libtarget} PROPERTIES
LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
- ENDIF (HDF5_BUILD_WITH_INSTALL_NAME)
- ENDIF (APPLE)
+ endif (HDF5_BUILD_WITH_INSTALL_NAME)
+ endif (APPLE)
ENDMACRO (H5_SET_LIB_OPTIONS)
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 8fa76b8..e65ea21 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -7,7 +7,7 @@ ENABLE_LANGUAGE (Fortran)
#-----------------------------------------------------------------------------
# Detect name mangling convention used between Fortran and C
#-----------------------------------------------------------------------------
-INCLUDE (FortranCInterface)
+include (FortranCInterface)
FortranCInterface_HEADER (
${CMAKE_BINARY_DIR}/FCMangle.h
MACRO_NAMESPACE "H5_FC_"
@@ -15,28 +15,28 @@ FortranCInterface_HEADER (
SYMBOLS mysub mymod:my_sub
)
-FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)")
-STRING (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}")
+file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)")
+string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
+set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}")
-FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)")
-STRING (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
+file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)")
+string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
+set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
#-----------------------------------------------------------------------------
# The provided CMake Fortran macros don't provide a general check function
# so this one is used for a sizeof test.
#-----------------------------------------------------------------------------
MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- IF (NOT DEFINED ${VARIABLE})
- MESSAGE (STATUS "Testing Fortran ${FUNCTION}")
- IF (CMAKE_REQUIRED_LIBRARIES)
- SET (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ if (NOT DEFINED ${VARIABLE})
+ message (STATUS "Testing Fortran ${FUNCTION}")
+ if (CMAKE_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- ELSE (CMAKE_REQUIRED_LIBRARIES)
- SET (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- ENDIF (CMAKE_REQUIRED_LIBRARIES)
- FILE (WRITE
+ else (CMAKE_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif (CMAKE_REQUIRED_LIBRARIES)
+ file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
"${CODE}"
)
@@ -47,25 +47,25 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
OUTPUT_VARIABLE OUTPUT
)
-# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# MESSAGE ( "Test result ${OUTPUT}")
-# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+# message ( "Test result ${OUTPUT}")
+# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- IF (${VARIABLE})
- SET (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- MESSAGE (STATUS "Testing Fortran ${FUNCTION} - OK")
- FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if (${VARIABLE})
+ set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n"
)
- ELSE (${VARIABLE})
- MESSAGE (STATUS "Testing Fortran ${FUNCTION} - Fail")
- SET (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else (${VARIABLE})
+ message (STATUS "Testing Fortran ${FUNCTION} - Fail")
+ set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF (${VARIABLE})
- ENDIF (NOT DEFINED ${VARIABLE})
+ endif (${VARIABLE})
+ endif (NOT DEFINED ${VARIABLE})
ENDMACRO (CHECK_FORTRAN_FEATURE)
#-----------------------------------------------------------------------------
@@ -131,9 +131,9 @@ CHECK_FORTRAN_FEATURE(iso_c_binding
#-----------------------------------------------------------------------------
# Add debug information (intel Fortran : JB)
#-----------------------------------------------------------------------------
-IF (CMAKE_Fortran_COMPILER MATCHES ifort)
- IF (WIN32)
- SET (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
- ENDIF (WIN32)
-ENDIF (CMAKE_Fortran_COMPILER MATCHES ifort)
+if (CMAKE_Fortran_COMPILER MATCHES ifort)
+ if (WIN32)
+ set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
+ endif (WIN32)
+endif (CMAKE_Fortran_COMPILER MATCHES ifort)
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
index 57e6be7..505a9d5 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -3,7 +3,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
# May need to build JPEG with PIC on x64 machines with gcc
# Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
- IF (${compress_type} MATCHES "SVN")
+ if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (JPEG
SVN_REPOSITORY ${JPEG_URL}
# [SVN_REVISION rev]
@@ -19,7 +19,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
)
- ELSEIF (${compress_type} MATCHES "TGZ")
+ elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (JPEG
URL ${JPEG_URL}
URL_MD5 ""
@@ -35,72 +35,72 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
)
- ENDIF (${compress_type} MATCHES "SVN")
+ endif (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_GET_PROPERTY (JPEG BINARY_DIR SOURCE_DIR)
- IF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- IF (WIN32)
- SET (JPEG_LIB_NAME "jpeg_D")
- ELSE (WIN32)
- SET (JPEG_LIB_NAME "jpeg_debug")
- ENDIF (WIN32)
- ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- SET (JPEG_LIB_NAME "jpeg")
- ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (WIN32)
+ set (JPEG_LIB_NAME "jpeg_D")
+ else (WIN32)
+ set (JPEG_LIB_NAME "jpeg_debug")
+ endif (WIN32)
+ else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ set (JPEG_LIB_NAME "jpeg")
+ endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
# Create imported target szip
ADD_LIBRARY(jpeg ${libtype} IMPORTED)
ADD_DEPENDENCIES (jpeg JPEG)
- IF (${libtype} MATCHES "SHARED")
- IF (WIN32)
- IF (MINGW)
+ if (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ if (MINGW)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}.lib"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (MINGW)
+ else (MINGW)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ENDIF (MINGW)
- ELSE (WIN32)
- IF (CYGWIN)
+ endif (MINGW)
+ else (WIN32)
+ if (CYGWIN)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (CYGWIN)
+ else (CYGWIN)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${JPEG_VERSION_STRING}"
SOVERSION "${JPEG_VERSION_STRING}"
)
- ENDIF (CYGWIN)
- ENDIF (WIN32)
- ELSE (${libtype} MATCHES "SHARED")
- IF (WIN32 AND NOT MINGW)
+ endif (CYGWIN)
+ endif (WIN32)
+ else (${libtype} MATCHES "SHARED")
+ if (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ELSE (WIN32 AND NOT MINGW)
+ else (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(jpeg PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ENDIF (WIN32 AND NOT MINGW)
- ENDIF (${libtype} MATCHES "SHARED")
+ endif (WIN32 AND NOT MINGW)
+ endif (${libtype} MATCHES "SHARED")
-# INCLUDE (${BINARY_DIR}/JPEG-targets.cmake)
- SET (JPEG_LIBRARY "jpeg")
+# include (${BINARY_DIR}/JPEG-targets.cmake)
+ set (JPEG_LIBRARY "jpeg")
- SET (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
- SET (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
- SET (JPEG_FOUND 1)
- SET (JPEG_LIBRARIES ${JPEG_LIBRARY})
- SET (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
+ set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
+ set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
+ set (JPEG_FOUND 1)
+ set (JPEG_LIBRARIES ${JPEG_LIBRARY})
+ set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
ENDMACRO (EXTERNAL_JPEG_LIBRARY)
#-------------------------------------------------------------------------------
@@ -109,15 +109,15 @@ MACRO (PACKAGE_JPEG_LIBRARY compress_type)
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JPEG_INCLUDE_DIR_GEN}/jconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
- SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
- IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
+ if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ADD_DEPENDENCIES (JPEG-GenHeader-Copy JPEG)
- ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ENDMACRO (PACKAGE_JPEG_LIBRARY)
#-------------------------------------------------------------------------------
MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
- IF (${compress_type} MATCHES "SVN")
+ if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (SZIP
SVN_REPOSITORY ${SZIP_URL}
# [SVN_REVISION rev]
@@ -134,7 +134,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
)
- ELSEIF (${compress_type} MATCHES "TGZ")
+ elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (SZIP
URL ${SZIP_URL}
URL_MD5 ""
@@ -151,72 +151,72 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
)
- ENDIF (${compress_type} MATCHES "SVN")
+ endif (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR)
- IF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- IF (WIN32)
- SET (SZIP_LIB_NAME "szip_D")
- ELSE (WIN32)
- SET (SZIP_LIB_NAME "szip_debug")
- ENDIF (WIN32)
- ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- SET (SZIP_LIB_NAME "szip")
- ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (WIN32)
+ set (SZIP_LIB_NAME "szip_D")
+ else (WIN32)
+ set (SZIP_LIB_NAME "szip_debug")
+ endif (WIN32)
+ else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ set (SZIP_LIB_NAME "szip")
+ endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
# Create imported target szip
ADD_LIBRARY(szip ${libtype} IMPORTED)
ADD_DEPENDENCIES (szip SZIP)
- IF (${libtype} MATCHES "SHARED")
- IF (WIN32)
- IF (MINGW)
+ if (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ if (MINGW)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}.lib"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (MINGW)
+ else (MINGW)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ENDIF (MINGW)
- ELSE (WIN32)
- IF (CYGWIN)
+ endif (MINGW)
+ else (WIN32)
+ if (CYGWIN)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (CYGWIN)
+ else (CYGWIN)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${SZIP_VERSION_STRING}"
SOVERSION "${SZIP_VERSION_STRING}"
)
- ENDIF (CYGWIN)
- ENDIF (WIN32)
- ELSE (${libtype} MATCHES "SHARED")
- IF (WIN32 AND NOT MINGW)
+ endif (CYGWIN)
+ endif (WIN32)
+ else (${libtype} MATCHES "SHARED")
+ if (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ELSE (WIN32 AND NOT MINGW)
+ else (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ENDIF (WIN32 AND NOT MINGW)
- ENDIF (${libtype} MATCHES "SHARED")
+ endif (WIN32 AND NOT MINGW)
+ endif (${libtype} MATCHES "SHARED")
-# INCLUDE (${BINARY_DIR}/SZIP-targets.cmake)
- SET (SZIP_LIBRARY "szip")
+# include (${BINARY_DIR}/SZIP-targets.cmake)
+ set (SZIP_LIBRARY "szip")
- SET (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
- SET (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
- SET (SZIP_FOUND 1)
- SET (SZIP_LIBRARIES ${SZIP_LIBRARY})
- SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
+ set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
+ set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
+ set (SZIP_FOUND 1)
+ set (SZIP_LIBRARIES ${SZIP_LIBRARY})
+ set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
ENDMACRO (EXTERNAL_SZIP_LIBRARY)
#-------------------------------------------------------------------------------
@@ -225,15 +225,15 @@ MACRO (PACKAGE_SZIP_LIBRARY compress_type)
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
- SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
- IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
+ if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ADD_DEPENDENCIES (SZIP-GenHeader-Copy SZIP)
- ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ENDMACRO (PACKAGE_SZIP_LIBRARY)
#-------------------------------------------------------------------------------
MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
- IF (${compress_type} MATCHES "SVN")
+ if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (ZLIB
SVN_REPOSITORY ${ZLIB_URL}
# [SVN_REVISION rev]
@@ -249,7 +249,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
)
- ELSEIF (${compress_type} MATCHES "TGZ")
+ elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (ZLIB
URL ${ZLIB_URL}
URL_MD5 ""
@@ -265,76 +265,76 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
)
- ENDIF (${compress_type} MATCHES "SVN")
+ endif (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR)
- IF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- IF (WIN32)
- SET (ZLIB_LIB_NAME "zlib_D")
- ELSE (WIN32)
- SET (ZLIB_LIB_NAME "z_debug")
- ENDIF (WIN32)
- ELSE (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- IF (WIN32)
- SET (ZLIB_LIB_NAME "zlib")
- ELSE (WIN32)
- SET (ZLIB_LIB_NAME "z")
- ENDIF (WIN32)
- ENDIF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (WIN32)
+ set (ZLIB_LIB_NAME "zlib_D")
+ else (WIN32)
+ set (ZLIB_LIB_NAME "z_debug")
+ endif (WIN32)
+ else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ if (WIN32)
+ set (ZLIB_LIB_NAME "zlib")
+ else (WIN32)
+ set (ZLIB_LIB_NAME "z")
+ endif (WIN32)
+ endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
# Create imported target szip
ADD_LIBRARY(zlib ${libtype} IMPORTED)
ADD_DEPENDENCIES (zlib ZLIB)
- IF (${libtype} MATCHES "SHARED")
- IF (WIN32)
- IF (MINGW)
+ if (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ if (MINGW)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}.lib"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (MINGW)
+ else (MINGW)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ENDIF (MINGW)
- ELSE (WIN32)
- IF (CYGWIN)
+ endif (MINGW)
+ else (WIN32)
+ if (CYGWIN)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- ELSE (CYGWIN)
+ else (CYGWIN)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${ZLIB_VERSION_STRING}"
SOVERSION "${ZLIB_VERSION_STRING}"
)
- ENDIF (CYGWIN)
- ENDIF (WIN32)
- ELSE (${libtype} MATCHES "SHARED")
- IF (WIN32 AND NOT MINGW)
+ endif (CYGWIN)
+ endif (WIN32)
+ else (${libtype} MATCHES "SHARED")
+ if (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ELSE (WIN32 AND NOT MINGW)
+ else (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- ENDIF (WIN32 AND NOT MINGW)
- ENDIF (${libtype} MATCHES "SHARED")
+ endif (WIN32 AND NOT MINGW)
+ endif (${libtype} MATCHES "SHARED")
-# INCLUDE (${BINARY_DIR}/ZLIB-targets.cmake)
- SET (ZLIB_LIBRARY "zlib")
+# include (${BINARY_DIR}/ZLIB-targets.cmake)
+ set (ZLIB_LIBRARY "zlib")
- SET (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
- SET (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
- SET (ZLIB_FOUND 1)
- SET (ZLIB_LIBRARIES ${ZLIB_LIBRARY})
- SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
+ set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
+ set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
+ set (ZLIB_FOUND 1)
+ set (ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+ set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
ENDMACRO (EXTERNAL_ZLIB_LIBRARY)
#-------------------------------------------------------------------------------
@@ -343,8 +343,8 @@ MACRO (PACKAGE_ZLIB_LIBRARY compress_type)
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
)
- SET (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- IF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
+ if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ADD_DEPENDENCIES (ZLIB-GenHeader-Copy ZLIB)
- ENDIF (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+ endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
ENDMACRO (PACKAGE_ZLIB_LIBRARY)
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index b0788f2..56fdf83 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -1,52 +1,52 @@
#-------------------------------------------------------------------------------
MACRO (SET_GLOBAL_VARIABLE name value)
- SET (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
+ set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
ENDMACRO (SET_GLOBAL_VARIABLE)
#-------------------------------------------------------------------------------
MACRO (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
#set(source_group_path "Source/AIM/${NAME}")
- STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH})
+ string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH})
source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
#-- The following is needed if we ever start to use OS X Frameworks but only
#-- works on CMake 2.6 and greater
- #SET_PROPERTY (SOURCE ${HEADERS}
+ #set_property (SOURCE ${HEADERS}
# PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
#)
ENDMACRO (IDE_GENERATED_PROPERTIES)
#-------------------------------------------------------------------------------
MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- # INSTALL (FILES ${HEADERS}
+ # install (FILES ${HEADERS}
# DESTINATION include/R3D/${NAME}
# COMPONENT Headers
# )
- STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} )
+ string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} )
source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
#-- The following is needed if we ever start to use OS X Frameworks but only
#-- works on CMake 2.6 and greater
- #SET_PROPERTY (SOURCE ${HEADERS}
+ #set_property (SOURCE ${HEADERS}
# PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
#)
ENDMACRO (IDE_SOURCE_PROPERTIES)
#-------------------------------------------------------------------------------
MACRO (TARGET_NAMING libtarget libtype)
- IF (WIN32)
- IF (${libtype} MATCHES "SHARED")
- SET_TARGET_PROPERTIES (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}dll")
- ENDIF (${libtype} MATCHES "SHARED")
- ENDIF (WIN32)
+ if (WIN32)
+ if (${libtype} MATCHES "SHARED")
+ set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}dll")
+ endif (${libtype} MATCHES "SHARED")
+ endif (WIN32)
ENDMACRO (TARGET_NAMING)
#-------------------------------------------------------------------------------
MACRO (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
- IF (WIN32 AND MSVC)
- GET_TARGET_PROPERTY (target_name ${libtarget} RELWITHDEBINFO_OUTPUT_NAME)
- INSTALL (
+ if (WIN32 AND MSVC)
+ get_target_property (target_name ${libtarget} RELWITHDEBINFO_OUTPUT_NAME)
+ install (
FILES
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
DESTINATION
@@ -54,15 +54,15 @@ MACRO (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
CONFIGURATIONS RelWithDebInfo
COMPONENT ${targetcomponent}
)
- ENDIF (WIN32 AND MSVC)
+ endif (WIN32 AND MSVC)
ENDMACRO (INSTALL_TARGET_PDB)
#-------------------------------------------------------------------------------
MACRO (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
- IF (WIN32 AND MSVC)
- GET_TARGET_PROPERTY (target_name ${progtarget} RELWITHDEBINFO_OUTPUT_NAME)
- GET_TARGET_PROPERTY (target_prefix ${progtarget} PREFIX)
- INSTALL (
+ if (WIN32 AND MSVC)
+ get_target_property (target_name ${progtarget} RELWITHDEBINFO_OUTPUT_NAME)
+ get_target_property (target_prefix ${progtarget} PREFIX)
+ install (
FILES
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${target_prefix}${target_name}.pdb
DESTINATION
@@ -70,37 +70,37 @@ MACRO (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
CONFIGURATIONS RelWithDebInfo
COMPONENT ${targetcomponent}
)
- ENDIF (WIN32 AND MSVC)
+ endif (WIN32 AND MSVC)
ENDMACRO (INSTALL_PROGRAM_PDB)
#-------------------------------------------------------------------------------
MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype)
# message (STATUS "${libname} libtype: ${libtype}")
- IF (${libtype} MATCHES "SHARED")
- IF (WIN32)
- SET (LIB_RELEASE_NAME "${libname}")
- SET (LIB_DEBUG_NAME "${libname}_D")
- ELSE (WIN32)
- SET (LIB_RELEASE_NAME "${libname}")
- SET (LIB_DEBUG_NAME "${libname}_debug")
- ENDIF (WIN32)
- ELSE (${libtype} MATCHES "SHARED")
- IF (WIN32)
- SET (LIB_RELEASE_NAME "lib${libname}")
- SET (LIB_DEBUG_NAME "lib${libname}_D")
- ELSE (WIN32)
+ if (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ set (LIB_RELEASE_NAME "${libname}")
+ set (LIB_DEBUG_NAME "${libname}_D")
+ else (WIN32)
+ set (LIB_RELEASE_NAME "${libname}")
+ set (LIB_DEBUG_NAME "${libname}_debug")
+ endif (WIN32)
+ else (${libtype} MATCHES "SHARED")
+ if (WIN32)
+ set (LIB_RELEASE_NAME "lib${libname}")
+ set (LIB_DEBUG_NAME "lib${libname}_D")
+ else (WIN32)
# if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value
- IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET (LIB_RELEASE_NAME "${libname}")
- SET (LIB_DEBUG_NAME "${libname}_debug")
- ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET (LIB_RELEASE_NAME "lib${libname}")
- SET (LIB_DEBUG_NAME "lib${libname}_debug")
- ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- ENDIF (WIN32)
- ENDIF (${libtype} MATCHES "SHARED")
+ if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set (LIB_RELEASE_NAME "${libname}")
+ set (LIB_DEBUG_NAME "${libname}_debug")
+ else (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set (LIB_RELEASE_NAME "lib${libname}")
+ set (LIB_DEBUG_NAME "lib${libname}_debug")
+ endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ endif (WIN32)
+ endif (${libtype} MATCHES "SHARED")
- SET_TARGET_PROPERTIES (${libtarget}
+ set_target_properties (${libtarget}
PROPERTIES
DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME}
RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME}
@@ -109,79 +109,79 @@ MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype)
)
#----- Use MSVC Naming conventions for Shared Libraries
- IF (MINGW AND ${libtype} MATCHES "SHARED")
- SET_TARGET_PROPERTIES (${libtarget}
+ if (MINGW AND ${libtype} MATCHES "SHARED")
+ set_target_properties (${libtarget}
PROPERTIES
IMPORT_SUFFIX ".lib"
IMPORT_PREFIX ""
PREFIX ""
)
- ENDIF (MINGW AND ${libtype} MATCHES "SHARED")
+ endif (MINGW AND ${libtype} MATCHES "SHARED")
ENDMACRO (HDF_SET_LIB_OPTIONS)
#-------------------------------------------------------------------------------
MACRO (TARGET_C_PROPERTIES wintarget addcompileflags addlinkflags)
- IF (MSVC)
+ if (MSVC)
TARGET_MSVC_PROPERTIES (${wintarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- ELSE (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${wintarget}
+ else (MSVC)
+ if (BUILD_SHARED_LIBS)
+ set_target_properties (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${wintarget}
+ else (BUILD_SHARED_LIBS)
+ set_target_properties (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
+ endif (BUILD_SHARED_LIBS)
+ endif (MSVC)
ENDMACRO (TARGET_C_PROPERTIES)
#-------------------------------------------------------------------------------
MACRO (TARGET_MSVC_PROPERTIES wintarget addcompileflags addlinkflags)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${wintarget}
+ if (MSVC)
+ if (BUILD_SHARED_LIBS)
+ set_target_properties (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${wintarget}
+ else (BUILD_SHARED_LIBS)
+ set_target_properties (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
+ endif (BUILD_SHARED_LIBS)
+ endif (MSVC)
ENDMACRO (TARGET_MSVC_PROPERTIES)
#-------------------------------------------------------------------------------
MACRO (TARGET_FORTRAN_PROPERTIES forttarget addcompileflags addlinkflags)
- IF (WIN32)
+ if (WIN32)
TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- ENDIF (WIN32)
+ endif (WIN32)
ENDMACRO (TARGET_FORTRAN_PROPERTIES)
#-------------------------------------------------------------------------------
MACRO (TARGET_FORTRAN_WIN_PROPERTIES forttarget addcompileflags addlinkflags)
- IF (MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${forttarget}
+ if (MSVC)
+ if (BUILD_SHARED_LIBS)
+ set_target_properties (${forttarget}
PROPERTIES
COMPILE_FLAGS "/dll ${addcompileflags}"
LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
)
- ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${forttarget}
+ else (BUILD_SHARED_LIBS)
+ set_target_properties (${forttarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
)
- ENDIF (BUILD_SHARED_LIBS)
- ENDIF (MSVC)
+ endif (BUILD_SHARED_LIBS)
+ endif (MSVC)
ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake
index 175c420..a54f22c 100644
--- a/config/cmake/UserMacros/Windows_MT.cmake
+++ b/config/cmake/UserMacros/Windows_MT.cmake
@@ -11,31 +11,31 @@
# Option to Build with Static CRT libraries on Windows
#-------------------------------------------------------------------------------
MACRO (TARGET_STATIC_CRT_FLAGS)
- IF (MSVC AND NOT BUILD_SHARED_LIBS)
- FOREACH (flag_var
+ if (MSVC AND NOT BUILD_SHARED_LIBS)
+ foreach (flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- IF (${flag_var} MATCHES "/MD")
- STRING (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- ENDIF (${flag_var} MATCHES "/MD")
- ENDFOREACH (flag_var)
- FOREACH (flag_var
+ if (${flag_var} MATCHES "/MD")
+ string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif (${flag_var} MATCHES "/MD")
+ endforeach (flag_var)
+ foreach (flag_var
CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS_DEBUG CMAKE_Fortran_FLAGS_RELEASE
CMAKE_Fortran_FLAGS_MINSIZEREL CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
- IF (${flag_var} MATCHES "/libs:dll")
- STRING (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}")
- ENDIF (${flag_var} MATCHES "/libs:dll")
- ENDFOREACH (flag_var)
- SET (WIN_COMPILE_FLAGS "")
- SET (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
- ENDIF (MSVC AND NOT BUILD_SHARED_LIBS)
+ if (${flag_var} MATCHES "/libs:dll")
+ string (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}")
+ endif (${flag_var} MATCHES "/libs:dll")
+ endforeach (flag_var)
+ set (WIN_COMPILE_FLAGS "")
+ set (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
+ endif (MSVC AND NOT BUILD_SHARED_LIBS)
ENDMACRO (TARGET_STATIC_CRT_FLAGS)
#-----------------------------------------------------------------------------
-OPTION (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF)
-IF (BUILD_STATIC_CRT_LIBS)
+option (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF)
+if (BUILD_STATIC_CRT_LIBS)
TARGET_STATIC_CRT_FLAGS ()
-ENDIF (BUILD_STATIC_CRT_LIBS)
+endif (BUILD_STATIC_CRT_LIBS)
\ No newline at end of file
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index f76d908..eb99f5d 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -4,73 +4,73 @@
# EXTERNAL cache entries
########################
-SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
-SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
-SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
-SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
-SET (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
-SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
-SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
-SET (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
-SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
-SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
-SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
-SET (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
-SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
-SET (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
-SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
-SET (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
-SET (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
-SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
-SET (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
+set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
-SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
-SET (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
-SET (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
-SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
-SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
+set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
-SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
+set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
-SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
-SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index 74ac912..579d855 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -2,29 +2,29 @@
# against a reference file. Exit status of command can also be compared.
# arguments checking
-IF (NOT TEST_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-ENDIF (NOT TEST_PROGRAM)
-#IF (NOT TEST_ARGS)
-# MESSAGE (STATUS "Require TEST_ARGS to be defined")
-#ENDIF (NOT TEST_ARGS)
-IF (NOT TEST_FOLDER)
- MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-ENDIF (NOT TEST_FOLDER)
-IF (NOT TEST_OUTPUT)
- MESSAGE (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-ENDIF (NOT TEST_OUTPUT)
-#IF (NOT TEST_EXPECT)
-# MESSAGE (STATUS "Require TEST_EXPECT to be defined")
-#ENDIF (NOT TEST_EXPECT)
-IF (NOT TEST_FILTER)
- MESSAGE (STATUS "Require TEST_FILTER to be defined")
-ENDIF (NOT TEST_FILTER)
-IF (NOT TEST_REFERENCE)
- MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-ENDIF (NOT TEST_REFERENCE)
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif (NOT TEST_PROGRAM)
+#if (NOT TEST_ARGS)
+# message (STATUS "Require TEST_ARGS to be defined")
+#endif (NOT TEST_ARGS)
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif (NOT TEST_FOLDER)
+if (NOT TEST_OUTPUT)
+ message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
+endif (NOT TEST_OUTPUT)
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif (NOT TEST_EXPECT)
+if (NOT TEST_FILTER)
+ message (STATUS "Require TEST_FILTER to be defined")
+endif (NOT TEST_FILTER)
+if (NOT TEST_REFERENCE)
+ message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
+endif (NOT TEST_REFERENCE)
-MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
# run the test program, capture the stdout/stderr and the result var
EXECUTE_PROCESS (
@@ -37,28 +37,28 @@ EXECUTE_PROCESS (
ERROR_VARIABLE TEST_ERROR
)
-MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}")
-MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}")
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
# now grep the output with the reference
-FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
# TEST_REFERENCE should always be matched
STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-IF (${TEST_RESULT} STREQUAL "0")
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
-ENDIF (${TEST_RESULT} STREQUAL "0")
+if (${TEST_RESULT} STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
+endif (${TEST_RESULT} STREQUAL "0")
STRING(REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-IF (${TEST_EXPECT} STREQUAL "1")
+if (${TEST_EXPECT} STREQUAL "1")
# TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
STRING(LENGTH "${TEST_MATCH}" TEST_RESULT)
- IF (NOT ${TEST_RESULT} STREQUAL "0")
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL "0")
-ENDIF (${TEST_EXPECT} STREQUAL "1")
+ if (NOT ${TEST_RESULT} STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
+ endif (NOT ${TEST_RESULT} STREQUAL "0")
+endif (${TEST_EXPECT} STREQUAL "1")
# everything went fine...
-MESSAGE ("Passed: The output of ${TEST_PROGRAM} matched")
+message ("Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index c1201cc..c3d0811 100644
--- a/config/cmake/hdf5-config-version.cmake.in
+++ b/config/cmake/hdf5-config-version.cmake.in
@@ -2,26 +2,26 @@
# HDF5 Version file for install directory
#-----------------------------------------------------------------------------
-SET (PACKAGE_VERSION @HDF5_VERSION_STRING@)
+set (PACKAGE_VERSION @HDF5_VERSION_STRING@)
-IF ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
+if ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
# exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
- IF ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
+ if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
# compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- SET (PACKAGE_VERSION_COMPATIBLE 1)
+ set (PACKAGE_VERSION_COMPATIBLE 1)
- IF ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
- SET (PACKAGE_VERSION_EXACT 1)
+ if ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
+ set (PACKAGE_VERSION_EXACT 1)
- IF ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
+ if ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
# not using this yet
- ENDIF ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
+ endif ("${PACKAGE_FIND_VERSION_TWEAK}" EQUAL @H5_VERS_SUBRELEASE@)
- ENDIF ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
+ endif ("${PACKAGE_FIND_VERSION_PATCH}" EQUAL @H5_VERS_RELEASE@)
- ENDIF ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
-ENDIF ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
+ endif ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @H5_VERS_MINOR@)
+endif ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @H5_VERS_MAJOR@)
diff --git a/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in
index fbe97ac..60888c8 100644
--- a/config/cmake/hdf5-config.cmake.build.in
+++ b/config/cmake/hdf5-config.cmake.build.in
@@ -6,16 +6,16 @@ GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
#-----------------------------------------------------------------------------
# User Options
#-----------------------------------------------------------------------------
-SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
-SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
-SET (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
-SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
-SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
-SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-SET (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
-SET (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
-SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
+set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
+set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
+set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
+set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
#-----------------------------------------------------------------------------
# Dependencies
@@ -28,46 +28,46 @@ ENDIF(HDF5_ENABLE_PARALLEL)
#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
+set (HDF5_INCLUDE_DIR "@HDF5_INCLUDES_BUILD_TIME@" "${HDF5_MPI_C_INCLUDE_PATH}" )
-IF (HDF5_BUILD_FORTRAN)
- SET (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
-ENDIF (HDF5_BUILD_FORTRAN)
+if (HDF5_BUILD_FORTRAN)
+ set (HDF5_INCLUDE_DIR_FORTRAN "@CMAKE_Fortran_MODULE_DIRECTORY@" )
+endif (HDF5_BUILD_FORTRAN)
-IF (HDF5_BUILD_CPP_LIB)
- SET (HDF5_INCLUDE_DIR_CPP ${HDF5_INCLUDE_DIR} )
-ENDIF (HDF5_BUILD_CPP_LIB)
+if (HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_CPP ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_CPP_LIB)
-IF (HDF5_BUILD_HL_LIB)
- SET (HDF5_INCLUDE_DIR_HL ${HDF5_INCLUDE_DIR} )
-ENDIF (HDF5_BUILD_HL_LIB)
+if (HDF5_BUILD_HL_LIB)
+ set (HDF5_INCLUDE_DIR_HL ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_HL_LIB)
-IF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- SET (HDF5_INCLUDE_DIR_HL_CPP ${HDF5_INCLUDE_DIR} )
-ENDIF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_HL_CPP ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
-IF (HDF5_BUILD_TOOLS)
- SET (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
-ENDIF (HDF5_BUILD_TOOLS)
+if (HDF5_BUILD_TOOLS)
+ set (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
+endif (HDF5_BUILD_TOOLS)
-IF (HDF5_BUILD_SHARED_LIBS)
- SET (H5_BUILT_AS_DYNAMIC_LIB 1 )
-ELSE (HDF5_BUILD_SHARED_LIBS)
- SET (H5_BUILT_AS_STATIC_LIB 1 )
-ENDIF (HDF5_BUILD_SHARED_LIBS)
+if (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_DYNAMIC_LIB 1 )
+else (HDF5_BUILD_SHARED_LIBS)
+ set (H5_BUILT_AS_STATIC_LIB 1 )
+endif (HDF5_BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
-SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already build hdf5 as a subproject
#-----------------------------------------------------------------------------
-IF (NOT TARGET "@HDF5_PACKAGE@")
- INCLUDE (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
- SET (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-ENDIF (NOT TARGET "@HDF5_PACKAGE@")
+if (NOT TARGET "@HDF5_PACKAGE@")
+ include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
+endif (NOT TARGET "@HDF5_PACKAGE@")
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index 9c5a5a1..799ff9d 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -4,24 +4,24 @@
GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-IF (NOT WIN32)
+if (NOT WIN32)
GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-ENDIF (NOT WIN32)
+endif (NOT WIN32)
#-----------------------------------------------------------------------------
# User Options
#-----------------------------------------------------------------------------
-SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
-SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
-SET (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
-SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
-SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
-SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-SET (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
-SET (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
-SET (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
-SET (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-SET (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
+set (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+set (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+set (HDF5_ENABLE_F2003 @HDF5_ENABLE_F2003@)
+set (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+set (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+set (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+set (HDF5_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
+set (HDF5_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
+set (HDF5_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
+set (HDF5_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+set (HDF5_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
#-----------------------------------------------------------------------------
# Dependencies
@@ -34,48 +34,48 @@ ENDIF(HDF5_ENABLE_PARALLEL)
#-----------------------------------------------------------------------------
# Directories
#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
+set (HDF5_INCLUDE_DIR "${_IMPORT_PREFIX}/include" "${HDF5_MPI_C_INCLUDE_PATH}" )
-IF (HDF5_BUILD_FORTRAN)
- SET (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
-ENDIF (HDF5_BUILD_FORTRAN)
+if (HDF5_BUILD_FORTRAN)
+ set (HDF5_INCLUDE_DIR_FORTRAN "${_IMPORT_PREFIX}/include/fortran" )
+endif (HDF5_BUILD_FORTRAN)
-IF (HDF5_BUILD_CPP_LIB)
- SET (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include/cpp" )
-ENDIF (HDF5_BUILD_CPP_LIB)
+if (HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_CPP "${_IMPORT_PREFIX}/include/cpp" )
+endif (HDF5_BUILD_CPP_LIB)
-IF (HDF5_BUILD_HL_LIB)
- SET (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include/hl" )
-ENDIF (HDF5_BUILD_HL_LIB)
+if (HDF5_BUILD_HL_LIB)
+ set (HDF5_INCLUDE_DIR_HL "${_IMPORT_PREFIX}/include/hl" )
+endif (HDF5_BUILD_HL_LIB)
-IF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
- SET (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include/hl/cpp" )
-ENDIF (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+if (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
+ set (HDF5_INCLUDE_DIR_HL_CPP "${_IMPORT_PREFIX}/include/hl/cpp" )
+endif (HDF5_BUILD_HL_LIB AND HDF5_BUILD_CPP_LIB)
-IF (HDF5_BUILD_TOOLS)
- SET (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" )
- SET (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" )
-ENDIF (HDF5_BUILD_TOOLS)
+if (HDF5_BUILD_TOOLS)
+ set (HDF5_INCLUDE_DIR_TOOLS "${_IMPORT_PREFIX}/include" )
+ set (HDF5_TOOLS_DIR "${_IMPORT_PREFIX}/bin" )
+endif (HDF5_BUILD_TOOLS)
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
-SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
-SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
-SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
-IF (NOT TARGET "@HDF5_PACKAGE@")
- IF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- INCLUDE (${SELF_DIR}/../ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
- ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- IF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- INCLUDE (${SELF_DIR}/../SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- INCLUDE (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
- SET (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-ENDIF (NOT TARGET "@HDF5_PACKAGE@")
+if (NOT TARGET "@HDF5_PACKAGE@")
+ if (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ include (${SELF_DIR}/../ZLIB/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
+ if (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
+ include (${SELF_DIR}/../SZIP/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ endif (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
+ include (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
+ set (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
+endif (NOT TARGET "@HDF5_PACKAGE@")
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 03896fb..c30d70d 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -4,76 +4,76 @@
# EXTERNAL cache entries
########################
-SET (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
+set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
-SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
-SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
-SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
-SET (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
-SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
-SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
-SET (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
-SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
-SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
-SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
-SET (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
-SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
-SET (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
-SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
-SET (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
-SET (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
-SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
-SET (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
+set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker is used" FORCE)
-SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
-SET (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
-SET (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
-SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
-SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
+set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
-SET (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
+set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
-SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
-SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
-SET (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
+set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
-SET (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
+set (CTEST_BUILD_CONFIGURATION "Debug" CACHE STRING "Build Debug" FORCE)
-SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake
index b9ead6f..3d5ec31 100644
--- a/config/cmake/prunTest.cmake
+++ b/config/cmake/prunTest.cmake
@@ -3,35 +3,35 @@
cmake_policy(SET CMP0007 NEW)
# arguments checking
-IF (NOT TEST_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-ENDIF (NOT TEST_PROGRAM)
-#IF (NOT TEST_ARGS)
-# MESSAGE (STATUS "Require TEST_ARGS to be defined")
-#ENDIF (NOT TEST_ARGS)
-IF (NOT TEST_FOLDER)
- MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-ENDIF (NOT TEST_FOLDER)
-IF (NOT TEST_OUTPUT)
- MESSAGE (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-ENDIF (NOT TEST_OUTPUT)
-#IF (NOT TEST_EXPECT)
-# MESSAGE (STATUS "Require TEST_EXPECT to be defined")
-#ENDIF (NOT TEST_EXPECT)
-#IF (NOT TEST_FILTER)
-# MESSAGE (STATUS "Require TEST_FILTER to be defined")
-#ENDIF (NOT TEST_FILTER)
-IF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-ENDIF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-SET (ERROR_APPEND 1)
-
-MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-IF (TEST_ENV_VAR)
- SET (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-ENDIF (TEST_ENV_VAR)
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif (NOT TEST_PROGRAM)
+#if (NOT TEST_ARGS)
+# message (STATUS "Require TEST_ARGS to be defined")
+#endif (NOT TEST_ARGS)
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif (NOT TEST_FOLDER)
+if (NOT TEST_OUTPUT)
+ message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
+endif (NOT TEST_OUTPUT)
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif (NOT TEST_EXPECT)
+#if (NOT TEST_FILTER)
+# message (STATUS "Require TEST_FILTER to be defined")
+#endif (NOT TEST_FILTER)
+if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
+ message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
+endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
+
+set (ERROR_APPEND 1)
+
+message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+if (TEST_ENV_VAR)
+ set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
+endif (TEST_ENV_VAR)
# run the test program, capture the stdout/stderr and the result var
EXECUTE_PROCESS (
@@ -44,36 +44,36 @@ EXECUTE_PROCESS (
ERROR_VARIABLE TEST_ERROR
)
-MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}")
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
-FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
-FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
+file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-IF (ERROR_APPEND)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (ERROR_APPEND)
+if (ERROR_APPEND)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (ERROR_APPEND)
-IF (TEST_APPEND)
- FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
-ENDIF (TEST_APPEND)
+if (TEST_APPEND)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
+endif (TEST_APPEND)
-MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}")
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
-IF (TEST_MASK)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_MASK)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_MASK)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_MASK)
-IF (TEST_MASK_MOD)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_MASK_MOD)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_MASK_MOD)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_MASK_MOD)
-IF (TEST_MASK_ERROR)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_MASK_ERROR)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
@@ -81,65 +81,65 @@ IF (TEST_MASK_ERROR)
STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_MASK_ERROR)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_MASK_ERROR)
-IF (TEST_FILTER)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_FILTER)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_FILTER)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_FILTER)
-#IF (TEST_REF_FILTER)
-# MESSAGE (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
-# FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
+#if (TEST_REF_FILTER)
+# message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
+# file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
-# FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-#ENDIF (TEST_REF_FILTER)
+# file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
+#endif (TEST_REF_FILTER)
-IF (NOT TEST_SKIP_COMPARE)
- IF (WIN32 AND NOT MINGW)
- FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
- FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
- ENDIF (WIN32 AND NOT MINGW)
+if (NOT TEST_SKIP_COMPARE)
+ if (WIN32 AND NOT MINGW)
+ file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
+ file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
+ endif (WIN32 AND NOT MINGW)
# now compare the output with the reference
EXECUTE_PROCESS (
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/P_${TEST_REFERENCE}
RESULT_VARIABLE TEST_RESULT
)
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- SET (TEST_RESULT 0)
- FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ set (TEST_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
LIST (LENGTH test_act len_act)
- FILE (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
+ file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
LIST (LENGTH test_ref len_ref)
- IF (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL "0")
MATH (EXPR _FP_LEN "${len_ref} - 1")
- FOREACH (line RANGE 0 ${_FP_LEN})
+ foreach (line RANGE 0 ${_FP_LEN})
LIST (GET test_act ${line} str_act)
LIST (GET test_ref ${line} str_ref)
- IF (NOT "${str_act}" STREQUAL "${str_ref}")
- IF (NOT "${str_act}" STREQUAL "")
- SET (TEST_RESULT 1)
- MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- ENDIF (NOT "${str_act}" STREQUAL "")
- ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
- ENDFOREACH (line RANGE 0 ${_FP_LEN})
- ENDIF (NOT ${len_act} STREQUAL "0")
- IF (NOT ${len_act} STREQUAL ${len_ref})
- SET (TEST_RESULT 1)
- ENDIF (NOT ${len_act} STREQUAL ${len_ref})
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
-
- MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
+ if (NOT "${str_act}" STREQUAL "${str_ref}")
+ if (NOT "${str_act}" STREQUAL "")
+ set (TEST_RESULT 1)
+ message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif (NOT "${str_act}" STREQUAL "")
+ endif (NOT "${str_act}" STREQUAL "${str_ref}")
+ endforeach (line RANGE 0 ${_FP_LEN})
+ endif (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL ${len_ref})
+ set (TEST_RESULT 1)
+ endif (NOT ${len_act} STREQUAL ${len_ref})
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
-ENDIF (NOT TEST_SKIP_COMPARE)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
+endif (NOT TEST_SKIP_COMPARE)
# everything went fine...
-MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
+message ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 0a80873..879426c 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -3,37 +3,37 @@
cmake_policy(SET CMP0007 NEW)
# arguments checking
-IF (NOT TEST_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-ENDIF (NOT TEST_PROGRAM)
-#IF (NOT TEST_ARGS)
-# MESSAGE (STATUS "Require TEST_ARGS to be defined")
-#ENDIF (NOT TEST_ARGS)
-IF (NOT TEST_FOLDER)
- MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-ENDIF (NOT TEST_FOLDER)
-IF (NOT TEST_OUTPUT)
- MESSAGE (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-ENDIF (NOT TEST_OUTPUT)
-IF (NOT TEST_EXPECT)
- MESSAGE (STATUS "Require TEST_EXPECT to be defined")
-ENDIF (NOT TEST_EXPECT)
-#IF (NOT TEST_FILTER)
-# MESSAGE (STATUS "Require TEST_FILTER to be defined")
-#ENDIF (NOT TEST_FILTER)
-IF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-ENDIF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-IF (NOT TEST_ERRREF)
- SET (ERROR_APPEND 1)
-ENDIF (NOT TEST_ERRREF)
-
-MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-IF (TEST_ENV_VAR)
- SET (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-ENDIF (TEST_ENV_VAR)
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif (NOT TEST_PROGRAM)
+#if (NOT TEST_ARGS)
+# message (STATUS "Require TEST_ARGS to be defined")
+#endif (NOT TEST_ARGS)
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif (NOT TEST_FOLDER)
+if (NOT TEST_OUTPUT)
+ message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
+endif (NOT TEST_OUTPUT)
+if (NOT TEST_EXPECT)
+ message (STATUS "Require TEST_EXPECT to be defined")
+endif (NOT TEST_EXPECT)
+#if (NOT TEST_FILTER)
+# message (STATUS "Require TEST_FILTER to be defined")
+#endif (NOT TEST_FILTER)
+if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
+ message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
+endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
+
+if (NOT TEST_ERRREF)
+ set (ERROR_APPEND 1)
+endif (NOT TEST_ERRREF)
+
+message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+if (TEST_ENV_VAR)
+ set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
+endif (TEST_ENV_VAR)
# run the test program, capture the stdout/stderr and the result var
EXECUTE_PROCESS (
@@ -46,42 +46,42 @@ EXECUTE_PROCESS (
ERROR_VARIABLE TEST_ERROR
)
-MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}")
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
-IF (ERROR_APPEND)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (ERROR_APPEND)
+if (ERROR_APPEND)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (ERROR_APPEND)
-IF (TEST_APPEND)
- FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
-ENDIF (TEST_APPEND)
+if (TEST_APPEND)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
+endif (TEST_APPEND)
# if the return value is !=${TEST_EXPECT} bail out
-IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}")
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
-IF (TEST_MASK)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_MASK)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_MASK)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_MASK)
-IF (TEST_MASK_MOD)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+if (TEST_MASK_MOD)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_MASK_MOD)
-
-IF (TEST_MASK_ERROR)
- IF (NOT TEST_ERRREF)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- ELSE (NOT TEST_ERRREF)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- ENDIF (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_MASK_MOD)
+
+if (TEST_MASK_ERROR)
+ if (NOT TEST_ERRREF)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ else (NOT TEST_ERRREF)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ endif (NOT TEST_ERRREF)
STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
@@ -89,105 +89,105 @@ IF (TEST_MASK_ERROR)
STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- IF (NOT TEST_ERRREF)
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
- ELSE (NOT TEST_ERRREF)
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
- ENDIF (NOT TEST_ERRREF)
-ENDIF (TEST_MASK_ERROR)
-
-IF (TEST_FILTER)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ if (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+ else (NOT TEST_ERRREF)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
+ endif (NOT TEST_ERRREF)
+endif (TEST_MASK_ERROR)
+
+if (TEST_FILTER)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-ENDIF (TEST_FILTER)
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif (TEST_FILTER)
-IF (NOT TEST_SKIP_COMPARE)
- IF (WIN32 AND NOT MINGW)
- FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- ENDIF (WIN32 AND NOT MINGW)
+if (NOT TEST_SKIP_COMPARE)
+ if (WIN32 AND NOT MINGW)
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ endif (WIN32 AND NOT MINGW)
# now compare the output with the reference
EXECUTE_PROCESS (
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_RESULT
)
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- SET (TEST_RESULT 0)
- FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ set (TEST_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
LIST (LENGTH test_act len_act)
- FILE (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
LIST (LENGTH test_ref len_ref)
- IF (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL "0")
MATH (EXPR _FP_LEN "${len_ref} - 1")
- FOREACH (line RANGE 0 ${_FP_LEN})
+ foreach (line RANGE 0 ${_FP_LEN})
LIST (GET test_act ${line} str_act)
LIST (GET test_ref ${line} str_ref)
- IF (NOT "${str_act}" STREQUAL "${str_ref}")
- IF (NOT "${str_act}" STREQUAL "")
- SET (TEST_RESULT 1)
- MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- ENDIF (NOT "${str_act}" STREQUAL "")
- ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
- ENDFOREACH (line RANGE 0 ${_FP_LEN})
- ENDIF (NOT ${len_act} STREQUAL "0")
- IF (NOT ${len_act} STREQUAL ${len_ref})
- SET (TEST_RESULT 1)
- ENDIF (NOT ${len_act} STREQUAL ${len_ref})
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
-
- MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
+ if (NOT "${str_act}" STREQUAL "${str_ref}")
+ if (NOT "${str_act}" STREQUAL "")
+ set (TEST_RESULT 1)
+ message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif (NOT "${str_act}" STREQUAL "")
+ endif (NOT "${str_act}" STREQUAL "${str_ref}")
+ endforeach (line RANGE 0 ${_FP_LEN})
+ endif (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL ${len_ref})
+ set (TEST_RESULT 1)
+ endif (NOT ${len_act} STREQUAL ${len_ref})
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
- IF (TEST_ERRREF)
- IF (WIN32 AND NOT MINGW)
- FILE (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- FILE (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
- ENDIF (WIN32 AND NOT MINGW)
+ if (TEST_ERRREF)
+ if (WIN32 AND NOT MINGW)
+ file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ endif (WIN32 AND NOT MINGW)
# now compare the error output with the error reference
EXECUTE_PROCESS (
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_RESULT
)
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- SET (TEST_RESULT 0)
- FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ set (TEST_RESULT 0)
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
LIST (LENGTH test_act len_act)
- FILE (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
+ file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
LIST (LENGTH test_ref len_ref)
MATH (EXPR _FP_LEN "${len_ref} - 1")
- IF (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL "0")
MATH (EXPR _FP_LEN "${len_ref} - 1")
- FOREACH (line RANGE 0 ${_FP_LEN})
+ foreach (line RANGE 0 ${_FP_LEN})
LIST (GET test_act ${line} str_act)
LIST (GET test_ref ${line} str_ref)
- IF (NOT "${str_act}" STREQUAL "${str_ref}")
- IF (NOT "${str_act}" STREQUAL "")
- SET (TEST_RESULT 1)
- MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- ENDIF (NOT "${str_act}" STREQUAL "")
- ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
- ENDFOREACH (line RANGE 0 ${_FP_LEN})
- ENDIF (NOT ${len_act} STREQUAL "0")
- IF (NOT ${len_act} STREQUAL ${len_ref})
- SET (TEST_RESULT 1)
- ENDIF (NOT ${len_act} STREQUAL ${len_ref})
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
-
- MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
+ if (NOT "${str_act}" STREQUAL "${str_ref}")
+ if (NOT "${str_act}" STREQUAL "")
+ set (TEST_RESULT 1)
+ message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ endif (NOT "${str_act}" STREQUAL "")
+ endif (NOT "${str_act}" STREQUAL "${str_ref}")
+ endforeach (line RANGE 0 ${_FP_LEN})
+ endif (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL ${len_ref})
+ set (TEST_RESULT 1)
+ endif (NOT ${len_act} STREQUAL ${len_ref})
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
- IF (NOT ${TEST_RESULT} STREQUAL 0)
- MESSAGE (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
- ENDIF (TEST_ERRREF)
-ENDIF (NOT TEST_SKIP_COMPARE)
+ if (NOT ${TEST_RESULT} STREQUAL 0)
+ message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
+ endif (NOT ${TEST_RESULT} STREQUAL 0)
+ endif (TEST_ERRREF)
+endif (NOT TEST_SKIP_COMPARE)
# everything went fine...
-MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
+message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 8910bb2..2e0740b 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -2,44 +2,44 @@
# against a reference file. Exit status of command can also be compared.
# arguments checking
-IF (NOT TEST_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_PROGRAM tellub to be defined")
-ENDIF (NOT TEST_PROGRAM)
-IF (NOT TEST_GET_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined")
-ENDIF (NOT TEST_GET_PROGRAM)
-IF (NOT TEST_FOLDER)
- MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-ENDIF (NOT TEST_FOLDER)
-IF (NOT TEST_HFILE)
- MESSAGE (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined")
-ENDIF (NOT TEST_HFILE)
-IF (NOT TEST_UFILE)
- MESSAGE (FATAL_ERROR "Require TEST_UFILE the ub file to be defined")
-ENDIF (NOT TEST_UFILE)
-IF (NOT TEST_CHECKUB)
- MESSAGE (STATUS "Require TEST_CHECKUB - YES or NO - to be defined")
-ENDIF (NOT TEST_CHECKUB)
-#IF (NOT TEST_EXPECT)
-# MESSAGE (STATUS "Require TEST_EXPECT to be defined")
-#ENDIF (NOT TEST_EXPECT)
-#IF (NOT TEST_OFILE)
-# MESSAGE (FATAL_ERROR "Require TEST_OFILE the original hdf file to be defined")
-#ENDIF (NOT TEST_OFILE)
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM tellub to be defined")
+endif (NOT TEST_PROGRAM)
+if (NOT TEST_GET_PROGRAM)
+ message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined")
+endif (NOT TEST_GET_PROGRAM)
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif (NOT TEST_FOLDER)
+if (NOT TEST_HFILE)
+ message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined")
+endif (NOT TEST_HFILE)
+if (NOT TEST_UFILE)
+ message (FATAL_ERROR "Require TEST_UFILE the ub file to be defined")
+endif (NOT TEST_UFILE)
+if (NOT TEST_CHECKUB)
+ message (STATUS "Require TEST_CHECKUB - YES or NO - to be defined")
+endif (NOT TEST_CHECKUB)
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif (NOT TEST_EXPECT)
+#if (NOT TEST_OFILE)
+# message (FATAL_ERROR "Require TEST_OFILE the original hdf file to be defined")
+#endif (NOT TEST_OFILE)
-SET (TEST_U_STRING_LEN 0)
-SET (TEST_O_STRING_LEN 0)
-SET (TEST_H_STRING_LEN 0)
-SET (TEST_STRING_SIZE 0)
+set (TEST_U_STRING_LEN 0)
+set (TEST_O_STRING_LEN 0)
+set (TEST_H_STRING_LEN 0)
+set (TEST_STRING_SIZE 0)
-IF (TEST_CHECKUB STREQUAL "YES")
+if (TEST_CHECKUB STREQUAL "YES")
# find the length of the user block to check
#s1=`cat $ufile | wc -c | sed -e 's/ //g'`
- FILE (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING)
- STRING (LENGTH ${TEST_U_STRING} TEST_U_STRING_LEN)
+ file (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING)
+ string (LENGTH ${TEST_U_STRING} TEST_U_STRING_LEN)
# Get the size of the original user block, if any.
- IF (TEST_OFILE)
+ if (TEST_OFILE)
# 'tellub' calls H5Fget_user_block to get the size
# of the user block
#s2=`$JAM_BIN/tellub $origfile`
@@ -51,15 +51,15 @@ IF (TEST_CHECKUB STREQUAL "YES")
OUTPUT_VARIABLE TEST_ERROR
ERROR_VARIABLE TEST_ERROR
)
- IF (NOT ${TEST_RESULT} STREQUAL "0")
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL "0")
- FILE (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
- ENDIF (TEST_OFILE)
+ if (NOT ${TEST_RESULT} STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
+ endif (NOT ${TEST_RESULT} STREQUAL "0")
+ file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
+ endif (TEST_OFILE)
MATH( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
- IF (NOT TEST_O_STRING_LEN STREQUAL "0")
+ if (NOT TEST_O_STRING_LEN STREQUAL "0")
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
EXECUTE_PROCESS (
COMMAND ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
@@ -71,12 +71,12 @@ IF (TEST_CHECKUB STREQUAL "YES")
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#cat $ufile >> $cmpfile
- FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
- FILE (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}")
- ELSE (NOT TEST_O_STRING_LEN STREQUAL "0")
- FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
- FILE (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM})
- ENDIF (NOT TEST_O_STRING_LEN STREQUAL "0")
+ file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
+ file (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}")
+ else (NOT TEST_O_STRING_LEN STREQUAL "0")
+ file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
+ file (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM})
+ endif (NOT TEST_O_STRING_LEN STREQUAL "0")
#$JAM_BIN/getub -c $size $hfile > $tfile
EXECUTE_PROCESS (
@@ -95,12 +95,12 @@ IF (TEST_CHECKUB STREQUAL "YES")
RESULT_VARIABLE TEST_RESULT
)
- MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}")
+ message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}")
# if the return value is !=${TEST_EXPECT} bail out
- IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
- ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-ELSE (TEST_CHECKUB STREQUAL "YES")
+ if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
+ endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+else (TEST_CHECKUB STREQUAL "YES")
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
EXECUTE_PROCESS (
@@ -110,11 +110,11 @@ ELSE (TEST_CHECKUB STREQUAL "YES")
OUTPUT_VARIABLE TEST_ERROR
ERROR_VARIABLE TEST_ERROR
)
- IF (NOT TEST_H_STRING_LEN STREQUAL "0")
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
- ENDIF (NOT TEST_H_STRING_LEN STREQUAL "0")
-ENDIF (TEST_CHECKUB STREQUAL "YES")
+ if (NOT TEST_H_STRING_LEN STREQUAL "0")
+ message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
+ endif (NOT TEST_H_STRING_LEN STREQUAL "0")
+endif (TEST_CHECKUB STREQUAL "YES")
# everything went fine...
-MESSAGE ("Passed: The output of CHECK matched expectation")
+message ("Passed: The output of CHECK matched expectation")
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index 2e854fb..d3cb87e 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -2,27 +2,27 @@
# Exit status of command can also be compared.
# arguments checking
-IF (NOT TEST_PROGRAM)
- MESSAGE (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-ENDIF (NOT TEST_PROGRAM)
-#IF (NOT TEST_ARGS)
-# MESSAGE (STATUS "Require TEST_ARGS to be defined")
-#ENDIF (NOT TEST_ARGS)
-#IF (NOT TEST_EXPECT)
-# MESSAGE (STATUS "Require TEST_EXPECT to be defined")
-#ENDIF (NOT TEST_EXPECT)
-IF (NOT TEST_FOLDER)
- MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-ENDIF (NOT TEST_FOLDER)
-IF (NOT TEST_VFD)
- MESSAGE (FATAL_ERROR "Require TEST_VFD to be defined")
-ENDIF (NOT TEST_VFD)
-
-SET (ERROR_APPEND 1)
-
-MESSAGE (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-SET (ENV{HDF5_DRIVER} "${TEST_VFD}")
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif (NOT TEST_PROGRAM)
+#if (NOT TEST_ARGS)
+# message (STATUS "Require TEST_ARGS to be defined")
+#endif (NOT TEST_ARGS)
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif (NOT TEST_EXPECT)
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif (NOT TEST_FOLDER)
+if (NOT TEST_VFD)
+ message (FATAL_ERROR "Require TEST_VFD to be defined")
+endif (NOT TEST_VFD)
+
+set (ERROR_APPEND 1)
+
+message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+set (ENV{HDF5_DRIVER} "${TEST_VFD}")
# run the test program, capture the stdout/stderr and the result var
EXECUTE_PROCESS (
COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
@@ -33,18 +33,18 @@ EXECUTE_PROCESS (
ERROR_VARIABLE TEST_ERROR
)
-MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}")
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
-IF (ERROR_APPEND)
- FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM)
- FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}")
-ENDIF (ERROR_APPEND)
+if (ERROR_APPEND)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}")
+endif (ERROR_APPEND)
# if the return value is !=${TEST_EXPECT} bail out
-IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
# everything went fine...
-MESSAGE ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
+message ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index e7a1326..fe8216d 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,15 +1,15 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_EXAMPLES)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
h5_crtdat
h5_rdwt
h5_crtatt
@@ -36,22 +36,22 @@ SET (examples
h5_shared_mesg
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
+foreach (example ${examples})
+ add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
TARGET_NAMING (${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (${example} " " " ")
- TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${example} PROPERTIES FOLDER examples)
-ENDFOREACH (example ${examples})
+ target_link_libraries (${example} ${HDF5_LIB_TARGET})
+ set_target_properties (${example} PROPERTIES FOLDER examples)
+endforeach (example ${examples})
-IF (H5_HAVE_PARALLEL)
- ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
+if (H5_HAVE_PARALLEL)
+ add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
TARGET_NAMING (ph5example ${LIB_TYPE})
TARGET_C_PROPERTIES (ph5example " " " ")
- TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (ph5example PROPERTIES FOLDER examples)
-ENDIF (H5_HAVE_PARALLEL)
+ target_link_libraries (ph5example ${HDF5_LIB_TARGET})
+ set_target_properties (ph5example PROPERTIES FOLDER examples)
+endif (H5_HAVE_PARALLEL)
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index 58a2858..5a756c8 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -4,10 +4,10 @@
### T E S T I N G ###
##############################################################################
##############################################################################
- FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
+ file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME EXAMPLES-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -43,23 +43,24 @@
red/prefix_target.h5
u2w/u2w_target.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-clear-objects")
- FOREACH (example ${examples})
- ADD_TEST (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-${example}")
- ENDFOREACH (example ${examples})
+ foreach (example ${examples})
+ add_test (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-${example}")
+ endforeach (example ${examples})
- IF (H5_HAVE_PARALLEL)
- ADD_TEST (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-ph5example")
- ENDIF (H5_HAVE_PARALLEL)
+### Windows pops up a modal permission dialog on this test
+ if (H5_HAVE_PARALLEL AND NOT WIN32)
+ add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-ph5example")
+ endif (H5_HAVE_PARALLEL AND NOT WIN32)
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 9dbe8ca..3fe9e7d 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,28 +1,32 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_F90 C CXX Fortran)
-IF (H5_HAVE_PARALLEL)
- FIND_PACKAGE (MPI)
-ENDIF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
+ INCLUDE (FindMPI)
+ set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES})
+ if (MPI_Fortran_LINK_FLAGS)
+ set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
+ endif (MPI_Fortran_LINK_FLAGS)
+endif (H5_HAVE_PARALLEL)
#-----------------------------------------------------------------------------
# Traverse source subdirectory
#-----------------------------------------------------------------------------
-ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src)
+add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the Fortran Examples
#-----------------------------------------------------------------------------
-IF (HDF5_BUILD_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_EXAMPLES)
+if (HDF5_BUILD_EXAMPLES)
+ add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples)
+endif (HDF5_BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
-IF (BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test)
- IF (MPI_Fortran_FOUND)
- ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar)
- ENDIF (MPI_Fortran_FOUND)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test)
+ if (MPI_Fortran_FOUND)
+ add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar)
+ endif (MPI_Fortran_FOUND)
+endif (BUILD_TESTING)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index f57df63..6f11895 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -13,7 +13,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
h5_cmprss
h5_crtdat
h5_rdwt
@@ -31,69 +31,69 @@ SET (examples
compound
)
-SET (F2003_examples
+set (F2003_examples
rwdset_fortran2003
nested_derived_type
compound_fortran2003
compound_complex_fortran2003
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
+foreach (example ${examples})
+ add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f90_ex_${example} " " " ")
- IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET f90_ex_${example}
+ if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32 AND NOT CYGWIN)
- TARGET_LINK_LIBRARIES (f90_ex_${example}
+ endif (WIN32 AND NOT CYGWIN)
+ target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES FOLDER examples/fortran)
-ENDFOREACH (example ${examples})
+ set_target_properties (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (f90_ex_${example} PROPERTIES FOLDER examples/fortran)
+endforeach (example ${examples})
-IF (HDF5_ENABLE_F2003)
- FOREACH (example ${F2003_examples})
- ADD_EXECUTABLE (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
+if (HDF5_ENABLE_F2003)
+ foreach (example ${F2003_examples})
+ add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f03_ex_${example} " " " ")
- IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET f03_ex_${example}
+ if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET f03_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS
)
- ENDIF (WIN32 AND NOT CYGWIN)
- TARGET_LINK_LIBRARIES (f03_ex_${example}
+ endif (WIN32 AND NOT CYGWIN)
+ target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES FOLDER examples/fortran03)
- ENDFOREACH (example ${F2003_examples})
-ENDIF (HDF5_ENABLE_F2003)
+ set_target_properties (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (f03_ex_${example} PROPERTIES FOLDER examples/fortran03)
+ endforeach (example ${F2003_examples})
+endif (HDF5_ENABLE_F2003)
-IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example " " " ")
- IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET f90_ex_ph5example
+ if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
- ENDIF (WIN32 AND NOT CYGWIN)
- TARGET_LINK_LIBRARIES (f90_ex_ph5example
+ endif (WIN32 AND NOT CYGWIN)
+ target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
${MPI_Fortran_LIBRARIES}
)
- SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
-ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set_target_properties (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
+endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index aebd39b..57aec53 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -6,7 +6,7 @@
##############################################################################
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -24,29 +24,29 @@
sdsf.h5
subset.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "f90_ex-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "f90_ex-clear-objects")
-FOREACH (example ${examples})
- ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "f90_ex_${example}")
-ENDFOREACH (example ${examples})
+foreach (example ${examples})
+ add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "f90_ex_${example}")
+endforeach (example ${examples})
-IF (HDF5_ENABLE_F2003)
- FOREACH (example ${F2003_examples})
- ADD_TEST (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "f03_ex_${example}")
- ENDFOREACH (example ${F2003_examples})
-ENDIF (HDF5_ENABLE_F2003)
+if (HDF5_ENABLE_F2003)
+ foreach (example ${F2003_examples})
+ add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "f03_ex_${example}")
+ endforeach (example ${F2003_examples})
+endif (HDF5_ENABLE_F2003)
-IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
-ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
+endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index b040fd1..204495a 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,21 +1,21 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
-IF (WIN32 AND NOT CYGWIN)
- IF (BUILD_SHARED_LIBS)
- IF (MSVC)
- IF (NOT H5_HAVE_PARALLEL)
- SET (H5_NOPAREXP ";")
- ENDIF (NOT H5_HAVE_PARALLEL)
- IF (NOT HDF5_ENABLE_F2003)
- SET (H5_NOF03EXP ";")
- ENDIF (NOT HDF5_ENABLE_F2003)
- CONFIGURE_FILE (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY)
- ENDIF (MSVC)
- ENDIF (BUILD_SHARED_LIBS)
-ENDIF (WIN32 AND NOT CYGWIN)
+if (WIN32)
+ if (BUILD_SHARED_LIBS)
+ if (MSVC)
+ if (NOT H5_HAVE_PARALLEL)
+ set (H5_NOPAREXP ";")
+ endif (NOT H5_HAVE_PARALLEL)
+ if (NOT HDF5_ENABLE_F2003)
+ set (H5_NOF03EXP ";")
+ endif (NOT HDF5_ENABLE_F2003)
+ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY)
+ endif (MSVC)
+ endif (BUILD_SHARED_LIBS)
+endif (WIN32)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -23,31 +23,31 @@ ENDIF (WIN32 AND NOT CYGWIN)
# H5fortran_detect.f90 used to generate H5fort_type_defines.h
# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90
#-----------------------------------------------------------------------------
-IF (FORTRAN_HAVE_SIZEOF)
- ADD_EXECUTABLE (H5test_FortranHavekind
+if (FORTRAN_HAVE_SIZEOF)
+ add_executable (H5test_FortranHavekind
${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90
)
-ELSE (FORTRAN_HAVE_SIZEOF)
- ADD_EXECUTABLE (H5test_FortranHavekind
+else (FORTRAN_HAVE_SIZEOF)
+ add_executable (H5test_FortranHavekind
${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90
)
-ENDIF (FORTRAN_HAVE_SIZEOF)
-IF (WIN32 AND MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5test_FortranHavekind
+endif (FORTRAN_HAVE_SIZEOF)
+if (WIN32 AND MSVC)
+ if (BUILD_SHARED_LIBS)
+ set_target_properties (H5test_FortranHavekind
PROPERTIES
COMPILE_FLAGS "/MT"
)
- ENDIF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5test_FortranHavekind
+ endif (BUILD_SHARED_LIBS)
+ set_target_properties (H5test_FortranHavekind
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
+endif (WIN32 AND MSVC)
+set_target_properties (H5test_FortranHavekind PROPERTIES LINKER_LANGUAGE Fortran)
-SET (CMD $<TARGET_FILE:H5test_FortranHavekind>)
-ADD_CUSTOM_COMMAND (
+set (CMD $<TARGET_FILE:H5test_FortranHavekind>)
+add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
COMMAND ${CMD}
ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
@@ -55,25 +55,25 @@ ADD_CUSTOM_COMMAND (
DEPENDS H5test_FortranHavekind
)
#-----------------------------------------------------------------------------
-ADD_EXECUTABLE (H5fortran_detect
+add_executable (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
)
-IF (WIN32 AND MSVC)
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5fortran_detect
+if (WIN32 AND MSVC)
+ if (BUILD_SHARED_LIBS)
+ set_target_properties (H5fortran_detect
PROPERTIES
COMPILE_FLAGS "/MT"
)
- ENDIF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (H5fortran_detect
+ endif (BUILD_SHARED_LIBS)
+ set_target_properties (H5fortran_detect
PROPERTIES
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
)
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran)
+endif (WIN32 AND MSVC)
+set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran)
-SET (CMD $<TARGET_FILE:H5fortran_detect>)
-ADD_CUSTOM_COMMAND (
+set (CMD $<TARGET_FILE:H5fortran_detect>)
+add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
COMMAND ${CMD}
ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
@@ -83,12 +83,12 @@ ADD_CUSTOM_COMMAND (
INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
#-----------------------------------------------------------------------------
-ADD_EXECUTABLE (H5match_types
+add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-SET (CMD $<TARGET_FILE:H5match_types>)
-ADD_CUSTOM_COMMAND (
+set (CMD $<TARGET_FILE:H5match_types>)
+add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
COMMAND ${CMD}
@@ -99,7 +99,7 @@ ADD_CUSTOM_COMMAND (
#-----------------------------------------------------------------------------
# f90CStub lib
#-----------------------------------------------------------------------------
-SET (f90CStub_C_SRCS
+set (f90CStub_C_SRCS
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90kit.c
${HDF5_F90_SRC_SOURCE_DIR}/H5_f.c
@@ -118,54 +118,57 @@ SET (f90CStub_C_SRCS
${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c
)
-IF (H5_HAVE_PARALLEL)
- SET (f90CStub_C_SRCS
+if (H5_HAVE_PARALLEL)
+ set (f90CStub_C_SRCS
${f90CStub_C_SRCS}
${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c
)
-ENDIF (H5_HAVE_PARALLEL)
+endif (H5_HAVE_PARALLEL)
-SET_SOURCE_FILES_PROPERTIES (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C)
+set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C)
-SET (f90CStub_C_HDRS
+set (f90CStub_C_HDRS
# generated files
${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
)
-ADD_LIBRARY (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
+add_library (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
+target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran)
-SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
+set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ LINKER_LANGUAGE C
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Fortran 2003 standard
#-----------------------------------------------------------------------------
-IF (HDF5_ENABLE_F2003)
+if (HDF5_ENABLE_F2003)
# default real is 4 bytes, so include double signatures
- SET (F_STATUS "_F03")
-ELSE (HDF5_ENABLE_F2003)
+ set (F_STATUS "_F03")
+else (HDF5_ENABLE_F2003)
# default real is 8 bytes, so exclude double signatures
- SET (F_STATUS "_F90")
-ENDIF (HDF5_ENABLE_F2003)
+ set (F_STATUS "_F90")
+endif (HDF5_ENABLE_F2003)
#-----------------------------------------------------------------------------
# Fortran Real Size
#-----------------------------------------------------------------------------
-IF (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+if (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
# default real is 4 bytes, so include double signatures
- SET (F_DBLE "Include")
-ELSE (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+ set (F_DBLE "Include")
+else (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
# default real is 8 bytes, so exclude double signatures
- SET (F_DBLE "Exclude")
-ENDIF (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+ set (F_DBLE "Exclude")
+endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
-SET (f90_F_SRCS
+set (f90_F_SRCS
# generated files
${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
@@ -201,53 +204,56 @@ SET (f90_F_SRCS
#-----------------------------------------------------------------------------
# Add H5FDMPIO if parallel
#-----------------------------------------------------------------------------
-IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- SET (f90_F_SRCS
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set (f90_F_SRCS
${f90_F_SRCS}
${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90
)
-ELSE (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- SET (f90_F_SRCS
+else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ set (f90_F_SRCS
${f90_F_SRCS}
${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90
)
-ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
#-----------------------------------------------------------------------------
# Add Main fortran library
#-----------------------------------------------------------------------------
-ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
-SET (SHARED_LINK_FLAGS " ")
-IF (WIN32 AND NOT CYGWIN)
- IF (BUILD_SHARED_LIBS)
- SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
+add_library (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
+set (SHARED_LINK_FLAGS " ")
+if (WIN32)
+ if (BUILD_SHARED_LIBS)
+ set_property (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
)
- IF (MSVC)
- SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
- ENDIF (MSVC)
- ENDIF (BUILD_SHARED_LIBS)
- SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
+ if (MSVC)
+ set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
+ endif (MSVC)
+ endif (BUILD_SHARED_LIBS)
+ set_property (TARGET ${HDF5_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
-TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
-IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES})
-ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
+set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES})
+endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran)
+set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
@@ -260,36 +266,86 @@ INSTALL (
fortheaders
)
-IF (WIN32 AND NOT CYGWIN)
- INSTALL (
- DIRECTORY
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
+if (WIN32)
+ install (
+ FILES
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5fortran_types.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5test_kind_sizeof_mod.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/hdf5.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5g.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5i.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5s.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5z.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5a_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5d_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5e_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5f_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5l_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5o_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5p_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5r_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5t_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5_dble_interface.mod
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
-ELSE (WIN32 AND NOT CYGWIN)
- INSTALL (
- DIRECTORY
- ${CMAKE_Fortran_MODULE_DIRECTORY}/
+else (WIN32)
+ install (
+ FILES
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5fortran_types.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/hdf5.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5f.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5g.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5i.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5s.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5z.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5a_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5d_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5e_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5l_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5o_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5p_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5r_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5t_provisional.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5_dble_interface.mod
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_F90_C_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -299,4 +355,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT fortlibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT fortlibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 643ec94..42614ba 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -9,42 +9,48 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
-ADD_LIBRARY (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c)
+add_library (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_F90_C_TEST_LIB_TARGET}
+target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran)
+set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
+ FOLDER libraries/test/fortran
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
-ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
-SET (SHARED_LINK_FLAGS " ")
-IF (WIN32 AND NOT CYGWIN)
- IF (BUILD_SHARED_LIBS)
- SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL)
- IF (MSVC)
- SET (SHARED_LINK_FLAGS "/DLL")
- ENDIF (MSVC)
- ENDIF (BUILD_SHARED_LIBS)
- SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS)
-ENDIF (WIN32 AND NOT CYGWIN)
+add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
+set (SHARED_LINK_FLAGS " ")
+if (WIN32 AND NOT CYGWIN)
+ if (BUILD_SHARED_LIBS)
+ set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_HDF5_DLL)
+ if (MSVC)
+ set (SHARED_LINK_FLAGS "/DLL")
+ endif (MSVC)
+ endif (BUILD_SHARED_LIBS)
+ set_property (TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS HDF5F90_WINDOWS)
+endif (WIN32 AND NOT CYGWIN)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
-TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET}
+set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test/fortran)
+set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
+ FOLDER libraries/test/fortran
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------
#-- Adding test for testhdf5_fortran
-ADD_EXECUTABLE (testhdf5_fortran
+add_executable (testhdf5_fortran
fortranlib_test.f90
tH5A.f90
tH5D.f90
@@ -62,19 +68,19 @@ ADD_EXECUTABLE (testhdf5_fortran
)
TARGET_NAMING (testhdf5_fortran ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran " " " ")
-TARGET_LINK_LIBRARIES (testhdf5_fortran
+target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran "ws2_32.lib")
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES FOLDER test/fortran)
+if (WIN32 AND MSVC)
+ target_link_libraries (testhdf5_fortran "ws2_32.lib")
+endif (WIN32 AND MSVC)
+set_target_properties (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (testhdf5_fortran PROPERTIES FOLDER test/fortran)
#-- Adding test for testhdf5_fortran_1_8
-ADD_EXECUTABLE (testhdf5_fortran_1_8
+add_executable (testhdf5_fortran_1_8
fortranlib_test_1_8.f90
tH5F.f90
tH5O.f90
@@ -83,20 +89,20 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8
)
TARGET_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 " " " ")
-TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
+target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 "ws2_32.lib")
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
+if (WIN32 AND MSVC)
+ target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib")
+endif (WIN32 AND MSVC)
+set_target_properties (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
#-- Adding test for fortranlib_test_F03
-IF (HDF5_ENABLE_F2003)
- ADD_EXECUTABLE (fortranlib_test_F03
+if (HDF5_ENABLE_F2003)
+ add_executable (fortranlib_test_F03
fortranlib_test_F03.f90
tH5F.f90
tH5E_F03.f90
@@ -108,46 +114,46 @@ IF (HDF5_ENABLE_F2003)
)
TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 " " " ")
- TARGET_LINK_LIBRARIES (fortranlib_test_F03
+ target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (fortranlib_test_F03 "ws2_32.lib")
- ENDIF (WIN32 AND MSVC)
- SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES FOLDER test/fortran)
-ENDIF (HDF5_ENABLE_F2003)
+ if (WIN32 AND MSVC)
+ target_link_libraries (fortranlib_test_F03 "ws2_32.lib")
+ endif (WIN32 AND MSVC)
+ set_target_properties (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (fortranlib_test_F03 PROPERTIES FOLDER test/fortran)
+endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
-ADD_EXECUTABLE (fflush1 fflush1.f90)
+add_executable (fflush1 fflush1.f90)
TARGET_NAMING (fflush1 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (fflush1 " " " ")
-TARGET_LINK_LIBRARIES (fflush1
+target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (fflush1 "ws2_32.lib")
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (fflush1 PROPERTIES FOLDER test/fortran)
+if (WIN32 AND MSVC)
+ target_link_libraries (fflush1 "ws2_32.lib")
+endif (WIN32 AND MSVC)
+set_target_properties (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (fflush1 PROPERTIES FOLDER test/fortran)
#-- Adding test for fflush2
-ADD_EXECUTABLE (fflush2 fflush2.f90)
+add_executable (fflush2 fflush2.f90)
TARGET_NAMING (fflush2 ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (fflush2 " " " ")
-TARGET_LINK_LIBRARIES (fflush2
+target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (fflush2 "ws2_32.lib")
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (fflush2 PROPERTIES FOLDER test/fortran)
+if (WIN32 AND MSVC)
+ target_link_libraries (fflush2 "ws2_32.lib")
+endif (WIN32 AND MSVC)
+set_target_properties (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (fflush2 PROPERTIES FOLDER test/fortran)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index d381b62..5b674db 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -5,22 +5,22 @@
##############################################################################
##############################################################################
-ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
+add_test (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for testhdf5_fortran_1_8
-ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
+add_test (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for fortranlib_test_F03
-IF (HDF5_ENABLE_F2003)
- ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
+if (HDF5_ENABLE_F2003)
+ add_test (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-ENDIF (HDF5_ENABLE_F2003)
+endif (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
-ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
+add_test (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
#-- Adding test for fflush2
-ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
+add_test (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index d1aba51..3361220 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -11,23 +11,23 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
#-----------------------------------------------------------------------------
#-- Adding test for parallel_test
-ADD_EXECUTABLE (parallel_test
+add_executable (parallel_test
ptest.f90
hyper.f90
mdset.f90
)
TARGET_NAMING (parallel_test ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (parallel_test " " " ")
-TARGET_LINK_LIBRARIES (parallel_test
+target_link_libraries (parallel_test
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
${MPI_Fortran_LIBRARIES}
)
-IF (WIN32 AND MSVC)
- TARGET_LINK_LIBRARIES (parallel_test "ws2_32.lib")
-ENDIF (WIN32 AND MSVC)
-SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (parallel_test PROPERTIES FOLDER test/fortran)
+if (WIN32 AND MSVC)
+ target_link_libraries (parallel_test "ws2_32.lib")
+endif (WIN32 AND MSVC)
+set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (parallel_test PROPERTIES FOLDER test/fortran)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake
index 2cd7ed0..f418e1a 100644
--- a/fortran/testpar/CMakeTests.cmake
+++ b/fortran/testpar/CMakeTests.cmake
@@ -4,4 +4,4 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
+add_test (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index 5c9403d..22c0770 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,44 +1,44 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Shared Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (HL_BUILT_AS_DYNAMIC_LIB 1)
-ELSE (BUILD_SHARED_LIBS)
- SET (HL_BUILT_AS_STATIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (HL_BUILT_AS_DYNAMIC_LIB 1)
+else (BUILD_SHARED_LIBS)
+ set (HL_BUILT_AS_STATIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src )
-ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src)
+add_subdirectory (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src)
#-- Build the High level Tools
-IF (HDF5_BUILD_TOOLS)
- ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools)
-ENDIF (HDF5_BUILD_TOOLS)
+if (HDF5_BUILD_TOOLS)
+ add_subdirectory (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools)
+endif (HDF5_BUILD_TOOLS)
#-- Add High Level Examples
-IF (HDF5_BUILD_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_EXAMPLES)
+if (HDF5_BUILD_EXAMPLES)
+ add_subdirectory (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples)
+endif (HDF5_BUILD_EXAMPLES)
#-- Build the Unit testing if requested
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- IF (BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test)
- ENDIF (BUILD_TESTING)
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-IF (HDF5_BUILD_CPP_LIB)
- ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++)
-ENDIF (HDF5_BUILD_CPP_LIB)
+if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (BUILD_TESTING)
+ add_subdirectory (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test)
+ endif (BUILD_TESTING)
+endif (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+if (HDF5_BUILD_CPP_LIB)
+ add_subdirectory (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++)
+endif (HDF5_BUILD_CPP_LIB)
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt
index 8d68dd0..9f0aa7e 100644
--- a/hl/c++/CMakeLists.txt
+++ b/hl/c++/CMakeLists.txt
@@ -1,22 +1,22 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_CPP)
#-----------------------------------------------------------------------------
# Main HL lib is in /src
#-----------------------------------------------------------------------------
-ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src)
+add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src)
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
-IF (HDF5_BUILD_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_EXAMPLES)
+if (HDF5_BUILD_EXAMPLES)
+ add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples)
+endif (HDF5_BUILD_EXAMPLES)
# --------------------------------------------------------------------
# Add in the unit tests for the packet table c++ wrapper
# --------------------------------------------------------------------
-IF (BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test)
+endif (BUILD_TESTING)
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index f762839..8f9b43f 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_CPP_EXAMPLES)
#-----------------------------------------------------------------------------
@@ -10,17 +10,17 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
-ADD_EXECUTABLE (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
+add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
TARGET_NAMING (ptExampleFL ${LIB_TYPE})
TARGET_C_PROPERTIES (ptExampleFL " " " ")
-TARGET_LINK_LIBRARIES (
+target_link_libraries (
ptExampleFL
${HDF5_HL_CPP_LIB_TARGET}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-SET_TARGET_PROPERTIES (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
+set_target_properties (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake
index c73ceeb..dc279e5 100644
--- a/hl/c++/examples/CMakeTests.cmake
+++ b/hl/c++/examples/CMakeTests.cmake
@@ -5,12 +5,12 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME cpp_hl_ex_ptExampleFL-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
PTcppexampleFL.h5
)
-ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
-SET_TESTS_PROPERTIES (cpp_hl_ex_ptExampleFL PROPERTIES DEPENDS cpp_hl_ex_ptExampleFL-clear-objects)
+add_test (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
+set_tests_properties (cpp_hl_ex_ptExampleFL PROPERTIES DEPENDS cpp_hl_ex_ptExampleFL-clear-objects)
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 34e1a7a..9776f06 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_CPP_SRC)
#-----------------------------------------------------------------------------
@@ -7,24 +7,27 @@ PROJECT (HDF5_HL_CPP_SRC)
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR})
-SET (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
-SET (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
+set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
+set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
-ADD_LIBRARY (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS})
+add_library (${HDF5_HL_CPP_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_CPP_SRCS})
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (
+target_link_libraries (
${HDF5_HL_CPP_LIB_TARGET}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
+set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${HDF5_HL_CPP_HDRS}
DESTINATION
@@ -36,12 +39,12 @@ INSTALL (
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlcpplibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_HL_CPP_LIB_TARGET}
EXPORT
@@ -50,4 +53,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlcpplibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlcpplibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 46229ba..4a7523c 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_CPP_TEST)
#-----------------------------------------------------------------------------
@@ -15,10 +15,10 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
-ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
+add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
TARGET_C_PROPERTIES (hl_ptableTest " " " ")
TARGET_NAMING (hl_ptableTest ${LIB_TYPE})
-TARGET_LINK_LIBRARIES (
+target_link_libraries (
hl_ptableTest
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
@@ -26,6 +26,6 @@ TARGET_LINK_LIBRARIES (
${HDF5_HL_LIB_TARGET}
${HDF5_HL_CPP_LIB_TARGET}
)
-SET_TARGET_PROPERTIES (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
+set_target_properties (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
index cb9454b..5386624 100644
--- a/hl/c++/test/CMakeTests.cmake
+++ b/hl/c++/test/CMakeTests.cmake
@@ -5,4 +5,4 @@
##############################################################################
##############################################################################
- ADD_TEST (NAME hl_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
+ add_test (NAME hl_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index a9c5258..7847dbe 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_EXAMPLES )
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
ex_lite1
ex_lite2 #ex_lite2 PROPERTIES DEPENDS ex_lite1)
ex_lite3
@@ -26,16 +26,16 @@ SET (examples
ex_ds1
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
+foreach (example ${examples})
+ add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
TARGET_NAMING (hl_ex_${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (hl_ex_${example} PROPERTIES FOLDER examples/hl)
-ENDFOREACH (example ${examples})
+ target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
+endforeach (example ${examples})
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 0f9ca11..bc51183 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -5,24 +5,24 @@
##############################################################################
##############################################################################
-SET (HDF5_TEST_FILES
+set (HDF5_TEST_FILES
image24pixel.txt
image8.txt
)
-FOREACH (h5_file ${HDF5_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+foreach (h5_file ${HDF5_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET hl_ex_ex_ds1
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
)
-ENDFOREACH (h5_file ${HDF5_TEST_FILES})
+endforeach (h5_file ${HDF5_TEST_FILES})
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME hl_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -46,15 +46,15 @@ ENDFOREACH (h5_file ${HDF5_TEST_FILES})
ex_table_12.h5
ex_ds1.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "hl_ex-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (hl_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "hl_ex-clear-objects")
-FOREACH (example ${examples})
- ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "hl_ex_${example}")
-ENDFOREACH (example ${examples})
+foreach (example ${examples})
+ add_test (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (hl_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "hl_ex_${example}")
+endforeach (example ${examples})
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index 0da0825..c26d94c 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,21 +1,21 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_F90 C CXX Fortran)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src)
+add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src)
#-----------------------------------------------------------------------------
# Build the HL Fortran Examples
#-----------------------------------------------------------------------------
-IF (HDF5_BUILD_FORTRAN_EXAMPLES)
- ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples)
-ENDIF (HDF5_BUILD_FORTRAN_EXAMPLES)
+if (HDF5_BUILD_FORTRAN_EXAMPLES)
+ add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples)
+endif (HDF5_BUILD_FORTRAN_EXAMPLES)
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
-IF (BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test)
+endif (BUILD_TESTING)
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 0f663c7..12467b8 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -10,27 +10,27 @@ INCLUDE_DIRECTORIES (
${HDF5_F90_SRC_DIR}/src
)
-SET (examples
+set (examples
exlite
ex_ds1
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
+foreach (example ${examples})
+ add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (hl_f90_ex_${example} ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} " " " ")
- TARGET_LINK_LIBRARIES (hl_f90_ex_${example}
+ target_link_libraries (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
- SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
+ set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
+ set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
-ENDFOREACH (example ${examples})
+endforeach (example ${examples})
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 7e6c348..1784041 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -5,6 +5,6 @@
##############################################################################
##############################################################################
-FOREACH (example ${examples})
- ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
-ENDFOREACH (example ${examples})
+foreach (example ${examples})
+ add_test (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
+endforeach (example ${examples})
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 0a8bd35..a95873b 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -14,94 +14,106 @@ INCLUDE_DIRECTORIES (
#-----------------------------------------------------------------------------
# hl_f90CStub lib
#-----------------------------------------------------------------------------
-SET (HDF5_HL_F90_C_SRCS
+set (HDF5_HL_F90_C_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMfc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.c
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBfc.c
)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
+set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
-SET (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
+set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
-ADD_LIBRARY (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
+add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
+target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
+set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE C
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
-SET (HDF5_HL_F90_F_SRCS
+set (HDF5_HL_F90_F_SRCS
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90
)
-ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
-SET (SHARED_LINK_FLAGS " ")
-IF (BUILD_SHARED_LIBS)
- IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
+add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
+set (SHARED_LINK_FLAGS " ")
+if (BUILD_SHARED_LIBS)
+ if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
BUILD_HDF5_DLL
)
- IF (MSVC)
- SET (SHARED_LINK_FLAGS "/DLL")
- ENDIF (MSVC)
- ENDIF (WIN32 AND NOT CYGWIN)
-ENDIF (BUILD_SHARED_LIBS)
-IF (WIN32 AND NOT CYGWIN)
- SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET}
+ if (MSVC)
+ set (SHARED_LINK_FLAGS "/DLL")
+ endif (MSVC)
+ endif (WIN32 AND NOT CYGWIN)
+endif (BUILD_SHARED_LIBS)
+if (WIN32 AND NOT CYGWIN)
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
HDF5F90_WINDOWS
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32 AND NOT CYGWIN)
TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} " " ${SHARED_LINK_FLAGS})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
-TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
+set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
+target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES FOLDER libraries/hl/fortran)
+set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-IF (WIN32 AND NOT CYGWIN)
- INSTALL (
- DIRECTORY
- ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/
+if (WIN32 AND NOT CYGWIN)
+ install (
+ FILES
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5ds.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5tb.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5lt.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/h5im.mod
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
-ELSE (WIN32 AND NOT CYGWIN)
- INSTALL (
- DIRECTORY
- ${CMAKE_Fortran_MODULE_DIRECTORY}/
+else (WIN32 AND NOT CYGWIN)
+ install (
+ FILES
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5ds.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5tb.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5lt.mod
+ ${CMAKE_Fortran_MODULE_DIRECTORY}/h5im.mod
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
fortheaders
)
-ENDIF (WIN32 AND NOT CYGWIN)
+endif (WIN32 AND NOT CYGWIN)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_HL_F90_C_LIB_TARGET}
${HDF5_HL_F90_LIB_TARGET}
@@ -111,4 +123,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hlfortlibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 2084162..120d6a5 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -7,35 +7,35 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-- Adding test for hl_f90_tstds
-ADD_EXECUTABLE (hl_f90_tstds tstds.f90)
+add_executable (hl_f90_tstds tstds.f90)
TARGET_NAMING (hl_f90_tstds ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstlite
-ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
+add_executable (hl_f90_tstlite tstlite.f90)
TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tstimage
-ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90)
+add_executable (hl_f90_tstimage tstimage.f90)
TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
#-- Adding test for hl_f90_tsttable
-ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90)
+add_executable (hl_f90_tsttable tsttable.f90)
TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE})
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable " " " ")
-TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
-SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
-SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
+target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
+set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 81253bd..94bb385 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -6,7 +6,7 @@
##############################################################################
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME hl_fortran_test-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -20,10 +20,10 @@ ADD_TEST (
tstds.h5
)
-ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
+add_test (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
-ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
+add_test (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
-ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
+add_test (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
-ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
+add_test (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 9640c02..e3a72e4 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,19 +1,17 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_SRC)
#-----------------------------------------------------------------------------
# Shared Libs
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
- SET (HL_BUILT_AS_DYNAMIC_LIB 1)
-ENDIF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
+ set (HL_BUILT_AS_DYNAMIC_LIB 1)
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
-
-SET (HL_SRCS
+set (HL_SRCS
${HDF5_HL_SRC_SOURCE_DIR}/H5DO.c
${HDF5_HL_SRC_SOURCE_DIR}/H5DS.c
${HDF5_HL_SRC_SOURCE_DIR}/H5IM.c
@@ -24,7 +22,7 @@ SET (HL_SRCS
${HDF5_HL_SRC_SOURCE_DIR}/H5TB.c
)
-SET (HL_HEADERS
+set (HL_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/H5DOpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5DSpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5IMpublic.h
@@ -35,17 +33,20 @@ SET (HL_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h
)
-ADD_LIBRARY (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} ${HL_SRCS} ${HL_HEADERS})
+add_library (${HDF5_HL_LIB_TARGET} ${LIB_TYPE} ${HL_SRCS} ${HL_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
+target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_HL_LIB_TARGET} PROPERTIES FOLDER libraries/hl)
+set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${HL_HEADERS}
DESTINATION
@@ -57,12 +58,12 @@ INSTALL (
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_HL_LIB_TARGET}
EXPORT
@@ -71,4 +72,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hllibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT hllibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index f969dbf..545210b 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
@@ -11,8 +11,8 @@ PROJECT (HDF5_HL_TEST)
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
@@ -21,15 +21,15 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_EXE hl_name)
- ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c)
+ add_executable (hl_${hl_name} ${hl_name}.c)
TARGET_NAMING (hl_${hl_name} ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_${hl_name} " " " ")
- TARGET_LINK_LIBRARIES (hl_${hl_name}
+ target_link_libraries (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl)
+ set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
ENDMACRO (HL_ADD_EXE)
HL_ADD_EXE (test_ds)
@@ -43,16 +43,16 @@ HL_ADD_EXE (test_table)
# This executable is used to generate test files for the test_ds test.
# It should only be run during development when new test files are needed
# --------------------------------------------------------------------
-IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (hl_gen_test_ds gen_test_ds.c)
+if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (hl_gen_test_ds gen_test_ds.c)
TARGET_NAMING (hl_gen_test_ds ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_gen_test_ds " " " ")
- TARGET_LINK_LIBRARIES (hl_gen_test_ds
+ target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
- SET_TARGET_PROPERTIES (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
-ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
+endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index 5d42b57..fda388a 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -9,29 +9,29 @@
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_TEST hl_name files)
- ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ add_test (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
# --------------------------------------------------------------------
#-- Copy the necessary files.
# --------------------------------------------------------------------
- FOREACH (h5_file ${files})
- SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${files})
+ set (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying HL Test File ${h5_file} to ${dest}")
+ add_custom_command (
TARGET hl_${hl_name}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HL_REFERENCE_TEST_FILES})
ENDMACRO (HL_ADD_TEST)
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME hl_test-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -60,14 +60,14 @@ ADD_TEST (
test_packet_table.h5
test_table.h5
)
-IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
-ENDIF (NOT "${last_test}" STREQUAL "")
-SET (last_test "hl_test-clear-objects")
+if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
+endif (NOT "${last_test}" STREQUAL "")
+set (last_test "hl_test-clear-objects")
-HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
-HL_ADD_TEST (test_dset_opt "")
-HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
-HL_ADD_TEST (test_lite "dtype_file.txt")
-HL_ADD_TEST (test_packet "")
-HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
+HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
+HL_add_test (test_dset_opt "")
+HL_add_test (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
+HL_add_test (test_lite "dtype_file.txt")
+HL_add_test (test_packet "")
+HL_add_test (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 256ff89..a41aecc 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_HL_TOOLS)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (GIF2H5_SRCS
+set (GIF2H5_SRCS
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif.h
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/decompress.c
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/gif2hdf.c
@@ -17,46 +17,46 @@ SET (GIF2H5_SRCS
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5)
-ADD_EXECUTABLE (gif2h5 ${GIF2H5_SRCS})
+add_executable (gif2h5 ${GIF2H5_SRCS})
TARGET_NAMING (gif2h5 ${LIB_TYPE})
TARGET_C_PROPERTIES (gif2h5 " " " ")
-TARGET_LINK_LIBRARIES (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (gif2h5 PROPERTIES FOLDER tools/hl)
+target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
#-- Add h52gif program
-SET (hdf2gif_SRCS
+set (hdf2gif_SRCS
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdf2gif.c
${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/hdfgifwr.c
)
-ADD_EXECUTABLE (h52gif ${hdf2gif_SRCS})
+add_executable (h52gif ${hdf2gif_SRCS})
TARGET_NAMING (h52gif ${LIB_TYPE})
TARGET_C_PROPERTIES (h52gif " " " ")
-TARGET_LINK_LIBRARIES (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h52gif PROPERTIES FOLDER tools/hl)
+target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# This executable can generate the actual test files - Currently not
# used in the CMake Build system as we rely on the test files that are
# shipped with HDF5 source archives
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_h52gifgentest " " " ")
- TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
+ target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
-# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+# add_test (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
TARGETS
gif2h5
h52gif
diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/CMakeTests.cmake
index 9f987fd..a340c2d 100644
--- a/hl/tools/CMakeTests.cmake
+++ b/hl/tools/CMakeTests.cmake
@@ -6,20 +6,20 @@
##############################################################################
# Make testfiles dir under build dir
-FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
#
# copy test files from source to build dir
#
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET gif2h5
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif
)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET h52gif
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -27,7 +27,7 @@ ADD_CUSTOM_COMMAND (
)
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME HL_TOOLS-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -35,6 +35,6 @@ ADD_TEST (
image1.h5
)
-ADD_TEST (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
+add_test (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
-ADD_TEST (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
+add_test (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt
index 0a6fa10..df7526e 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_PERFORM )
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Setup include Directories
@@ -16,125 +16,125 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
# Add the executables
# --------------------------------------------------------------------
#-- Adding test for h5perf_serial
-SET (h5perf_serial_SRCS
+set (h5perf_serial_SRCS
${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
)
-ADD_EXECUTABLE (h5perf_serial ${h5perf_serial_SRCS})
+add_executable (h5perf_serial ${h5perf_serial_SRCS})
TARGET_NAMING (h5perf_serial ${LIB_TYPE})
TARGET_C_PROPERTIES (h5perf_serial " " " ")
-TARGET_LINK_LIBRARIES (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5perf_serial PROPERTIES FOLDER perform)
+target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
-IF (HDF5_BUILD_PERFORM_STANDALONE)
+if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf_serial_alone
- SET (h5perf_serial_alone_SRCS
+ set (h5perf_serial_alone_SRCS
${HDF5_PERFORM_SOURCE_DIR}/sio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c
)
- ADD_EXECUTABLE (h5perf_serial_alone ${h5perf_serial_alone_SRCS})
- SET_PROPERTY (TARGET h5perf_serial_alone
+ add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS})
+ set_property (TARGET h5perf_serial_alone
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
)
TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE})
TARGET_C_PROPERTIES (h5perf_serial_alone " " " ")
- TARGET_LINK_LIBRARIES (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5perf_serial_alone PROPERTIES FOLDER perform)
-ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+ target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
+endif (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for chunk
-SET (chunk_SRCS
+set (chunk_SRCS
${HDF5_PERFORM_SOURCE_DIR}/chunk.c
)
ADD_EXECUTABLE(chunk ${chunk_SRCS})
TARGET_NAMING (chunk ${LIB_TYPE})
TARGET_C_PROPERTIES (chunk " " " ")
TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (chunk PROPERTIES FOLDER perform)
+set_target_properties (chunk PROPERTIES FOLDER perform)
#-- Adding test for iopipe
-SET (iopipe_SRCS
+set (iopipe_SRCS
${HDF5_PERFORM_SOURCE_DIR}/iopipe.c
)
-ADD_EXECUTABLE (iopipe ${iopipe_SRCS})
+add_executable (iopipe ${iopipe_SRCS})
TARGET_NAMING (iopipe ${LIB_TYPE})
TARGET_C_PROPERTIES (iopipe " " " ")
-TARGET_LINK_LIBRARIES (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (iopipe PROPERTIES FOLDER perform)
+target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (iopipe PROPERTIES FOLDER perform)
#-- Adding test for overhead
-SET (overhead_SRCS
+set (overhead_SRCS
${HDF5_PERFORM_SOURCE_DIR}/overhead.c
)
-ADD_EXECUTABLE (overhead ${overhead_SRCS})
+add_executable (overhead ${overhead_SRCS})
TARGET_NAMING (overhead ${LIB_TYPE})
TARGET_C_PROPERTIES (overhead " " " ")
-TARGET_LINK_LIBRARIES (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (overhead PROPERTIES FOLDER perform)
+target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (overhead PROPERTIES FOLDER perform)
#-- Adding test for perf_meta
-SET (perf_meta_SRCS
+set (perf_meta_SRCS
${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c
)
-ADD_EXECUTABLE (perf_meta ${perf_meta_SRCS})
+add_executable (perf_meta ${perf_meta_SRCS})
TARGET_NAMING (perf_meta ${LIB_TYPE})
TARGET_C_PROPERTIES (perf_meta " " " ")
-TARGET_LINK_LIBRARIES (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (perf_meta PROPERTIES FOLDER perform)
+target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (perf_meta PROPERTIES FOLDER perform)
#-- Adding test for zip_perf
-SET (zip_perf_SRCS
+set (zip_perf_SRCS
${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c
)
-ADD_EXECUTABLE (zip_perf ${zip_perf_SRCS})
+add_executable (zip_perf ${zip_perf_SRCS})
TARGET_NAMING (zip_perf ${LIB_TYPE})
TARGET_C_PROPERTIES (zip_perf " " " ")
-TARGET_LINK_LIBRARIES (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (zip_perf PROPERTIES FOLDER perform)
+target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (zip_perf PROPERTIES FOLDER perform)
-IF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
#-- Adding test for h5perf
- SET (h5perf_SRCS
+ set (h5perf_SRCS
${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
)
- ADD_EXECUTABLE (h5perf ${h5perf_SRCS})
+ add_executable (h5perf ${h5perf_SRCS})
TARGET_NAMING (h5perf ${LIB_TYPE})
TARGET_C_PROPERTIES (h5perf " " " ")
- TARGET_LINK_LIBRARIES (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5perf PROPERTIES FOLDER perform)
+ target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (h5perf PROPERTIES FOLDER perform)
- IF (HDF5_BUILD_PERFORM_STANDALONE)
+ if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
- SET (h5perf_alone_SRCS
+ set (h5perf_alone_SRCS
${HDF5_PERFORM_SOURCE_DIR}/pio_timer.c
${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c
${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c
)
- ADD_EXECUTABLE (h5perf_alone ${h5perf_alone_SRCS})
- SET_PROPERTY (TARGET h5perf_alone
+ add_executable (h5perf_alone ${h5perf_alone_SRCS})
+ set_property (TARGET h5perf_alone
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
)
TARGET_NAMING (h5perf_alone ${LIB_TYPE})
TARGET_C_PROPERTIES (h5perf_alone " " " ")
- TARGET_LINK_LIBRARIES (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5perf_alone PROPERTIES FOLDER perform)
- ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+ target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (h5perf_alone PROPERTIES FOLDER perform)
+ endif (HDF5_BUILD_PERFORM_STANDALONE)
- IF (HDF5_BUILD_PARALLEL_ALL)
+ if (HDF5_BUILD_PARALLEL_ALL)
#-- Adding test for benchpar
- SET (benchpar_SRCS
+ set (benchpar_SRCS
${HDF5_PERFORM_SOURCE_DIR}/benchpar.c
)
- ADD_EXECUTABLE (benchpar ${benchpar_SRCS})
+ add_executable (benchpar ${benchpar_SRCS})
TARGET_NAMING (benchpar ${LIB_TYPE})
TARGET_C_PROPERTIES (benchpar " " " ")
- TARGET_LINK_LIBRARIES (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (benchpar PROPERTIES FOLDER perform)
- ENDIF (HDF5_BUILD_PARALLEL_ALL)
-ENDIF (H5_HAVE_PARALLEL)
+ target_link_libraries (benchpar ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (benchpar PROPERTIES FOLDER perform)
+ endif (HDF5_BUILD_PARALLEL_ALL)
+endif (H5_HAVE_PARALLEL)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/perform/CMakeTests.cmake b/perform/CMakeTests.cmake
index fab6ab2..f8a5846 100644
--- a/perform/CMakeTests.cmake
+++ b/perform/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET zip_perf
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -17,7 +17,7 @@ ADD_CUSTOM_COMMAND (
#-----------------------------------------------------------------------------
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME PERFORM_h5perform-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -31,31 +31,31 @@ ADD_TEST (
x-gnuplot
)
-ADD_TEST (NAME PERFORM_h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
+add_test (NAME PERFORM_h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
-IF (HDF5_BUILD_PERFORM_STANDALONE)
- ADD_TEST (NAME PERFORM_h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>)
-ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+if (HDF5_BUILD_PERFORM_STANDALONE)
+ add_test (NAME PERFORM_h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>)
+endif (HDF5_BUILD_PERFORM_STANDALONE)
-ADD_TEST (NAME PERFORM_chunk COMMAND $<TARGET_FILE:chunk>)
+add_test (NAME PERFORM_chunk COMMAND $<TARGET_FILE:chunk>)
-ADD_TEST (NAME PERFORM_iopipe COMMAND $<TARGET_FILE:iopipe>)
+add_test (NAME PERFORM_iopipe COMMAND $<TARGET_FILE:iopipe>)
-ADD_TEST (NAME PERFORM_overhead COMMAND $<TARGET_FILE:overhead>)
+add_test (NAME PERFORM_overhead COMMAND $<TARGET_FILE:overhead>)
-ADD_TEST (NAME PERFORM_perf_meta COMMAND $<TARGET_FILE:perf_meta>)
+add_test (NAME PERFORM_perf_meta COMMAND $<TARGET_FILE:perf_meta>)
-ADD_TEST (NAME PERFORM_zip_perf_help COMMAND $<TARGET_FILE:zip_perf> "-h")
-ADD_TEST (NAME PERFORM_zip_perf COMMAND $<TARGET_FILE:zip_perf> tfilters.h5)
+add_test (NAME PERFORM_zip_perf_help COMMAND $<TARGET_FILE:zip_perf> "-h")
+add_test (NAME PERFORM_zip_perf COMMAND $<TARGET_FILE:zip_perf> tfilters.h5)
-IF (H5_HAVE_PARALLEL)
- ADD_TEST (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)
+if (H5_HAVE_PARALLEL)
+ add_test (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)
- IF (HDF5_BUILD_PERFORM_STANDALONE)
- ADD_TEST (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
- ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+ if (HDF5_BUILD_PERFORM_STANDALONE)
+ add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
+ endif (HDF5_BUILD_PERFORM_STANDALONE)
- IF (HDF5_BUILD_PARALLEL_ALL)
- ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
- ENDIF (HDF5_BUILD_PARALLEL_ALL)
-ENDIF (H5_HAVE_PARALLEL)
+ if (HDF5_BUILD_PARALLEL_ALL)
+ add_test (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
+ endif (HDF5_BUILD_PARALLEL_ALL)
+endif (H5_HAVE_PARALLEL)
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 8f5ccdf..b6c79c9 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -89,8 +89,9 @@ Notes: This short set of instructions is written for users who want to
c:\MyHDFstuff\hdf5\build
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 ..
- The two dots on the end of the command is the location of the source.
+ cmake -G "Visual Studio 10" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
+ The two dots on the end of the command is the location of the source.
+ The CMAKE_BUILD_TYPE must match the configuration type.
5. Build the C library, tools and tests with this command:
cmake --build . --config Release
@@ -118,8 +119,9 @@ Notes: This short set of instructions is written for users who want to
~/MyHDFstuff/hdf5/build
4. Configure the C library, tools and tests with this command:
- cmake -G "Unix Makefiles" -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
+ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..
The two dots on the end of the command is the location of the source.
+ The CMAKE_BUILD_TYPE must match the configuration type.
5. Build the C library, tools and tests with this command:
cmake --build . --config Release
@@ -141,7 +143,7 @@ III. Preconditions
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.10.
+ web site. The HDF5 1.8.x product requires a minimum CMake version 2.8.12.
2. If you plan to use Zlib or Szip:
A. Download the binary packages and install them in a central location.
@@ -152,7 +154,8 @@ III. Preconditions
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
ZLIB_SVN_URL:STRING="http://some_location/zlib/trunk"
SZIP_SVN_URL:STRING="http://some_location/szip/trunk"
- where "some_location" is the URL to the SVN repository.
+ where "some_location" is the URL to the SVN repository. Also set
+ CMAKE_BUILD_TYPE to the configuration type.
C. Use source packages from a compressed file by adding the following
CMake options:
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
@@ -160,7 +163,8 @@ III. Preconditions
SZIP_TGZ_NAME:STRING="szip_src.ext"
TGZPATH:STRING="some_location"
where "some_location" is the URL or full path to the compressed
- file and ext is the type of compression file.
+ file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
+ to the configuration type during configuration
3. If you are building on Apple Darwin platforms, you should add the
following options:
@@ -181,7 +185,8 @@ III. Preconditions
on the command line are those options that are different. Example using HDF
default cache file:
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \
- -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF ..
+ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=Release ..
Notes: CMake and HDF5
@@ -286,42 +291,42 @@ These five steps are described in detail below.
########################
# EXTERNAL cache entries
########################
- SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
- SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
- SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
- SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
- SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
- SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
- SET (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
- SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
- SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
- SET (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
- SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
- SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
- SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
- SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
- SET (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
- SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
- SET (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
- SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
- SET (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
- SET (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
- SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
- SET (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
- SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
- SET (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
- SET (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
- SET (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
- SET (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
- SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
- SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
- SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
- SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
- SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
- SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
- SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
- SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
- SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+ set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+ set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+ set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+ set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+ set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+ set (HDF5_ENABLE_F2003 OFF CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
+ set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+ set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+ set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
+ set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+ set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+ set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+ set (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+ set (HDF5_ENABLE_UNSUPPORTED OFF CACHE BOOL "Enable unsupported combinations of configuration options" FORCE)
+ set (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
+ set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+ set (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+ set (MPIEXEC_MAX_NUMPROCS "3" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
+ set (HDF5_BUILD_PARALLEL_ALL OFF CACHE BOOL "Build Parallel Programs" FORCE)
+ set (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
+ set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker is used" FORCE)
+ set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+ set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
+ set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
+ set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" FORCE)
+ set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+ set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
+ set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
+ set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
+ set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
+ set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
+ set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+ set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+ set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
2. Configure the cache settings
@@ -346,7 +351,8 @@ These five steps are described in detail below.
2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 10" \
- -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF ..
+ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=Release ..
2.3 On Windows, if you are using a Visual Studio Express version you must
be sure that the following two options are correctly set/unset:
@@ -381,7 +387,8 @@ These five steps are described in detail below.
The options to control the SVN URL (config/cmake/cacheinit.cmake file) are:
ZLIB_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/zlib/trunk"
SZIP_SVN_URL:STRING="http://svn.hdfgroup.uiuc.edu/szip/trunk"
- These should be changed to your location.
+ These should be changed to your location. Also define CMAKE_BUILD_TYPE
+ to be the configuration type.
3.2.2 Or the external libraries (zlib and szip) can be configured
to allow building the libraries by using a compressed file.
@@ -396,7 +403,8 @@ These five steps are described in detail below.
TGZPATH:STRING="some_location"
where "some_location/xxxx_src.ext" is the URL or full path to
the compressed file and where ext is the type of the compression
- file such as .bz2, .tar, .tar.gz, .tgz, or .zip.
+ file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
+ CMAKE_BUILD_TYPE to be the configuration type.
4. Test HDF5
@@ -462,7 +470,7 @@ HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF
HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF
HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF
HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF
-IF (HDF5_BUILD_FORTRAN)
+if (HDF5_BUILD_FORTRAN)
HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF
---------------- HDF5 Advanced Options ---------------------
@@ -489,13 +497,13 @@ HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs."
HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
-IF (APPLE)
+if (APPLE)
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
-IF (CMAKE_BUILD_TYPE MATCHES Debug)
+if (CMAKE_BUILD_TYPE MATCHES Debug)
HDF5_ENABLE_TRACE "Enable API tracing capability" ON
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
-IF (WIN32 AND NOT CYGWIN)
+if (WIN32 AND NOT CYGWIN)
HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF
---------------- External Library Options ---------------------
@@ -508,13 +516,13 @@ HDF5_USE_FILTER_FLETCHER32 "Use the FLETCHER32 Filter" ON
HDF5_USE_FILTER_NBIT "Use the NBIT Filter" ON
HDF5_USE_FILTER_SCALEOFFSET "Use the SCALEOFFSET Filter" ON
HDF5_USE_FILTER_SHUFFLE "Use the SHUFFLE Filter" ON
-IF (HDF5_ENABLE_SZIP_SUPPORT)
+if (HDF5_ENABLE_SZIP_SUPPORT)
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
-IF (WINDOWS)
+if (WINDOWS)
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
-ELSE (WINDOWS)
+else (WINDOWS)
H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
-ENDIF (WINDOWS)
+endif (WINDOWS)
@@ -562,7 +570,7 @@ is used to build, test, and package HDF5 Library files.
-cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -858,7 +866,7 @@ and the build folder is created as a sub-folder.
# "ctest -S HDF518Static.cmake,hdf518 -C Release -O hdf518static.log"
# where hdf518 is the source folder relative to the location of these scripts
############################################################################
-cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
diff --git a/release_docs/INSTALL_parallel b/release_docs/INSTALL_parallel
index 03b3ecf..6f60165 100644
--- a/release_docs/INSTALL_parallel
+++ b/release_docs/INSTALL_parallel
@@ -86,12 +86,12 @@ Then do the following steps:
# Read the Details section about parallel tests.
$ make install
-We also suggest that you add "-qxlf90=autodealloc" to FFLAGS when building
+We also suggest that you add "-qxlf90=autodealloc" to FCFLAGS when building
parallel with fortran enabled. This can be done by invoking:
- setenv FFLAGS -qxlf90=autodealloc # 32 bit build
+ setenv FCFLAGS -qxlf90=autodealloc # 32 bit build
or
- setenv FFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build
+ setenv FCFLAGS "-q64 -qxlf90=autodealloc" # 64 bit build
prior to running configure. Recall that the "-q64" is necessary for 64
bit builds.
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index d925ef3..4cb0d05 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -192,19 +192,19 @@ They are built with the configure process unless specified otherwise.
(emu) Sun Fortran 95 8.6 SunOS_sparc
Sun C++ 5.12 SunOS_sparc
- Windows 7 Visual Studio 2008 w/ Intel Fortran 11 (cmake)
- Visual Studio 2010 w/ Intel Fortran 12 (cmake)
- Visual Studio 2012 w/ Intel Fortran 13 (cmake)
- Cygwin(CYGWIN_NT-6.1 1.7.25(0.270/5/3) gcc(4.7.3) compiler and gfortran)
+ Windows 7 Visual Studio 2008 w/ Intel Fortran 14 (cmake)
+ Visual Studio 2010 w/ Intel Fortran 14 (cmake)
+ Visual Studio 2012 w/ Intel Fortran 14 (cmake)
+ Cygwin(CYGWIN_NT-6.1 1.7.28(0.271/5/3) gcc(4.8.2) compiler and gfortran)
(cmake and autotools)
- Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 11 (cmake)
- Visual Studio 2010 w/ Intel Fortran 12 (cmake)
- Visual Studio 2012 w/ Intel Fortran 13 (cmake)
-
- Windows 8.1 Visual Studio 2012 w/ Intel Fortran 13 (cmake)
+ Windows 7 x64 Visual Studio 2008 w/ Intel Fortran 14 (cmake)
+ Visual Studio 2010 w/ Intel Fortran 14 (cmake)
+ Visual Studio 2012 w/ Intel Fortran 14 (cmake)
+
+ Windows 8.1 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
- Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 13 (cmake)
+ Windows 8.1 x64 Visual Studio 2012 w/ Intel Fortran 14 (cmake)
Mac OS X Lion 10.7.3 Apple clang/clang++ version 3.0 from Xcode 4.6.1
64-bit gfortran GNU Fortran (GCC) 4.6.2
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 313e0f0..a0aca41 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -37,7 +37,7 @@ I. Preconditions
1. We suggest you obtain the latest CMake for windows from the Kitware
web site. The HDF5 1.8.x product requires a minimum CMake version
- of 2.8.10.
+ of 2.8.12.
2. You have installed the HDF5 library built with CMake, by executing
the HDF Install Utility (the *.exe file in the binary package for
@@ -186,24 +186,24 @@ III. Minimum C Project Files for CMake
following text in the file:
##########################################################
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.12)
PROJECT (HDF5MyApp C CXX)
FIND_PACKAGE (HDF5 NAMES hdf5)
# FIND_PACKAGE (HDF5) # Find non-cmake built HDF5
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
-SET (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
+set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES})
-SET (example hdf_example)
+set (example hdf_example)
-ADD_EXECUTABLE (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
+add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
TARGET_C_PROPERTIES (${example} " " " ")
-TARGET_LINK_LIBRARIES (${example} ${LINK_LIBS})
+target_link_libraries (${example} ${LINK_LIBS})
ENABLE_TESTING ()
-INCLUDE (CTest)
+include (CTest)
-ADD_TEST (NAME test_example COMMAND ${example})
+add_test (NAME test_example COMMAND ${example})
##########################################################
@@ -239,7 +239,7 @@ ctest
# where hdf518Examples is the source folder relative to the location of these scripts
############################################################################
-cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7257a41..f79ae6c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,15 +1,15 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# List Source Files
#-----------------------------------------------------------------------------
-SET (H5_SRCS
+set (H5_SRCS
${HDF5_SRC_DIR}/H5.c
${HDF5_SRC_DIR}/H5checksum.c
${HDF5_SRC_DIR}/H5dbg.c
@@ -18,7 +18,7 @@ SET (H5_SRCS
${HDF5_SRC_DIR}/H5trace.c
)
-SET (H5_HDRS
+set (H5_HDRS
${HDF5_SRC_DIR}/hdf5.h
${HDF5_SRC_DIR}/H5api_adpt.h
${HDF5_SRC_DIR}/H5public.h
@@ -27,7 +27,7 @@ SET (H5_HDRS
)
IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" )
-SET (H5A_SRCS
+set (H5A_SRCS
${HDF5_SRC_DIR}/H5A.c
${HDF5_SRC_DIR}/H5Abtree2.c
${HDF5_SRC_DIR}/H5Adense.c
@@ -36,23 +36,23 @@ SET (H5A_SRCS
${HDF5_SRC_DIR}/H5Atest.c
)
-SET (H5A_HDRS
+set (H5A_HDRS
${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Apublic.h
)
IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" )
-SET (H5AC_SRCS
+set (H5AC_SRCS
${HDF5_SRC_DIR}/H5AC.c
)
-SET (H5AC_HDRS
+set (H5AC_HDRS
${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACpublic.h
)
IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SRCS}" )
-SET (H5B_SRCS
+set (H5B_SRCS
${HDF5_SRC_DIR}/H5B.c
${HDF5_SRC_DIR}/H5B2.c
${HDF5_SRC_DIR}/H5B2cache.c
@@ -65,7 +65,7 @@ SET (H5B_SRCS
${HDF5_SRC_DIR}/H5Bdbg.c
)
-SET (H5B_HDRS
+set (H5B_HDRS
${HDF5_SRC_DIR}/H5B2pkg.h
${HDF5_SRC_DIR}/H5B2public.h
${HDF5_SRC_DIR}/H5Bpkg.h
@@ -73,7 +73,7 @@ SET (H5B_HDRS
)
IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" )
-SET (H5D_SRCS
+set (H5D_SRCS
${HDF5_SRC_DIR}/H5D.c
${HDF5_SRC_DIR}/H5Dcompact.c
${HDF5_SRC_DIR}/H5Dbtree.c
@@ -93,19 +93,19 @@ SET (H5D_SRCS
${HDF5_SRC_DIR}/H5Dtest.c
)
-SET (H5D_HDRS
+set (H5D_HDRS
${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dpublic.h
)
IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SRCS}" )
-SET (H5E_SRCS
+set (H5E_SRCS
${HDF5_SRC_DIR}/H5E.c
${HDF5_SRC_DIR}/H5Edeprec.c
${HDF5_SRC_DIR}/H5Eint.c
)
-SET (H5E_HDRS
+set (H5E_HDRS
${HDF5_SRC_DIR}/H5Edefin.h
${HDF5_SRC_DIR}/H5Einit.h
${HDF5_SRC_DIR}/H5Epkg.h
@@ -115,7 +115,7 @@ SET (H5E_HDRS
)
IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SRCS}" )
-SET (H5F_SRCS
+set (H5F_SRCS
${HDF5_SRC_DIR}/H5F.c
${HDF5_SRC_DIR}/H5Faccum.c
${HDF5_SRC_DIR}/H5Fcwfs.c
@@ -132,13 +132,13 @@ SET (H5F_SRCS
${HDF5_SRC_DIR}/H5Ftest.c
)
-SET (H5F_HDRS
+set (H5F_HDRS
${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fpublic.h
)
IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SRCS}" )
-SET (H5FD_SRCS
+set (H5FD_SRCS
${HDF5_SRC_DIR}/H5FD.c
${HDF5_SRC_DIR}/H5FDcore.c
${HDF5_SRC_DIR}/H5FDdirect.c
@@ -153,7 +153,7 @@ SET (H5FD_SRCS
${HDF5_SRC_DIR}/H5FDstdio.c
)
-SET (H5FD_HDRS
+set (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDcore.h
${HDF5_SRC_DIR}/H5FDdirect.h
${HDF5_SRC_DIR}/H5FDfamily.h
@@ -168,7 +168,7 @@ SET (H5FD_HDRS
)
IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SRCS}" )
-SET (H5FS_SRCS
+set (H5FS_SRCS
${HDF5_SRC_DIR}/H5FS.c
${HDF5_SRC_DIR}/H5FScache.c
${HDF5_SRC_DIR}/H5FSdbg.c
@@ -177,13 +177,13 @@ SET (H5FS_SRCS
${HDF5_SRC_DIR}/H5FStest.c
)
-SET (H5FS_HDRS
+set (H5FS_HDRS
${HDF5_SRC_DIR}/H5FSpkg.h
${HDF5_SRC_DIR}/H5FSpublic.h
)
IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SRCS}" )
-SET (H5G_SRCS
+set (H5G_SRCS
${HDF5_SRC_DIR}/H5G.c
${HDF5_SRC_DIR}/H5Gbtree2.c
${HDF5_SRC_DIR}/H5Gcache.c
@@ -204,13 +204,13 @@ SET (H5G_SRCS
${HDF5_SRC_DIR}/H5Gtraverse.c
)
-SET (H5G_HDRS
+set (H5G_HDRS
${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gpublic.h
)
IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SRCS}" )
-SET (H5HF_SRCS
+set (H5HF_SRCS
${HDF5_SRC_DIR}/H5HF.c
${HDF5_SRC_DIR}/H5HFbtree2.c
${HDF5_SRC_DIR}/H5HFcache.c
@@ -229,60 +229,60 @@ SET (H5HF_SRCS
${HDF5_SRC_DIR}/H5HFtiny.c
)
-SET (H5HF_HDRS
+set (H5HF_HDRS
${HDF5_SRC_DIR}/H5HFpkg.h
${HDF5_SRC_DIR}/H5HFpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SRCS}" )
-SET (H5HG_SRCS
+set (H5HG_SRCS
${HDF5_SRC_DIR}/H5HG.c
${HDF5_SRC_DIR}/H5HGcache.c
${HDF5_SRC_DIR}/H5HGdbg.c
${HDF5_SRC_DIR}/H5HGquery.c
)
-SET (H5HG_HDRS
+set (H5HG_HDRS
${HDF5_SRC_DIR}/H5HGpkg.h
${HDF5_SRC_DIR}/H5HGpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SRCS}" )
-SET (H5HL_SRCS
+set (H5HL_SRCS
${HDF5_SRC_DIR}/H5HL.c
${HDF5_SRC_DIR}/H5HLcache.c
${HDF5_SRC_DIR}/H5HLdbg.c
${HDF5_SRC_DIR}/H5HLint.c
)
-SET (H5HL_HDRS
+set (H5HL_HDRS
${HDF5_SRC_DIR}/H5HLpkg.h
${HDF5_SRC_DIR}/H5HLpublic.h
)
IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SRCS}" )
-SET (H5MF_SRCS
+set (H5MF_SRCS
${HDF5_SRC_DIR}/H5MF.c
${HDF5_SRC_DIR}/H5MFaggr.c
${HDF5_SRC_DIR}/H5MFdbg.c
${HDF5_SRC_DIR}/H5MFsection.c
)
-SET (H5MF_HDRS
+set (H5MF_HDRS
)
IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" )
-SET (H5MP_SRCS
+set (H5MP_SRCS
${HDF5_SRC_DIR}/H5MP.c
${HDF5_SRC_DIR}/H5MPtest.c
)
-SET (H5MP_HDRS
+set (H5MP_HDRS
${HDF5_SRC_DIR}/H5MPpkg.h
)
IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SRCS}" )
-SET (H5O_SRCS
+set (H5O_SRCS
${HDF5_SRC_DIR}/H5O.c
${HDF5_SRC_DIR}/H5Oainfo.c
${HDF5_SRC_DIR}/H5Oalloc.c
@@ -317,14 +317,14 @@ SET (H5O_SRCS
${HDF5_SRC_DIR}/H5Ounknown.c
)
-SET (H5O_HDRS
+set (H5O_HDRS
${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Opublic.h
${HDF5_SRC_DIR}/H5Oshared.h
)
IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SRCS}" )
-SET (H5P_SRCS
+set (H5P_SRCS
${HDF5_SRC_DIR}/H5P.c
${HDF5_SRC_DIR}/H5Pacpl.c
${HDF5_SRC_DIR}/H5Pdapl.c
@@ -344,49 +344,49 @@ SET (H5P_SRCS
${HDF5_SRC_DIR}/H5Ptest.c
)
-SET (H5P_HDRS
+set (H5P_HDRS
${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Ppublic.h
)
IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" )
-SET (H5PL_SRCS
+set (H5PL_SRCS
${HDF5_SRC_DIR}/H5PL.c
)
-SET (H5PL_HDRS
+set (H5PL_HDRS
${HDF5_SRC_DIR}/H5PLextern.h
)
IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" )
-SET (H5R_SRCS
+set (H5R_SRCS
${HDF5_SRC_DIR}/H5R.c
${HDF5_SRC_DIR}/H5Rdeprec.c
)
-SET (H5R_HDRS
+set (H5R_HDRS
${HDF5_SRC_DIR}/H5Rpkg.h
${HDF5_SRC_DIR}/H5Rpublic.h
)
IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" )
-SET (H5RC_SRCS
+set (H5RC_SRCS
${HDF5_SRC_DIR}/H5RC.c
)
-SET (H5RC_HDRS
+set (H5RC_HDRS
)
IDE_GENERATED_PROPERTIES ("H5RC" "${H5RC_HDRS}" "${H5RC_SRCS}" )
-SET (H5RS_SRCS
+set (H5RS_SRCS
${HDF5_SRC_DIR}/H5RS.c
)
-SET (H5RS_HDRS
+set (H5RS_HDRS
)
IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SRCS}" )
-SET (H5S_SRCS
+set (H5S_SRCS
${HDF5_SRC_DIR}/H5S.c
${HDF5_SRC_DIR}/H5Sall.c
${HDF5_SRC_DIR}/H5Sdbg.c
@@ -398,13 +398,13 @@ SET (H5S_SRCS
${HDF5_SRC_DIR}/H5Stest.c
)
-SET (H5S_HDRS
+set (H5S_HDRS
${HDF5_SRC_DIR}/H5Spkg.h
${HDF5_SRC_DIR}/H5Spublic.h
)
IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SRCS}" )
-SET (H5SM_SRCS
+set (H5SM_SRCS
${HDF5_SRC_DIR}/H5SM.c
${HDF5_SRC_DIR}/H5SMbtree2.c
${HDF5_SRC_DIR}/H5SMcache.c
@@ -412,12 +412,12 @@ SET (H5SM_SRCS
${HDF5_SRC_DIR}/H5SMtest.c
)
-SET (H5SM_HDRS
+set (H5SM_HDRS
${HDF5_SRC_DIR}/H5SMpkg.h
)
IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SRCS}" )
-SET (H5T_SRCS
+set (H5T_SRCS
${HDF5_SRC_DIR}/H5T.c
${HDF5_SRC_DIR}/H5Tarray.c
${HDF5_SRC_DIR}/H5Tbit.c
@@ -443,13 +443,13 @@ SET (H5T_SRCS
${HDF5_SRC_DIR}/H5Tvlen.c
)
-SET (H5T_HDRS
+set (H5T_HDRS
${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tpublic.h
)
IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SRCS}" )
-SET (H5Z_SRCS
+set (H5Z_SRCS
${HDF5_SRC_DIR}/H5Z.c
${HDF5_SRC_DIR}/H5Zdeflate.c
${HDF5_SRC_DIR}/H5Zfletcher32.c
@@ -459,19 +459,19 @@ SET (H5Z_SRCS
${HDF5_SRC_DIR}/H5Zszip.c
${HDF5_SRC_DIR}/H5Ztrans.c
)
-IF (H5_ZLIB_HEADER)
+if (H5_ZLIB_HEADER)
SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY
COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}")
-ENDIF (H5_ZLIB_HEADER)
+endif (H5_ZLIB_HEADER)
-SET (H5Z_HDRS
+set (H5Z_HDRS
${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zpublic.h
)
IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SRCS}" )
-SET (common_SRCS
+set (common_SRCS
${H5_SRCS}
${H5A_SRCS}
${H5AC_SRCS}
@@ -518,7 +518,7 @@ SET (common_SRCS
${HDF5_SRC_DIR}/H5WB.c
)
-SET (H5_PUBLIC_HEADERS
+set (H5_PUBLIC_HEADERS
${H5_HDRS}
${H5A_HDRS}
${H5AC_HDRS}
@@ -556,12 +556,12 @@ SET (H5_PUBLIC_HEADERS
# --------------------------------------------------------------------
# If we are compiling on Windows then add the windows specific files
# --------------------------------------------------------------------
-IF (WIN32 AND NOT CYGWIN)
- SET (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
- SET (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
-ENDIF (WIN32 AND NOT CYGWIN)
+if (WIN32)
+ set (common_SRCS ${common_SRCS} ${HDF5_SRC_DIR}/H5FDwindows.c)
+ set (H5_PUBLIC_HEADERS ${H5_PUBLIC_HEADERS} ${HDF5_SRC_DIR}/H5FDwindows.h)
+endif (WIN32)
-SET (H5_PRIVATE_HEADERS
+set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
${HDF5_SRC_DIR}/H5Aprivate.h
${HDF5_SRC_DIR}/H5ACprivate.h
@@ -604,35 +604,32 @@ SET (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5win32defs.h
)
-INCLUDE_DIRECTORIES (${HDF5_SOURCE_DIR})
-INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
-
#-----------------------------------------------------------------------------
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
-ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
+add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
TARGET_C_PROPERTIES (H5detect " " " ")
-IF (MSVC)
- TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
-ENDIF (MSVC)
+if (MSVC)
+ target_link_libraries (H5detect "ws2_32.lib")
+endif (MSVC)
-SET (CMD $<TARGET_FILE:H5detect>)
-ADD_CUSTOM_COMMAND (
+set (CMD $<TARGET_FILE:H5detect>)
+add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c
COMMAND ${CMD}
ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c
DEPENDS H5detect
)
-ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
+add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
TARGET_C_PROPERTIES (H5make_libsettings " " " ")
-IF (MSVC)
- TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib")
-ENDIF (MSVC)
+if (MSVC)
+ target_link_libraries (H5make_libsettings "ws2_32.lib")
+endif (MSVC)
-SET (CMD $<TARGET_FILE:H5make_libsettings>)
-ADD_CUSTOM_COMMAND (
+set (CMD $<TARGET_FILE:H5make_libsettings>)
+add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
COMMAND ${CMD}
ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c
@@ -640,21 +637,21 @@ ADD_CUSTOM_COMMAND (
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET ${HDF5_BINARY_DIR}/H5Edefin.h
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt
COMMENT " Creating err headers"
)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET ${HDF5_BINARY_DIR}/H5version.h
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt
COMMENT " Creating API version macro"
)
-ADD_CUSTOM_COMMAND (
+add_custom_command (
TARGET ${HDF5_BINARY_DIR}/H5overflow.h
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt
@@ -664,51 +661,67 @@ ADD_CUSTOM_COMMAND (
#-----------------------------------------------------------------------------
# Add H5Tinit source to build - generated by H5Detect/CMake at configure time
#-----------------------------------------------------------------------------
-SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5Tinit.c GENERATED)
-SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5lib_settings.c GENERATED)
-SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Edefin.h)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5Edefin.h GENERATED)
-SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5version.h)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5version.h GENERATED)
-SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h)
-SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
-
-ADD_LIBRARY (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
+set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5Tinit.c GENERATED)
+set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c GENERATED)
+set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Edefin.h)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5Edefin.h GENERATED)
+set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5version.h)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED)
+set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h)
+set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED)
+
+add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} ${LINK_LIBS})
-IF (NOT WIN32)
- TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} dl)
-ENDIF (NOT WIN32)
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
+target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS})
+if (NOT WIN32)
+ target_link_libraries (${HDF5_LIB_TARGET} dl)
+endif (NOT WIN32)
+if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
+ target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
+endif (H5_HAVE_PARALLEL AND MPI_C_FOUND)
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries)
+set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
+ FOLDER libraries
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+
+option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF)
+if (HDF5_ENABLE_DEBUG_APIS)
+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
+ COMPILE_DEFINITIONS
+ "-DH5Z_DEBUG -DH5VM_DEBUG -DH5T_DEBUG
+ -DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG
+ -DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG
+ -DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG"
+ )
+endif (HDF5_ENABLE_DEBUG_APIS)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
- INSTALL (
+if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+ install (
FILES
${H5_PUBLIC_HEADERS}
- ${H5_PRIVATE_HEADERS}
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
headers
)
-ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+endif (NOT HDF5_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_LIB_TARGET}
EXPORT
@@ -717,4 +730,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0f44452..2f1b70a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,84 +1,87 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TEST)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
+set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
#-----------------------------------------------------------------------------
# Define Test Library Sources
#-----------------------------------------------------------------------------
-SET (TEST_LIB_SRCS
+set (TEST_LIB_SRCS
${HDF5_TEST_SOURCE_DIR}/h5test.c
${HDF5_TEST_SOURCE_DIR}/testframe.c
${HDF5_TEST_SOURCE_DIR}/cache_common.c
)
-SET (TEST_LIB_HEADERS
+set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
)
-ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
+add_library (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} " " " ")
-IF (MSVC)
- TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
-ENDIF (MSVC)
-IF (MINGW)
- TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "wsock32.lib")
-ENDIF (MINGW)
-TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+if (MSVC)
+ target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
+endif (MSVC)
+if (MINGW)
+ target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib")
+endif (MINGW)
+target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})
-SET_TARGET_PROPERTIES (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test)
+set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
+ FOLDER libraries/test
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
-IF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
# make plugins dir
- FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
- FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
#-----------------------------------------------------------------------------
# Define Test Library Sources
#-----------------------------------------------------------------------------
- SET (TEST_PLUGIN_LIBS
+ set (TEST_PLUGIN_LIBS
dynlib1
dynlib3
)
- SET (TEST2_PLUGIN_LIBS
+ set (TEST2_PLUGIN_LIBS
dynlib2
)
- FOREACH (test_lib ${TEST_PLUGIN_LIBS})
- SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
- SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
- SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ foreach (test_lib ${TEST_PLUGIN_LIBS})
+ set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ add_definitions (${HDF5_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ")
- TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
${LIB_TYPE}
HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
)
- SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+ set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -86,30 +89,30 @@ IF (BUILD_SHARED_LIBS)
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
- ENDFOREACH (test_lib ${TEST_PLUGIN_LIBS})
+ endforeach (test_lib ${TEST_PLUGIN_LIBS})
- FOREACH (test_lib ${TEST2_PLUGIN_LIBS})
- SET (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
- SET (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
- SET (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ foreach (test_lib ${TEST2_PLUGIN_LIBS})
+ set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
+ set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
+ set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
+ add_definitions (${HDF5_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} " " " ")
- TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
${LIB_TYPE}
HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
)
- SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+ set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -117,10 +120,10 @@ IF (BUILD_SHARED_LIBS)
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
- ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS})
-ENDIF (BUILD_SHARED_LIBS)
+ endforeach (test_lib ${TEST2_PLUGIN_LIBS})
+endif (BUILD_SHARED_LIBS)
-SET (testhdf5_SRCS
+set (testhdf5_SRCS
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
${HDF5_TEST_SOURCE_DIR}/tarray.c
${HDF5_TEST_SOURCE_DIR}/tattr.c
@@ -149,21 +152,21 @@ SET (testhdf5_SRCS
)
#-- Adding test for testhdf5
-ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
+add_executable (testhdf5 ${testhdf5_SRCS})
TARGET_NAMING (testhdf5 ${LIB_TYPE})
TARGET_C_PROPERTIES (testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
+target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (testhdf5 PROPERTIES FOLDER test)
MACRO (ADD_H5_EXE file)
- ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
TARGET_C_PROPERTIES (${file} " " " ")
- TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
+ target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (${file} PROPERTIES FOLDER test)
ENDMACRO (ADD_H5_EXE file)
-SET (H5_TESTS
+set (H5_TESTS
accum
lheap
ohdr
@@ -215,13 +218,13 @@ SET (H5_TESTS
file_image
unregister
)
-IF (NOT CYGWIN)
- SET (H5_TESTS ${H5_TESTS} big)
-ENDIF (NOT CYGWIN)
+if (NOT CYGWIN)
+ set (H5_TESTS ${H5_TESTS} big)
+endif (NOT CYGWIN)
-FOREACH (test ${H5_TESTS})
+foreach (test ${H5_TESTS})
ADD_H5_EXE(${test})
-ENDFOREACH (test ${H5_TESTS})
+endforeach (test ${H5_TESTS})
##############################################################################
##############################################################################
@@ -230,21 +233,21 @@ ENDFOREACH (test ${H5_TESTS})
##############################################################################
#-- Adding test for cache
-ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache ${LIB_TYPE})
TARGET_C_PROPERTIES (cache " " " ")
-TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
+target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (cache PROPERTIES FOLDER test)
#-- Adding test for cache_api
-ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache_api ${LIB_TYPE})
TARGET_C_PROPERTIES (cache_api " " " ")
-TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
+target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (cache_api PROPERTIES FOLDER test)
#-- Adding test for ttsafe
-ADD_EXECUTABLE (ttsafe
+add_executable (ttsafe
${HDF5_TEST_SOURCE_DIR}/ttsafe.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
@@ -253,53 +256,53 @@ ADD_EXECUTABLE (ttsafe
)
TARGET_NAMING (ttsafe ${LIB_TYPE})
TARGET_C_PROPERTIES (ttsafe " " " ")
-TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
+target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (ttsafe PROPERTIES FOLDER test)
#-- Adding test for err_compat
-IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
+if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
TARGET_NAMING (err_compat ${LIB_TYPE})
TARGET_C_PROPERTIES (err_compat " " " ")
- TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
-ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (err_compat PROPERTIES FOLDER test)
+endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
-ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
+add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
TARGET_NAMING (error_test ${LIB_TYPE})
TARGET_C_PROPERTIES (error_test " " " ")
-TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
+target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (error_test PROPERTIES FOLDER test)
#-- Adding test for links_env
-ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
+add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
TARGET_NAMING (links_env ${LIB_TYPE})
TARGET_C_PROPERTIES (links_env " " " ")
-TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
+target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+set_target_properties (links_env PROPERTIES FOLDER test)
#-- Adding test for libinfo
-SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-FILE (WRITE ${GREP_RUNNER}
- "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-IF (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
-ELSE (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
-ENDIF (\${TEST_RESULT} STREQUAL \"0\")
+set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
+file (WRITE ${GREP_RUNNER}
+ "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
+if (\${TEST_RESULT} STREQUAL \"0\")
+ message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
+else (\${TEST_RESULT} STREQUAL \"0\")
+ message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
+endif (\${TEST_RESULT} STREQUAL \"0\")
"
)
##############################################################################
### P L U G I N T E S T S
##############################################################################
-IF (BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+if (BUILD_SHARED_LIBS)
+ add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
TARGET_NAMING (plugin ${LIB_TYPE})
TARGET_C_PROPERTIES (plugin " " " ")
- TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
- SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
-ENDIF (BUILD_SHARED_LIBS)
+ target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ set_target_properties (plugin PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index be79506..95d1917 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -8,25 +8,25 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
-SET (HDF5_TEST_FILES
+set (HDF5_TEST_FILES
tnullspace.h5
)
-FOREACH (h5_tfile ${HDF5_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_tfile}")
- #MESSAGE (STATUS " Copying ${h5_tfile}")
- ADD_CUSTOM_COMMAND (
+foreach (h5_tfile ${HDF5_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_tfile}")
+ #message (STATUS " Copying ${h5_tfile}")
+ add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
)
-ENDFOREACH (h5_tfile ${HDF5_TEST_FILES})
+endforeach (h5_tfile ${HDF5_TEST_FILES})
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
-SET (HDF5_REFERENCE_FILES
+set (HDF5_REFERENCE_FILES
err_compat_1
err_compat_2
error_test_1
@@ -34,21 +34,21 @@ SET (HDF5_REFERENCE_FILES
links_env.out
)
-FOREACH (ref_file ${HDF5_REFERENCE_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${ref_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+foreach (ref_file ${HDF5_REFERENCE_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${ref_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
)
-ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES})
+endforeach (ref_file ${HDF5_REFERENCE_FILES})
# --------------------------------------------------------------------
#-- Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
-SET (HDF5_REFERENCE_TEST_FILES
+set (HDF5_REFERENCE_TEST_FILES
be_data.h5
be_extlink1.h5
be_extlink2.h5
@@ -83,19 +83,19 @@ SET (HDF5_REFERENCE_TEST_FILES
tsizeslheap.h5
)
-FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file} to ${dest}")
- ADD_CUSTOM_COMMAND (
+foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file} to ${dest}")
+ add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
-ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME h5test-clear-testhdf5-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -118,23 +118,23 @@ ADD_TEST (
tsohm_src.h5
)
-IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
- SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
- SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
- SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
- SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
-ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
- SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
-ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
+ set_tests_properties (testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ set_tests_properties (testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
+ set_tests_properties (testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ set_tests_properties (testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
+ set_tests_properties (testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ set_tests_properties (testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ add_test (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
+ set_tests_properties (testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ set_tests_properties (testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
+ set_tests_properties (testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+endif (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
##############################################################################
@@ -143,7 +143,7 @@ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME h5test-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -206,12 +206,12 @@ ADD_TEST (
unregister_filter_2.h5
)
-FOREACH (test ${H5_TESTS})
- ADD_TEST (NAME ${test} COMMAND $<TARGET_FILE:${test}>)
- SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects)
-ENDFOREACH (test ${H5_TESTS})
+foreach (test ${H5_TESTS})
+ add_test (NAME ${test} COMMAND $<TARGET_FILE:${test}>)
+ set_tests_properties (${test} PROPERTIES DEPENDS h5test-clear-objects)
+endforeach (test ${H5_TESTS})
-SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
+set_tests_properties (flush2 PROPERTIES DEPENDS flush1)
##############################################################################
##############################################################################
@@ -220,27 +220,27 @@ SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
##############################################################################
#-- Adding test for cache
-ADD_TEST (
+add_test (
NAME h5test-clear-cache-objects
COMMAND ${CMAKE_COMMAND}
-E remove
cache_test.h5
)
-ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
-SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects)
+add_test (NAME cache COMMAND $<TARGET_FILE:cache>)
+set_tests_properties (cache PROPERTIES DEPENDS h5test-clear-cache-objects)
#-- Adding test for cache_api
-ADD_TEST (
+add_test (
NAME h5test-clear-cache_api-objects
COMMAND ${CMAKE_COMMAND}
-E remove
cache_api_test.h5
)
-ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
-SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
+add_test (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
+set_tests_properties (cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
#-- Adding test for ttsafe
-ADD_TEST (
+add_test (
NAME h5test-clear-ttsafe-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -249,19 +249,19 @@ ADD_TEST (
ttsafe_cancel.h5
ttsafe_acreate.h5
)
-ADD_TEST (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
-SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
+add_test (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
+set_tests_properties (ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
#-- Adding test for err_compat
-IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- ADD_TEST (
+if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ add_test (
NAME h5test-clear-err_compat-objects
COMMAND ${CMAKE_COMMAND}
-E remove
err_compat.txt
err_compat.txt.err
)
- ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}"
+ add_test (NAME err_compat COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:err_compat>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -271,18 +271,18 @@ IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES(err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects)
-ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ set_tests_properties (err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects)
+endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
-ADD_TEST (
+add_test (
NAME h5test-clear-error_test-objects
COMMAND ${CMAKE_COMMAND}
-E remove
error_test.txt
error_test.txt.err
)
-ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
+add_test (NAME error_test COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -292,11 +292,11 @@ ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
-SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
-SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
+set_tests_properties (error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
+set_tests_properties (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
#-- Adding test for links_env
-ADD_TEST (
+add_test (
NAME h5test-clear-links_env-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -306,7 +306,7 @@ ADD_TEST (
extlinks_env1.h5
tmp/extlinks_env1.h5
)
-ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}"
+add_test (NAME links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
-D "TEST_ARGS:STRING="
-D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
@@ -317,31 +317,31 @@ ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
-SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
+set_tests_properties (links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
#-- Adding test for libinfo
-ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
+add_test (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
##############################################################################
### P L U G I N T E S T S
##############################################################################
-IF (BUILD_SHARED_LIBS)
-
- IF (WIN32 AND NOT CYGWIN)
- SET(CMAKE_SEP "\;")
- ELSE (WIN32 AND NOT CYGWIN)
- SET(CMAKE_SEP ":")
- ENDIF(WIN32 AND NOT CYGWIN)
-
- ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
- SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
-ELSE (BUILD_SHARED_LIBS)
- MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
- ADD_TEST (
+if (BUILD_SHARED_LIBS)
+
+ if (WIN32 AND NOT CYGWIN)
+ set (CMAKE_SEP "\;")
+ else (WIN32 AND NOT CYGWIN)
+ set (CMAKE_SEP ":")
+ endif (WIN32 AND NOT CYGWIN)
+
+ add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
+ set_tests_properties (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
+else (BUILD_SHARED_LIBS)
+ message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ add_test (
NAME H5PLUGIN-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
)
-ENDIF (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS)
##############################################################################
##############################################################################
@@ -349,9 +349,9 @@ ENDIF (BUILD_SHARED_LIBS)
##############################################################################
##############################################################################
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
- SET (VFD_LIST
+ set (VFD_LIST
sec2
stdio
core
@@ -360,7 +360,7 @@ IF (HDF5_TEST_VFD)
family
)
- SET (H5_VFD_TESTS
+ set (H5_VFD_TESTS
testhdf5
accum
lheap
@@ -412,17 +412,17 @@ IF (HDF5_TEST_VFD)
links_env
unregister
)
- IF (NOT CYGWIN)
- SET (H5_VFD_TESTS "${H5_VFD_TESTS} big")
- ENDIF (NOT CYGWIN)
+ if (NOT CYGWIN)
+ set (H5_VFD_TESTS "${H5_VFD_TESTS} big")
+ endif (NOT CYGWIN)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- FOREACH (test ${H5_VFD_TESTS})
- ADD_TEST (
+ foreach (test ${H5_VFD_TESTS})
+ add_test (
NAME VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
@@ -433,9 +433,9 @@ IF (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- ENDFOREACH (test ${H5_VFD_TESTS})
- IF (HDF5_TEST_FHEAP_VFD)
- ADD_TEST (
+ endforeach (test ${H5_VFD_TESTS})
+ if (HDF5_TEST_FHEAP_VFD)
+ add_test (
NAME VFD-${vfdname}-fheap
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
@@ -446,15 +446,15 @@ IF (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- ENDIF (HDF5_TEST_FHEAP_VFD)
+ endif (HDF5_TEST_FHEAP_VFD)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
+ endforeach (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+endif (HDF5_TEST_VFD)
##############################################################################
##############################################################################
@@ -462,23 +462,22 @@ ENDIF (HDF5_TEST_VFD)
##############################################################################
##############################################################################
-IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
MACRO (ADD_H5_GENERATOR genfile)
- ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
+ add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
TARGET_NAMING (${genfile} ${LIB_TYPE})
TARGET_C_PROPERTIES (${genfile} " " " ")
- TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test)
+ target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
ENDMACRO (ADD_H5_GENERATOR genfile)
# generator executables
- SET (H5_GENERATORS
+ set (H5_GENERATORS
gen_bad_ohdr
gen_bogus
gen_cross
gen_deflate
gen_filters
- gen_idx
gen_new_array
gen_new_fill
gen_new_group
@@ -488,12 +487,15 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
gen_nullspace
gen_udlinks
space_overflow
+ gen_filespace
+ gen_specmetaread
gen_sizes_lheap
gen_file_image
+ gen_plist
)
- FOREACH (gen ${H5_GENERATORS})
+ foreach (gen ${H5_GENERATORS})
ADD_H5_GENERATOR (${gen})
- ENDFOREACH (gen ${H5_GENERATORS})
+ endforeach (gen ${H5_GENERATORS})
-ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index a3ef96d..6d4f4d4 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TEST_PAR)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
@@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib )
# Define Tests
#-----------------------------------------------------------------------------
-SET (testphdf5_SRCS
+set (testphdf5_SRCS
${HDF5_TEST_PAR_SOURCE_DIR}/testphdf5.c
${HDF5_TEST_PAR_SOURCE_DIR}/t_dset.c
${HDF5_TEST_PAR_SOURCE_DIR}/t_file.c
@@ -23,24 +23,25 @@ SET (testphdf5_SRCS
${HDF5_TEST_PAR_SOURCE_DIR}/t_span_tree.c
${HDF5_TEST_PAR_SOURCE_DIR}/t_chunk_alloc.c
${HDF5_TEST_PAR_SOURCE_DIR}/t_filter_read.c
+ ${HDF5_TEST_PAR_SOURCE_DIR}/t_prop.c
)
#-- Adding test for testhdf5
-ADD_EXECUTABLE (testphdf5 ${testphdf5_SRCS})
+add_executable (testphdf5 ${testphdf5_SRCS})
TARGET_NAMING (testphdf5 ${LIB_TYPE})
TARGET_C_PROPERTIES (testphdf5 " " " ")
-TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
-SET_TARGET_PROPERTIES (testphdf5 PROPERTIES FOLDER test/par)
+target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
+set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
- ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
+ add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
TARGET_C_PROPERTIES (${file} " " " ")
- TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
- SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test/par)
+ target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
+ set_target_properties (${file} PROPERTIES FOLDER test/par)
ENDMACRO (ADD_H5P_EXE file)
-SET (H5P_TESTS
+set (H5P_TESTS
t_mpi
# t_posix_compliant
t_cache
@@ -49,12 +50,12 @@ SET (H5P_TESTS
t_shapesame
)
-FOREACH (testp ${H5P_TESTS})
+foreach (testp ${H5P_TESTS})
ADD_H5P_EXE(${testp})
-ENDFOREACH (testp ${H5P_TESTS})
+endforeach (testp ${H5P_TESTS})
-IF (NOT WIN32)
+if (NOT WIN32)
ADD_H5P_EXE(t_posix_compliant)
-ENDIF (NOT WIN32)
+endif (NOT WIN32)
-INCLUDE (CMakeTests.cmake)
+include (CMakeTests.cmake)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index 9a94ed0..5ac96e6 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -5,17 +5,17 @@
##############################################################################
##############################################################################
-ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
+add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
-FOREACH (testp ${H5P_TESTS})
- ADD_TEST (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
-ENDFOREACH (testp ${H5P_TESTS})
+foreach (testp ${H5P_TESTS})
+ add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
+endforeach (testp ${H5P_TESTS})
SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
-IF (HDF5_TEST_VFD)
+if (HDF5_TEST_VFD)
- SET (VFD_LIST
+ set (VFD_LIST
sec2
stdio
core
@@ -24,19 +24,19 @@ IF (HDF5_TEST_VFD)
family
)
- SET (H5P_VFD_TESTS
+ set (H5P_VFD_TESTS
t_pflush1
t_pflush2
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- FOREACH (test ${H5P_VFD_TESTS})
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ foreach (test ${H5P_VFD_TESTS})
+ add_test (
NAME VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
@@ -47,13 +47,13 @@ IF (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- ENDFOREACH (test ${H5P_VFD_TESTS})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endforeach (test ${H5P_VFD_TESTS})
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
+ endforeach (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+endif (HDF5_TEST_VFD)
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 3bb4a1f..27820ae 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Setup include Directories
@@ -14,33 +14,33 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
# --------------------------------------------------------------------
# If testing was NOT enabled, then we need to build the tools library
# --------------------------------------------------------------------
-IF (NOT BUILD_TESTING)
- ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/lib)
-ENDIF (NOT BUILD_TESTING)
+if (NOT BUILD_TESTING)
+ add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/lib)
+endif (NOT BUILD_TESTING)
#-- Add the h5diff and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5diff)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5diff)
#-- Add the h5ls executable
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5ls)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5ls)
#-- Misc Executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/misc)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/misc)
#-- Add the h5import and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5import)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5import)
#-- h5Repack executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5repack)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5repack)
#-- Add the h5dump and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5jam)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5jam)
#-- Add the h5copy and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5copy)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5copy)
#-- Add the h5stat and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5stat)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5stat)
#-- Add the h5dump and test executables
-ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5dump)
+add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5dump)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 6faf332..e5a1a9f 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5COPY)
#-----------------------------------------------------------------------------
@@ -9,27 +9,27 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5copy and test executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
+add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
TARGET_NAMING (h5copy ${LIB_TYPE})
TARGET_C_PROPERTIES (h5copy " " " ")
-TARGET_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5copy PROPERTIES FOLDER tools)
+target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5copy PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5copy)
+set (H5_DEP_EXECUTABLES h5copy)
-IF (BUILD_TESTING)
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
+if (BUILD_TESTING)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
TARGET_NAMING (h5copygentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5copygentest " " " ")
- TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5copygentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -43,7 +43,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5copy
RUNTIME DESTINATION
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index a4cce03..77399a8 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -8,30 +8,30 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
)
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${listfiles}")
+ add_custom_command (
TARGET h5copy
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${listfiles} ${dest}
)
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
##############################################################################
@@ -43,157 +43,157 @@
# Perform h5copy according to passing parmeters
#
MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY_F-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5COPY_F-${testname}
COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
+ if (NOT ${resultcode} STREQUAL "2")
+ add_test (
NAME H5COPY_F-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_F_TEST)
MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5COPY-${testname}
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
+ if (NOT ${resultcode} STREQUAL "2")
+ add_test (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST)
MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5COPY-${testname}-prefill
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+
+ add_test (
NAME H5COPY-${testname}
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
+ set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
+ if (NOT ${resultcode} STREQUAL "2")
+ add_test (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST2)
MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY_SAME-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5COPY_SAME-${testname}-prefill
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+
+ add_test (
NAME H5COPY_SAME-${testname}
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
+ set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
+ if (NOT ${resultcode} STREQUAL "2")
+ add_test (
NAME H5COPY_SAME-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST_SAME)
#
@@ -202,17 +202,17 @@
#
MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY-CMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -220,7 +220,7 @@
./testfiles/${testname}.out.out
./testfiles/${testname}.out.out.err
)
- ADD_TEST (
+ add_test (
NAME H5COPY-CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5copy>"
@@ -232,8 +232,8 @@
-D "TEST_MASK=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_CMP_TEST)
##############################################################################
@@ -245,14 +245,14 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (HDF_FILE1 h5copytst)
- SET (HDF_FILE2 h5copy_ref)
- SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
- SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
+ set (HDF_FILE1 h5copytst)
+ set (HDF_FILE2 h5copy_ref)
+ set (HDF_EXT_SRC_FILE h5copy_extlinks_src)
+ set (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5COPY-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -291,12 +291,12 @@
h5copy_misc1.out.out
h5copy_misc1.out.out.err
)
- SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5COPY-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# "Test copying various forms of datasets"
ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index d79c290..5620968 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5DIFF)
#-----------------------------------------------------------------------------
@@ -9,45 +9,45 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5diff executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5diff
+add_executable (h5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
TARGET_NAMING (h5diff ${LIB_TYPE})
TARGET_C_PROPERTIES (h5diff " " " ")
-TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5diff PROPERTIES FOLDER tools)
+target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5diff PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5diff)
+set (H5_DEP_EXECUTABLES h5diff)
-IF (H5_HAVE_PARALLEL)
- ADD_EXECUTABLE (ph5diff
+if (H5_HAVE_PARALLEL)
+ add_executable (ph5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
TARGET_NAMING (ph5diff ${LIB_TYPE})
TARGET_C_PROPERTIES (ph5diff " " " ")
- TARGET_LINK_LIBRARIES (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (ph5diff PROPERTIES FOLDER tools)
-ENDIF (H5_HAVE_PARALLEL)
+ target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (ph5diff PROPERTIES FOLDER tools)
+endif (H5_HAVE_PARALLEL)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5diff and test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
TARGET_NAMING (h5diffgentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5diffgentest " " " ")
- TARGET_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5diffgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ #add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -61,7 +61,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5diff
RUNTIME DESTINATION
@@ -70,11 +70,11 @@ INSTALL (
toolsapplications
)
-IF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
#INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
- INSTALL (
+ install (
TARGETS
ph5diff
RUNTIME DESTINATION
@@ -82,4 +82,4 @@ IF (H5_HAVE_PARALLEL)
COMPONENT
toolsapplications
)
-ENDIF (H5_HAVE_PARALLEL)
+endif (H5_HAVE_PARALLEL)
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index cac4f84..19a5fe4 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5
@@ -52,7 +52,7 @@
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt
@@ -234,55 +234,55 @@
)
# Make testfiles dir under build dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
#
# copy test files from source to build dir
#
- FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${fname}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${fname}")
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${h5_tstfiles} ${dest}
)
- ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
#
# Overwrite system dependent files (Windows)
#
- IF (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ if (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
)
- ENDIF (WIN32 AND NOT CYGWIN)
+ endif (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -292,22 +292,22 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
@@ -319,31 +319,31 @@
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (H5_HAVE_PARALLEL)
+ set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ if (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
- ENDIF (H5_HAVE_PARALLEL)
+ endif (H5_HAVE_PARALLEL)
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_PH5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME PH5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err
)
- ADD_TEST (
+ add_test (
NAME PH5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$<TARGET_FILE:ph5diff>"
@@ -357,8 +357,8 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
)
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_PH5_TEST file)
# ADD_H5_NO_OUTPUT_TEST
@@ -366,30 +366,30 @@
# Don't use this if possible; this may be removed.
MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DIFF-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err
)
# if there was a previous test
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ add_test (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
##############################################################################
@@ -401,56 +401,56 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (FILE1 h5diff_basic1.h5)
- SET (FILE2 h5diff_basic2.h5)
- SET (FILE3 h5diff_types.h5)
- SET (FILE4 h5diff_dtypes.h5)
- SET (FILE5 h5diff_attr1.h5)
- SET (FILE6 h5diff_attr2.h5)
- SET (FILE7 h5diff_dset1.h5)
- SET (FILE8 h5diff_dset2.h5)
- SET (FILE9 h5diff_hyper1.h5)
- SET (FILE10 h5diff_hyper2.h5)
- SET (FILE11 h5diff_empty.h5)
- SET (FILE12 h5diff_links.h5)
- SET (FILE13 h5diff_softlinks.h5)
- SET (FILE14 h5diff_linked_softlink.h5)
- SET (FILE15 h5diff_extlink_src.h5)
- SET (FILE16 h5diff_extlink_trg.h5)
- SET (FILE17 h5diff_ext2softlink_src.h5)
- SET (FILE18 h5diff_ext2softlink_trg.h5)
- SET (FILE19 h5diff_dset_zero_dim_size1.h5)
- SET (FILE20 h5diff_dset_zero_dim_size2.h5)
- SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
- SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
- SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
- SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
+ set (FILE1 h5diff_basic1.h5)
+ set (FILE2 h5diff_basic2.h5)
+ set (FILE3 h5diff_types.h5)
+ set (FILE4 h5diff_dtypes.h5)
+ set (FILE5 h5diff_attr1.h5)
+ set (FILE6 h5diff_attr2.h5)
+ set (FILE7 h5diff_dset1.h5)
+ set (FILE8 h5diff_dset2.h5)
+ set (FILE9 h5diff_hyper1.h5)
+ set (FILE10 h5diff_hyper2.h5)
+ set (FILE11 h5diff_empty.h5)
+ set (FILE12 h5diff_links.h5)
+ set (FILE13 h5diff_softlinks.h5)
+ set (FILE14 h5diff_linked_softlink.h5)
+ set (FILE15 h5diff_extlink_src.h5)
+ set (FILE16 h5diff_extlink_trg.h5)
+ set (FILE17 h5diff_ext2softlink_src.h5)
+ set (FILE18 h5diff_ext2softlink_trg.h5)
+ set (FILE19 h5diff_dset_zero_dim_size1.h5)
+ set (FILE20 h5diff_dset_zero_dim_size2.h5)
+ set (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
+ set (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
+ set (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
+ set (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
# group recursive - same structure via external links through files
- SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
- SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
- SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
- SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
+ set (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
+ set (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
+ set (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
+ set (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
# same structure, same obj name with different value
- SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
- SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
+ set (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
+ set (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
# different structure and obj names
- SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
- SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+ set (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
+ set (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
# Only one file contains unique objs. Common objs are same.
- SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
- SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
+ set (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
+ set (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
# compound type with multiple vlen string types
- SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
+ set (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
# container types (array,vlen) with multiple nested compound types
- SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
- SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
+ set (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
+ set (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
# attrs with verbose option level
- SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
- SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
+ set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
+ set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5DIFF-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -801,12 +801,12 @@
h5diff_90.out
h5diff_90.out.err
)
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DIFF-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# ############################################################################
# # Common usage
@@ -1074,7 +1074,7 @@ ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
# 10. read by hyperslab, print indexes
#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
# # skip this test which sometimes hangs in some THG machines
-# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10})
+# message (STATUS "SKIP -v ${FILE9} ${FILE10})
#else
# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
#fi
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 30ff215..1a46586 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5DUMP)
#-----------------------------------------------------------------------------
@@ -9,38 +9,38 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5dump executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5dump
+add_executable (h5dump
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
TARGET_NAMING (h5dump ${LIB_TYPE})
TARGET_C_PROPERTIES (h5dump " " " ")
-TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5dump PROPERTIES FOLDER tools)
+target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5dump PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5dump)
+set (H5_DEP_EXECUTABLES h5dump)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5dump test executable
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
TARGET_NAMING (h5dumpgentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5dumpgentest " " " ")
- TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5dumpgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ #add_test (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
- INCLUDE (CMakeTestsPBITS.cmake)
+ include (CMakeTestsPBITS.cmake)
- INCLUDE (CMakeTestsXML.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTestsXML.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -54,7 +54,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5dump
RUNTIME DESTINATION
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index 2784b56..319d526 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
+ set (HDF5_REFERENCE_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl
@@ -172,7 +172,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
)
- SET (HDF5_REFERENCE_EXP_FILES
+ set (HDF5_REFERENCE_EXP_FILES
tall-6.exp
tnoddlfile.exp
trawdatafile.exp
@@ -182,7 +182,7 @@
twithddl.exp
twithddlfile.exp
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
@@ -278,7 +278,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
)
- SET (HDF5_ERROR_REFERENCE_TEST_FILES
+ set (HDF5_ERROR_REFERENCE_TEST_FILES
${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
@@ -305,82 +305,82 @@
)
# make test dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
#
# copy test files from source dir to test dir
#
- FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_h5_file} ${dest}
)
- ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- IF (WIN32 AND NOT CYGWIN)
- FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
- FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ if (WIN32 AND NOT CYGWIN)
+ file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
+ file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
+ else (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
)
- ENDIF (WIN32 AND NOT CYGWIN)
- ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ endif (WIN32 AND NOT CYGWIN)
+ endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ foreach (tst_other_file ${HDF5_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_other_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_other_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_other_file} ${dest}
)
- ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ endforeach (tst_other_file ${HDF5_REFERENCE_FILES})
- FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_error_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_error_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_error_file} ${dest}
)
- ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
)
- IF (WIN32 AND NOT CYGWIN)
- FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
- FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ if (WIN32 AND NOT CYGWIN)
+ file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
+ file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
+ else (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
)
- ENDIF (WIN32 AND NOT CYGWIN)
+ endif (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -390,21 +390,21 @@
MACRO (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${testname}")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DUMP-${testname}")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-h5dump-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove h5dump-${testname}.out h5dump-${testname}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -415,42 +415,42 @@
-D "TEST_REFERENCE=h5dump-${testname}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_HELP_TEST)
MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${skipresultfile}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_SKIP_H5_TEST)
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -461,29 +461,29 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_H5_TEST_N resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-N-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-N-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -494,29 +494,29 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_N file)
MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -527,36 +527,36 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ add_test (
NAME H5DUMP-${resultfile}-output-cmp
COMMAND ${CMAKE_COMMAND}
-E compare_files ${resultfile}.txt ${resultfile}.exp
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_EXPORT file)
MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -567,57 +567,57 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ add_test (
NAME H5DUMP-${resultfile}-output-cmp
COMMAND ${CMAKE_COMMAND}
-E compare_files ${resultfile}.txt ${resultfile}.exp
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ add_test (
NAME H5DUMP-${resultfile}-output-cmp-ddl
COMMAND ${CMAKE_COMMAND}
-E compare_files ${ddlfile}.txt ${ddlfile}.exp
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_EXPORT_DDL file)
MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-output-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.txt
)
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-output-${resultfile}
COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
)
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
- ADD_TEST (
+ set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
+ add_test (
NAME H5DUMP-output-cmp-${resultfile}
COMMAND ${CMAKE_COMMAND}
-E compare_files ${resultfile}.txt ${resultfile}.exp
)
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_EXPORT_TEST file)
MACRO (ADD_H5_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -629,19 +629,19 @@
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_MASK_TEST file)
MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -654,19 +654,19 @@
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -681,20 +681,20 @@
-D "TEST_ENV_VALUE:STRING=${envval}"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-IMPORT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5
)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
+ set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ add_test (
NAME H5DUMP-IMPORT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -705,14 +705,14 @@
-D "TEST_REFERENCE=${conffile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
- ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
- ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
+ add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
+ set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
+ add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
+ set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_IMPORT file)
##############################################################################
@@ -721,9 +721,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5DUMP-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -1048,12 +1048,12 @@
zerodim.out
zerodim.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DUMP-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ADD_HELP_TEST(help 0 -h)
@@ -1321,38 +1321,38 @@
# filters are defined.
# detect whether the encoder is present.
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
- IF (H5_HAVE_FILTER_SZIP)
- SET (USE_FILTER_SZIP "true")
- ENDIF (H5_HAVE_FILTER_SZIP)
+ if (H5_HAVE_FILTER_SZIP)
+ set (USE_FILTER_SZIP "true")
+ endif (H5_HAVE_FILTER_SZIP)
- IF (H5_HAVE_FILTER_SHUFFLE)
- SET (USE_FILTER_SHUFFLE "true")
- ENDIF (H5_HAVE_FILTER_SHUFFLE)
+ if (H5_HAVE_FILTER_SHUFFLE)
+ set (USE_FILTER_SHUFFLE "true")
+ endif (H5_HAVE_FILTER_SHUFFLE)
- IF (H5_HAVE_FILTER_FLETCHER32)
- SET (USE_FILTER_FLETCHER32 "true")
- ENDIF (H5_HAVE_FILTER_FLETCHER32)
+ if (H5_HAVE_FILTER_FLETCHER32)
+ set (USE_FILTER_FLETCHER32 "true")
+ endif (H5_HAVE_FILTER_FLETCHER32)
- IF (H5_HAVE_FILTER_NBIT)
- SET (USE_FILTER_NBIT "true")
- ENDIF (H5_HAVE_FILTER_NBIT)
+ if (H5_HAVE_FILTER_NBIT)
+ set (USE_FILTER_NBIT "true")
+ endif (H5_HAVE_FILTER_NBIT)
- IF (H5_HAVE_FILTER_SCALEOFFSET)
- SET (USE_FILTER_SCALEOFFSET "true")
- ENDIF (H5_HAVE_FILTER_SCALEOFFSET)
+ if (H5_HAVE_FILTER_SCALEOFFSET)
+ set (USE_FILTER_SCALEOFFSET "true")
+ endif (H5_HAVE_FILTER_SCALEOFFSET)
- IF (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ if (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
# data read internal filters
ADD_H5_TEST (treadintfilter 0 --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5)
- IF (HDF5_ENABLE_SZIP_SUPPORT)
+ if (HDF5_ENABLE_SZIP_SUPPORT)
# data read all filters
ADD_H5_TEST (treadfilter 0 --enable-error-stack -d all -d szip tfilters.h5)
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
- ENDIF (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ endif (HDF5_ENABLE_SZIP_SUPPORT)
+ endif (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
# test for displaying objects with very long names
ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
@@ -1385,16 +1385,16 @@
# NATIVE default. the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
# the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index baa1705..a920198 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -9,7 +9,7 @@
# Packed Bits
# --------------------------------------------------------------------
#-- Copy all the HDF5 files from the test directory into the source directory
- SET (HDF5_REFERENCE_PBITS
+ set (HDF5_REFERENCE_PBITS
${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
@@ -64,12 +64,12 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
)
- SET (HDF5_REFERENCE_TEST_PBITS
+ set (HDF5_REFERENCE_TEST_PBITS
${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
)
- SET (HDF5_ERROR_REFERENCE_PBITS
+ set (HDF5_ERROR_REFERENCE_PBITS
${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
@@ -85,42 +85,42 @@
${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
)
- FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${pbits_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${pbits_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${pbits_h5_file} ${dest}
)
- ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${ddl_pbits}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
)
- ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS})
- FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${ddl_pbits}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
)
- ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
##############################################################################
##############################################################################
@@ -130,23 +130,23 @@
MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_pbits_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_pbits_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
+ endif (NOT "${last_pbits_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- ADD_TEST (
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -157,8 +157,8 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_PBITS_TEST file)
##############################################################################
@@ -167,9 +167,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5DUMP_PACKED_BITS-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -280,12 +280,12 @@
tpbitsUnsignedLongLong16.out
tpbitsUnsignedLongLong16.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT "${last_pbits_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ if (NOT "${last_pbits_test}" STREQUAL "")
+ set_tests_properties (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
+ endif (NOT "${last_pbits_test}" STREQUAL "")
+ set (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# test failure handling
# Missing file name
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index 6c9cae1..ffc1cae 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -8,7 +8,7 @@
#
# copy XML test files from source dir to test dir
#
- SET (HDF5_XML_REFERENCE_TEST_FILES
+ set (HDF5_XML_REFERENCE_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
@@ -61,7 +61,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
)
- SET (HDF5_XML_REFERENCE_FILES
+ set (HDF5_XML_REFERENCE_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml
@@ -127,29 +127,29 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml
)
- FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #message (STATUS " Copying ${tst_xml_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
)
- ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_other_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #message (STATUS " Copying ${tst_xml_other_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
)
- ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
##############################################################################
##############################################################################
@@ -158,36 +158,36 @@
##############################################################################
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-XML-${skipresultfile}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_XML_SKIP_H5_TEST)
MACRO (ADD_XML_H5_TEST resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_xml_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
+ set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_xml_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
+ endif (NOT "${last_xml_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5DUMP-XML-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- ADD_TEST (
+ set_tests_properties (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ add_test (
NAME H5DUMP-XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -198,8 +198,8 @@
-D "TEST_REFERENCE=${resultfile}.xml"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_XML_H5_TEST file)
##############################################################################
@@ -208,9 +208,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5DUMP-XML-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -343,12 +343,12 @@
tvlstr.h5.out
tvlstr.h5.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT "${last_xml_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- SET (last_test "H5DUMP-XML-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ if (NOT "${last_xml_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
+ endif (NOT "${last_xml_test}" STREQUAL "")
+ set (last_test "H5DUMP-XML-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
########## test XML
ADD_XML_H5_TEST (tall.h5 0 tall.h5)
@@ -413,10 +413,10 @@
# The lone colon here confuses some systems (Cray X1). Skip
# it if configure detects that this is a problem.
- SET (TESTTYPE "TEST")
- IF (NOT "H5_LONE_COLON")
- SET (TESTTYPE "SKIP")
- ENDIF (NOT "H5_LONE_COLON")
+ set (TESTTYPE "TEST")
+ if (NOT "H5_LONE_COLON")
+ set (TESTTYPE "SKIP")
+ endif (NOT "H5_LONE_COLON")
ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 7caf44a..36a3a9e 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5IMPORT)
#-----------------------------------------------------------------------------
@@ -9,28 +9,28 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
+add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
TARGET_NAMING (h5import ${LIB_TYPE})
TARGET_C_PROPERTIES (h5import " " " ")
-TARGET_LINK_LIBRARIES (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-#SET_TARGET_PROPERTIES (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT)
-SET_TARGET_PROPERTIES (h5import PROPERTIES FOLDER tools)
+target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+#set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT)
+set_target_properties (h5import PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5import)
+set (H5_DEP_EXECUTABLES h5import)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
- ADD_EXECUTABLE (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
+ add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
TARGET_NAMING (h5importtest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5importtest " " " ")
- TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5importtest PROPERTIES FOLDER tools)
+ target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5importtest PROPERTIES FOLDER tools)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -44,7 +44,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5import
RUNTIME DESTINATION
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 96cca87..5c5b4de 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
- SET (HDF5_REFERENCE_CONF_FILES
+ set (HDF5_REFERENCE_CONF_FILES
binfp64.conf
binin8.conf
binin8w.conf
@@ -23,7 +23,7 @@
textpfe.conf
txtstr.conf
)
- SET (HDF5_REFERENCE_TXT_FILES
+ set (HDF5_REFERENCE_TXT_FILES
txtfp32.txt
txtfp64.txt
txtuin16.txt
@@ -42,7 +42,7 @@
dbinuin32.h5.txt
dtxtstr.h5.txt
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
binfp64.h5
binin8.h5
binin8w.h5
@@ -61,39 +61,39 @@
textpfe.h5
)
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
- #MESSAGE (STATUS " Copying ${conf_file}")
- ADD_CUSTOM_COMMAND (
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
+ #message (STATUS " Copying ${conf_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
)
- ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #message (STATUS " Copying ${txt_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
)
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
##############################################################################
##############################################################################
@@ -102,13 +102,13 @@
##############################################################################
MACRO (ADD_H5_TEST testname importfile conffile testfile)
# If using memchecker skip macro based tests
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5IMPORT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -118,12 +118,12 @@
${testfile}.out
${testfile}.out.err
)
- SET_TESTS_PROPERTIES (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
+ set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
- ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
+ add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
- ADD_TEST (
+ add_test (
NAME H5IMPORT-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -135,8 +135,8 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
- ADD_TEST (
+ set_tests_properties (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
+ add_test (
NAME H5IMPORT-${testname}-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -148,14 +148,14 @@
-D "TEST_REFERENCE=${testfile}.new"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
# If using memchecker skip tests
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5IMPORT-DUMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -168,10 +168,10 @@
d${testfile}.dff
d${testfile}.dff.err
)
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
+ set_tests_properties (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
- IF ("${ARGN}" STREQUAL "BINARY")
- ADD_TEST (
+ if ("${ARGN}" STREQUAL "BINARY")
+ add_test (
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -182,8 +182,8 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ELSE ("${ARGN}" STREQUAL "BINARY")
- ADD_TEST (
+ else ("${ARGN}" STREQUAL "BINARY")
+ add_test (
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -194,10 +194,10 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ENDIF ("${ARGN}" STREQUAL "BINARY")
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
+ endif ("${ARGN}" STREQUAL "BINARY")
+ set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
- ADD_TEST (
+ add_test (
NAME H5IMPORT-DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5import>"
@@ -208,9 +208,9 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
+ set_tests_properties (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
- ADD_TEST (
+ add_test (
NAME H5IMPORT-DUMP-${testname}-H5DFF
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
@@ -222,25 +222,25 @@
-D "TEST_REFERENCE=testfiles/d${testfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5IMPORT-DUMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
# --------------------------------------------------------------------
# Determine if filter is available for h5diff
# --------------------------------------------------------------------
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
##############################################################################
##############################################################################
@@ -248,9 +248,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5IMPORT-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -406,10 +406,10 @@
dtxtstr.h5.dff
dtxtstr.h5.dff.err
)
- SET (last_test "H5IMPORT-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set (last_test "H5IMPORT-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5IMPORT-h5importtest-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -421,13 +421,13 @@
binuin16.bin
binuin32.bin
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5IMPORT-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5IMPORT-clear-objects")
- ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
- SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects)
+ add_test (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
+ set_tests_properties (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects)
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
@@ -452,19 +452,19 @@
# ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5)
- IF (NOT USE_FILTER_DEFLATE)
+ if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
+ else (NOT USE_FILTER_DEFLATE)
ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
+ endif (NOT USE_FILTER_DEFLATE)
# ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
- IF (NOT USE_FILTER_DEFLATE)
+ if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
+ else (NOT USE_FILTER_DEFLATE)
ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
+ endif (NOT USE_FILTER_DEFLATE)
# ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 49d1b0c..b0d5ac8 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5JAM)
#-----------------------------------------------------------------------------
@@ -9,54 +9,54 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5jam executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
+add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
TARGET_NAMING (h5jam ${LIB_TYPE})
TARGET_C_PROPERTIES (h5jam " " " ")
-TARGET_LINK_LIBRARIES (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5jam PROPERTIES FOLDER tools)
+target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5jam PROPERTIES FOLDER tools)
-ADD_EXECUTABLE (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
+add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
TARGET_NAMING (getub ${LIB_TYPE})
TARGET_C_PROPERTIES (getub " " " ")
-TARGET_LINK_LIBRARIES (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (getub PROPERTIES FOLDER tools)
+target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (getub PROPERTIES FOLDER tools)
-ADD_EXECUTABLE (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
+add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
TARGET_NAMING (tellub ${LIB_TYPE})
TARGET_C_PROPERTIES (tellub " " " ")
-TARGET_LINK_LIBRARIES (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (tellub PROPERTIES FOLDER tools)
+target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (tellub PROPERTIES FOLDER tools)
-ADD_EXECUTABLE (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
+add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
TARGET_NAMING (h5unjam ${LIB_TYPE})
TARGET_C_PROPERTIES (h5unjam " " " ")
-TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5unjam PROPERTIES FOLDER tools)
+target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5unjam PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5jam
getub
tellub
h5unjam
)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5jam test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
TARGET_NAMING (h5jamgentest ${LIB_TYPE})
TARGET_C_PROPERTIES (testhdf5 " " " ")
- TARGET_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5jamgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ #add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -70,7 +70,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5jam h5unjam
RUNTIME DESTINATION
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index 3816e85..fb64313 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
- SET (HDF5_REFERENCE_TXT_FILES
+ set (HDF5_REFERENCE_TXT_FILES
u10.txt
u511.txt
u512.txt
@@ -14,34 +14,34 @@
h5unjam-help.txt
h5jam-ub-nohdf5.txt
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
tall.h5
twithub.h5
twithub513.h5
)
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5jam
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #message (STATUS " Copying ${txt_file}")
+ add_custom_command (
TARGET h5jam
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
)
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
##############################################################################
##############################################################################
@@ -55,20 +55,20 @@
#
MACRO (TEST_H5JAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
- SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT "${resultcode}" STREQUAL "0")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
+ if (NOT "${resultcode}" STREQUAL "0")
+ set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT "${resultcode}" STREQUAL "0")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
${expectfile}.out
${expectfile}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5JAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5jam>"
@@ -79,8 +79,8 @@
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5JAM_OUTPUT)
# ============================================================
@@ -89,20 +89,20 @@
#
MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT "${resultcode}" STREQUAL "0")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
+ if (NOT "${resultcode}" STREQUAL "0")
+ set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT "${resultcode}" STREQUAL "0")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-UNJAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
${expectfile}.out
${expectfile}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5JAM-UNJAM-${expectfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
@@ -113,14 +113,14 @@
-D "TEST_REFERENCE=testfiles/${expectfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5UNJAM_OUTPUT)
MACRO (CHECKFILE testname testdepends expected actual)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-${testname}-CHECKFILE-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -129,8 +129,8 @@
${actual}.out
${actual}.out.err
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
+ add_test (
NAME H5JAM-${testname}-CHECKFILE-H5DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -142,8 +142,8 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
+ add_test (
NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -155,43 +155,43 @@
-D "TEST_REFERENCE=${actual}.new"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO(CHECKFILE testname testdepends expected actual)
MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${infile}
)
- ADD_TEST (
+ add_test (
NAME H5JAM-${testname}-UNJAM-SETUP
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile}
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
+ add_test (
NAME H5JAM-${testname}-UNJAM-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
- IF (NOT "${ufile}" STREQUAL "NONE")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
+ if (NOT "${ufile}" STREQUAL "NONE")
+ add_test (
NAME H5JAM-${testname}-UNJAM_D-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
- SET (compare_test ${ufile})
- ELSE (NOT "${ufile}" STREQUAL "NONE")
- IF (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
+ set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ set (compare_test ${ufile})
+ else (NOT "${ufile}" STREQUAL "NONE")
+ if (NOT "${ARGN}" STREQUAL "--delete")
+ add_test (
NAME H5JAM-${testname}-UNJAM_D-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ add_test (
NAME H5JAM-${testname}-UNJAM
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
@@ -202,16 +202,16 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
- SET (compare_test "${outfile}.ufile.txt")
- ELSE (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- SET (compare_test "")
- ENDIF (NOT "${ARGN}" STREQUAL "--delete")
- ENDIF (NOT "${ufile}" STREQUAL "NONE")
- IF (NOT "${compare_test}" STREQUAL "")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ set (compare_test "${outfile}.ufile.txt")
+ else (NOT "${ARGN}" STREQUAL "--delete")
+ add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
+ set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ set (compare_test "")
+ endif (NOT "${ARGN}" STREQUAL "--delete")
+ endif (NOT "${ufile}" STREQUAL "NONE")
+ if (NOT "${compare_test}" STREQUAL "")
+ add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -219,8 +219,8 @@
${infile}.cmp
${infile}-ub.cmp
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
+ add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_UB_1
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
@@ -233,10 +233,10 @@
-D "TEST_OFILE="
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
- ENDIF (NOT "${compare_test}" STREQUAL "")
+ set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
+ endif (NOT "${compare_test}" STREQUAL "")
- ADD_TEST (
+ add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
@@ -249,33 +249,33 @@
-D "TEST_OFILE=NULL"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- IF (NOT "${compare_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
- ELSE (NOT "${compare_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
- ENDIF (NOT "${compare_test}" STREQUAL "")
+ if (NOT "${compare_test}" STREQUAL "")
+ set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
+ else (NOT "${compare_test}" STREQUAL "")
+ set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
+ endif (NOT "${compare_test}" STREQUAL "")
CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO(UNJAMTEST testname infile ufile outfile)
MACRO (JAMTEST testname jamfile infile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
- SET (compare_test ${outfile})
- SET (compare_orig testfiles/${infile})
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
-
- ADD_TEST (
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
+ set (compare_test ${outfile})
+ set (compare_orig testfiles/${infile})
+ if ("${ARGN}" STREQUAL "--clobber")
+ set (compare_orig "")
+ endif ("${ARGN}" STREQUAL "--clobber")
+
+ add_test (
NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -283,8 +283,8 @@
${compare_test}.cmp
${compare_test}-ub.cmp
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
+ add_test (
NAME H5JAM-${testname}-CHECK_UB_1
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
@@ -297,40 +297,40 @@
-D "TEST_OFILE=${compare_orig}"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
+ set_tests_properties (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (JAMTEST testname jamfile infile outfile)
MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5JAM-${testname}_NONE-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
${chkfile} ${chkfile}.cpy.h5
)
- ADD_TEST (
+ add_test (
NAME H5JAM-${testname}_NONE-SETUP
COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile}
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)
+ set_tests_properties (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)
- ADD_TEST (
+ add_test (
NAME H5JAM-${testname}_NONE_COPY
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
+ set_tests_properties (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
- ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
+ add_test (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
+ set_tests_properties (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
- SET (compare_test ${chkfile})
- SET (compare_orig ${chkfile}.cpy.h5)
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
+ set (compare_test ${chkfile})
+ set (compare_orig ${chkfile}.cpy.h5)
+ if ("${ARGN}" STREQUAL "--clobber")
+ set (compare_orig "")
+ endif ("${ARGN}" STREQUAL "--clobber")
- ADD_TEST (
+ add_test (
NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -338,8 +338,8 @@
${compare_test}.cmp
${compare_test}-ub.cmp
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
- ADD_TEST (
+ set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
+ add_test (
NAME H5JAM-${testname}_NONE-CHECK_UB_1
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
@@ -352,9 +352,9 @@
-D "TEST_OFILE=${compare_orig}"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
+ set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
##############################################################################
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index eeaf1ea..5220087 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5LS)
#-----------------------------------------------------------------------------
@@ -9,21 +9,21 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
#-----------------------------------------------------------------------------
# Add the h5ls executable
#-----------------------------------------------------------------------------
-ADD_EXECUTABLE (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
+add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
TARGET_NAMING (h5ls ${LIB_TYPE})
TARGET_C_PROPERTIES (h5ls " " " ")
-TARGET_LINK_LIBRARIES (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5ls PROPERTIES FOLDER tools)
+target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5ls PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5ls
)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -37,7 +37,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5ls
RUNTIME DESTINATION
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index 09f375d..b739130 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the test files from source directory to test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
@@ -33,7 +33,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls
@@ -92,20 +92,20 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls
)
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
# copy the list of test files
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles} to ${dest}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${listfiles} to ${dest}")
+ add_custom_command (
TARGET h5ls
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${listfiles} ${dest}
)
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
@@ -116,22 +116,22 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5LS-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
@@ -142,8 +142,8 @@
-D "TEST_REFERENCE=${resultfile}.ls"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -152,9 +152,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5LS-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -265,11 +265,11 @@
tvldtypes2be.out
tvldtypes2be.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5LS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5LS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# test the help syntax
ADD_H5_TEST (help-1 0 -w80 -h)
@@ -378,25 +378,25 @@
# test for attribute with region references wo verbose mode
# ( HDFFV-7838, )
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
# test for non-existing file
ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
# test for variable length data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
# test for dataset region references data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 176fc2b..4d26c0c 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5REPACK)
#-----------------------------------------------------------------------------
@@ -10,7 +10,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Add h5Repack executables
# --------------------------------------------------------------------
-SET (REPACK_COMMON_SRCS
+set (REPACK_COMMON_SRCS
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_copy.c
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_filters.c
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_opttable.c
@@ -20,43 +20,43 @@ SET (REPACK_COMMON_SRCS
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack.c
)
-ADD_EXECUTABLE (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
+add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
TARGET_NAMING (h5repack ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repack " " " ")
-TARGET_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5repack PROPERTIES FOLDER tools)
+target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5repack PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5repack)
+set (H5_DEP_EXECUTABLES h5repack)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add h5Repack test executables
# --------------------------------------------------------------------
- ADD_EXECUTABLE (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
+ add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE})
TARGET_C_PROPERTIES (testh5repack_detect_szip " " " ")
- TARGET_LINK_LIBRARIES (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (testh5repack_detect_szip PROPERTIES FOLDER tools)
+ target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools)
- ADD_EXECUTABLE (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
+ add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
TARGET_NAMING (h5repacktest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repacktest " " " ")
- TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools)
+ target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (h5repacktest PROPERTIES FOLDER tools)
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
- IF (BUILD_SHARED_LIBS)
- SET (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
- SET (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
- SET (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ if (BUILD_SHARED_LIBS)
+ set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
+ set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
+ set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
+ add_definitions (${HDF5_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- ADD_LIBRARY (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c)
+ add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ")
- TARGET_LINK_LIBRARIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
${LIB_TYPE}
@@ -65,11 +65,11 @@ IF (BUILD_TESTING)
)
# make plugins dir
- FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -77,11 +77,11 @@ IF (BUILD_TESTING)
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -95,7 +95,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5repack
RUNTIME DESTINATION
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 3252c30..430defc 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -5,8 +5,8 @@
##############################################################################
##############################################################################
- IF (HDF5_TEST_VFD)
- SET (VFD_LIST
+ if (HDF5_TEST_VFD)
+ set (VFD_LIST
sec2
stdio
core
@@ -15,12 +15,12 @@
family
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
- ADD_TEST (
+ add_test (
NAME H5REPACK-VFD-${vfdname}-h5repacktest
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
@@ -31,17 +31,17 @@
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
ENDMACRO (ADD_VFD_TEST)
- ENDIF (HDF5_TEST_VFD)
+ endif (HDF5_TEST_VFD)
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
@@ -79,7 +79,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack-help.txt
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
@@ -93,17 +93,17 @@
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5.tst
)
- FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5repack
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
##############################################################################
@@ -113,21 +113,21 @@
MACRO (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-${testname}")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
+ set_tests_properties (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPACK-${testname}")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK-h5repack-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove h5repack-${testname}.out h5repack-${testname}.out.err
)
- SET_TESTS_PROPERTIES (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ADD_TEST (
+ set_tests_properties (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (
NAME H5REPACK-h5repack-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -138,74 +138,74 @@
-D "TEST_REFERENCE=h5repack-${testname}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_HELP_TEST)
MACRO (ADD_H5_TEST_OLD testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_OLD-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_TEST (
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
+ add_test (
NAME H5REPACK_OLD-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ add_test (
NAME H5REPACK_OLD-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
- ENDIF (${testtype} STREQUAL "SKIP")
+ set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST_OLD)
MACRO (ADD_H5_TEST testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_TEST (
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
+ add_test (
NAME H5REPACK-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ add_test (
NAME H5REPACK-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
- ENDIF (${testtype} STREQUAL "SKIP")
+ set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST)
MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_CMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_CMP-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -217,31 +217,31 @@
-D "TEST_REFERENCE=${resultfile}.tst"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_DMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
- ADD_TEST (
+ add_test (
NAME H5REPACK_DMP-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -252,35 +252,35 @@
-D "TEST_REFERENCE=${testname}.${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDIF (${testtype} STREQUAL "SKIP")
+ set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_DMP_TEST)
MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
- IF (${resultcode} STREQUAL "0")
- ADD_TEST (
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
+ if (${resultcode} STREQUAL "0")
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -292,18 +292,18 @@
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- ELSE (${resultcode} STREQUAL "0")
- IF (${testfilter} STREQUAL "CHUNKED")
- SET (nottestfilter "(CONTIGUOUS|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CHUNKED")
- IF (${testfilter} STREQUAL "CONTIGUOUS")
- SET (nottestfilter "(CHUNK|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
- IF (${testfilter} STREQUAL "COMPACT")
- SET (nottestfilter "(CONTIGUOUS|CHUNK)")
- ENDIF (${testfilter} STREQUAL "COMPACT")
- ADD_TEST (
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
+ else (${resultcode} STREQUAL "0")
+ if (${testfilter} STREQUAL "CHUNKED")
+ set (nottestfilter "(CONTIGUOUS|COMPACT)")
+ endif (${testfilter} STREQUAL "CHUNKED")
+ if (${testfilter} STREQUAL "CONTIGUOUS")
+ set (nottestfilter "(CHUNK|COMPACT)")
+ endif (${testfilter} STREQUAL "CONTIGUOUS")
+ if (${testfilter} STREQUAL "COMPACT")
+ set (nottestfilter "(CONTIGUOUS|CHUNK)")
+ endif (${testfilter} STREQUAL "COMPACT")
+ add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -315,35 +315,35 @@
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- ENDIF (${resultcode} STREQUAL "0")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDIF (${testtype} STREQUAL "SKIP")
+ set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
+ endif (${resultcode} STREQUAL "0")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_VERIFY_TEST)
MACRO (ADD_H5_TEST_META testname testfile)
- ADD_TEST (
+ add_test (
NAME H5REPACK_META-${testname}_N
COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ add_test (
NAME H5REPACK_META-${testname}_M
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N)
+ set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N)
- ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true")
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
+ add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true")
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
ENDMACRO (ADD_H5_TEST_META)
MACRO (ADD_H5_UD_TEST testname resultcode resultfile)
- IF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5REPACK_UD-${testname}-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -353,7 +353,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5REPACK_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
@@ -367,8 +367,8 @@
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects)
- ADD_TEST (
+ set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clearall-objects)
+ add_test (
NAME H5REPACK_UD-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
@@ -381,8 +381,8 @@
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
- ENDIF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
+ endif (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_UD_TEST)
##############################################################################
@@ -394,30 +394,30 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (INFO_FILE testfiles/h5repack.info)
-
- SET (FILE0 h5repack_fill.h5)
- SET (FILE1 h5repack_objs.h5)
- SET (FILE2 h5repack_attr.h5)
- SET (FILE3 h5repack_hlink.h5)
- SET (FILE4 h5repack_layout.h5)
- SET (FILE5 h5repack_early.h5)
- SET (FILE7 h5repack_szip.h5)
- SET (FILE8 h5repack_deflate.h5)
- SET (FILE9 h5repack_shuffle.h5)
- SET (FILE10 h5repack_fletcher.h5)
- SET (FILE11 h5repack_filters.h5)
- SET (FILE12 h5repack_nbit.h5)
- SET (FILE13 h5repack_soffset.h5)
- SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
- SET (FILE15 h5repack_named_dtypes.h5)
- SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
- SET (FILE18 h5repack_layout2.h5)
- SET (FILE_REF h5repack_refs.h5)
- SET (FILE_ATTR_REF h5repack_attr_refs.h5)
+ set (INFO_FILE testfiles/h5repack.info)
+
+ set (FILE0 h5repack_fill.h5)
+ set (FILE1 h5repack_objs.h5)
+ set (FILE2 h5repack_attr.h5)
+ set (FILE3 h5repack_hlink.h5)
+ set (FILE4 h5repack_layout.h5)
+ set (FILE5 h5repack_early.h5)
+ set (FILE7 h5repack_szip.h5)
+ set (FILE8 h5repack_deflate.h5)
+ set (FILE9 h5repack_shuffle.h5)
+ set (FILE10 h5repack_fletcher.h5)
+ set (FILE11 h5repack_filters.h5)
+ set (FILE12 h5repack_nbit.h5)
+ set (FILE13 h5repack_soffset.h5)
+ set (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
+ set (FILE15 h5repack_named_dtypes.h5)
+ set (FILE16 tfamily%05d.h5) # located in common testfiles folder
+ set (FILE18 h5repack_layout2.h5)
+ set (FILE_REF h5repack_refs.h5)
+ set (FILE_ATTR_REF h5repack_attr_refs.h5)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -597,30 +597,30 @@
h5repack_ext.bin
ublock.bin
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
ADD_HELP_TEST(help 0 -h)
- ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
- IF (HDF5_ENABLE_SZIP_SUPPORT)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (passRegex "yes")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes")
- ELSE (HDF5_ENABLE_SZIP_ENCODING)
- SET (passRegex "no")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
- ELSE (HDF5_ENABLE_SZIP_SUPPORT)
- SET (passRegex "no")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
-
- ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
- SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
- SET (last_test "H5REPACK-h5repacktest")
+ add_test (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
+ if (HDF5_ENABLE_SZIP_SUPPORT)
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (passRegex "yes")
+ set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes")
+ else (HDF5_ENABLE_SZIP_ENCODING)
+ set (passRegex "no")
+ set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
+ endif (HDF5_ENABLE_SZIP_ENCODING)
+ else (HDF5_ENABLE_SZIP_SUPPORT)
+ set (passRegex "no")
+ set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
+ endif (HDF5_ENABLE_SZIP_SUPPORT)
+ set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
+
+ add_test (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
+ set_tests_properties (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
+ set (last_test "H5REPACK-h5repacktest")
#
# The tests
@@ -636,34 +636,34 @@
# filters are defined.
# detect whether the encoder is present.
- SET (USE_FILTER_SZIP_ENCODER "no")
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
-
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
-
- IF (H5_HAVE_FILTER_SZIP)
- SET (USE_FILTER_SZIP "true")
- ENDIF (H5_HAVE_FILTER_SZIP)
-
- IF (H5_HAVE_FILTER_SHUFFLE)
- SET (USE_FILTER_SHUFFLE "true")
- ENDIF (H5_HAVE_FILTER_SHUFFLE)
-
- IF (H5_HAVE_FILTER_FLETCHER32)
- SET (USE_FILTER_FLETCHER32 "true")
- ENDIF (H5_HAVE_FILTER_FLETCHER32)
-
- IF (H5_HAVE_FILTER_NBIT)
- SET (USE_FILTER_NBIT "true")
- ENDIF (H5_HAVE_FILTER_NBIT)
-
- IF (H5_HAVE_FILTER_SCALEOFFSET)
- SET (USE_FILTER_SCALEOFFSET "true")
- ENDIF (H5_HAVE_FILTER_SCALEOFFSET)
+ set (USE_FILTER_SZIP_ENCODER "no")
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
+ endif (HDF5_ENABLE_SZIP_ENCODING)
+
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
+
+ if (H5_HAVE_FILTER_SZIP)
+ set (USE_FILTER_SZIP "true")
+ endif (H5_HAVE_FILTER_SZIP)
+
+ if (H5_HAVE_FILTER_SHUFFLE)
+ set (USE_FILTER_SHUFFLE "true")
+ endif (H5_HAVE_FILTER_SHUFFLE)
+
+ if (H5_HAVE_FILTER_FLETCHER32)
+ set (USE_FILTER_FLETCHER32 "true")
+ endif (H5_HAVE_FILTER_FLETCHER32)
+
+ if (H5_HAVE_FILTER_NBIT)
+ set (USE_FILTER_NBIT "true")
+ endif (H5_HAVE_FILTER_NBIT)
+
+ if (H5_HAVE_FILTER_SCALEOFFSET)
+ set (USE_FILTER_SCALEOFFSET "true")
+ endif (H5_HAVE_FILTER_SCALEOFFSET)
# copy files (these files have no filters)
ADD_H5_TEST (fill "TEST" ${FILE0})
@@ -676,83 +676,83 @@
# use $FILE4 to write some filters (this file has no filters)
# gzip with individual object
- SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
# gzip for all
- SET (arg ${FILE4} -f GZIP=1)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f GZIP=1)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg})
# szip with individual object
- SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
# szip for all
- SET (arg ${FILE4} -f SZIP=8,NN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (arg ${FILE4} -f SZIP=8,NN)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
# shuffle with individual object
- SET (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg})
# shuffle for all
- SET (arg ${FILE4} -f SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE4} -f SHUF)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg})
# fletcher32 with individual object
- SET (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ set (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_FLETCHER32)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_FLETCHER32)
ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg})
# fletcher32 for all
- SET (arg ${FILE4} -f FLET)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ set (arg ${FILE4} -f FLET)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_FLETCHER32)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_FLETCHER32)
ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg})
# all filters
- SET (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (all_filters ${TESTTYPE} ${arg})
# verbose gzip with individual object
- SET (arg ${FILE11} -v -f /dset_deflate:GZIP=9)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE11} -v -f /dset_deflate:GZIP=9)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
@@ -760,154 +760,154 @@
###########################################################
# szip copy
- SET (arg ${FILE7})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (arg ${FILE7})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
# szip remove
- SET (arg ${FILE7} --filter=dset_szip:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (arg ${FILE7} --filter=dset_szip:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
# deflate copy
- SET (arg ${FILE8})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE8})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg})
# deflate remove
- SET (arg ${FILE8} -f dset_deflate:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE8} -f dset_deflate:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
# shuffle copy
- SET (arg ${FILE9})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE9})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg})
# shuffle remove
- SET (arg ${FILE9} -f dset_shuffle:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE9} -f dset_shuffle:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg})
# fletcher32 copy
- SET (arg ${FILE10})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ set (arg ${FILE10})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_FLETCHER32)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_FLETCHER32)
ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg})
# fletcher32 remove
- SET (arg ${FILE10} -f dset_fletcher32:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ set (arg ${FILE10} -f dset_fletcher32:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_FLETCHER32)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_FLETCHER32)
ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg})
# nbit copy
- SET (arg ${FILE12})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
+ set (arg ${FILE12})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_NBIT)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_NBIT)
ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg})
# nbit remove
- SET (arg ${FILE12} -f dset_nbit:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
+ set (arg ${FILE12} -f dset_nbit:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_NBIT)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_NBIT)
ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg})
# nbit add
- SET (arg ${FILE12} -f dset_int31:NBIT)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
+ set (arg ${FILE12} -f dset_int31:NBIT)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_NBIT)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_NBIT)
ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg})
# scaleoffset copy
- SET (arg ${FILE13})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ set (arg ${FILE13})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SCALEOFFSET)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SCALEOFFSET)
ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg})
# scaleoffset add
- SET (arg ${FILE13} -f dset_none:SOFF=31,IN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ set (arg ${FILE13} -f dset_none:SOFF=31,IN)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SCALEOFFSET)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SCALEOFFSET)
ADD_H5_TEST (scale_add ${TESTTYPE} ${arg})
# scaleoffset remove
- SET (arg ${FILE13} -f dset_scaleoffset:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ set (arg ${FILE13} -f dset_scaleoffset:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SCALEOFFSET)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SCALEOFFSET)
ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg})
# remove all filters
- SET (arg ${FILE11} -f NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
+ set (arg ${FILE11} -f NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
ADD_H5_TEST (remove_all ${TESTTYPE} ${arg})
#filter conversions
- SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
- SET (arg ${FILE7} -f dset_szip:GZIP=1)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE7} -f dset_szip:GZIP=1)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
#limit
- SET (arg ${FILE4} -f GZIP=1 -m 1024)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f GZIP=1 -m 1024)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_DMP_TEST (deflate_limit ${TESTTYPE} 0 ${arg})
#file
- SET (arg ${FILE4} -e ${INFO_FILE})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -e ${INFO_FILE})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
#########################################################
@@ -990,44 +990,44 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO
ADD_H5_TEST (native_attr "TEST" ${FILE2} -n)
# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# several global filters
- SET (arg ${FILE4} --filter GZIP=1 --filter SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE4} --filter GZIP=1 --filter SHUF)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (global_filters ${TESTTYPE} ${arg})
# syntax of -i infile -o outfile
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "LEGACY")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ set (TESTTYPE "LEGACY")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg})
# add a userblock to file
- SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
+ set (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
ADD_H5_TEST (add_userblock "TEST" ${arg})
# add alignment
- SET (arg ${FILE1} -t 1 -a 1)
+ set (arg ${FILE1} -t 1 -a 1)
ADD_H5_TEST (add_alignment "TEST" ${arg})
# Check repacking file with old version of layout message (should get upgraded
@@ -1064,20 +1064,20 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO
##############################################################################
### P L U G I N T E S T S
##############################################################################
-IF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE)
-ELSE (BUILD_SHARED_LIBS)
- MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
- ADD_TEST (
+else (BUILD_SHARED_LIBS)
+ message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ add_test (
NAME H5REPACK-plugin
COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
)
-ENDIF (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS)
- IF (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
- ENDIF (HDF5_TEST_VFD)
+ endforeach (vfd ${VFD_LIST})
+ endif (HDF5_TEST_VFD)
diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am
index 663e501..f02bb45 100644
--- a/tools/h5repack/Makefile.am
+++ b/tools/h5repack/Makefile.am
@@ -64,7 +64,7 @@ h5repack.sh.chkexe_: h5repacktst.chkexe_
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
lib_LTLIBRARIES=libdynlibadd.la
- libdynlibadd_la_SOURCES=$(top_srcdir)/test/dynlib1.c
+ libdynlibadd_la_SOURCES=dynlib_rpk.c
install-exec-hook:
$(RM) $(DESTDIR)$(libdir)/*dynlib*
@@ -72,7 +72,7 @@ endif
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
-CHECK_CLEANFILES+=*.h5 *.bin
+CHECK_CLEANFILES+=*.h5 *.bin testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
DISTCLEANFILES=h5repack.sh h5repack_plugin.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 8ea55d9..5951d2e 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -117,8 +117,9 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libdynlibadd_la_LIBADD =
-am__libdynlibadd_la_SOURCES_DIST = $(top_srcdir)/test/dynlib1.c
-@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_OBJECTS = dynlib1.lo
+am__libdynlibadd_la_SOURCES_DIST = dynlib_rpk.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_OBJECTS = \
+@HAVE_SHARED_CONDITIONAL_TRUE@ dynlib_rpk.lo
libdynlibadd_la_OBJECTS = $(am_libdynlibadd_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -480,7 +481,8 @@ TRACE = perl $(top_srcdir)/bin/trace
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
-CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin \
+ testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5
# Include src, test, and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
@@ -506,7 +508,7 @@ h5repack_SOURCES = $(COMMON_SOURCES) h5repack_main.c
h5repacktst_SOURCES = $(COMMON_SOURCES) h5repacktst.c
testh5repack_detect_szip_SOURCES = testh5repack_detect_szip.c
@HAVE_SHARED_CONDITIONAL_TRUE@lib_LTLIBRARIES = libdynlibadd.la
-@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_SOURCES = $(top_srcdir)/test/dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_SOURCES = dynlib_rpk.c
DISTCLEANFILES = h5repack.sh h5repack_plugin.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
@@ -683,7 +685,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib_rpk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_copy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_filters.Po@am__quote@
@@ -716,13 +718,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-dynlib1.lo: $(top_srcdir)/test/dynlib1.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dynlib1.lo -MD -MP -MF $(DEPDIR)/dynlib1.Tpo -c -o dynlib1.lo `test -f '$(top_srcdir)/test/dynlib1.c' || echo '$(srcdir)/'`$(top_srcdir)/test/dynlib1.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dynlib1.Tpo $(DEPDIR)/dynlib1.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/test/dynlib1.c' object='dynlib1.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dynlib1.lo `test -f '$(top_srcdir)/test/dynlib1.c' || echo '$(srcdir)/'`$(top_srcdir)/test/dynlib1.c
-
mostlyclean-libtool:
-rm -f *.lo
diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c
new file mode 100644
index 0000000..1ccc33a
--- /dev/null
+++ b/tools/h5repack/dynlib_rpk.c
@@ -0,0 +1,97 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic document set and is *
+ * linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
+ * to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Programmer: Raymond Lu
+ * 13 February 2013
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "H5PLextern.h"
+
+#define H5Z_FILTER_DYNLIB1 257
+
+static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_DYNLIB1[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_DYNLIB1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "dynlib1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_filter_dynlib1
+ *
+ * Purpose: A dynlib1 filter method that adds on and subtract from
+ * the original value with another value. It will be built
+ * as a shared library. plugin.c test will load and use
+ * this filter library.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Raymond Lu
+ * 29 March 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int add_on = 0;
+
+ /* Check for the correct number of parameters */
+ if(cd_nelmts == 0)
+ return(0);
+
+ /* Check that permanent parameters are set correctly */
+ if(cd_values[0] > 9)
+ return(0);
+
+ add_on = (int)cd_values[0];
+
+ if(flags & H5Z_FLAG_REVERSE) { /*read*/
+ /* Substract the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ -= add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /*write*/
+ /* Add the "add on" value to all the data values */
+ while(buf_left > 0) {
+ *int_ptr++ += add_on;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+} /* end H5Z_filter_dynlib1() */
+
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 6086fc2..82f0ffb 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_H5STAT)
#-----------------------------------------------------------------------------
@@ -9,30 +9,30 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5stat executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
+add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
TARGET_NAMING (h5stat ${LIB_TYPE})
TARGET_C_PROPERTIES (h5stat " " " ")
-TARGET_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5stat PROPERTIES FOLDER tools)
+target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5stat PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5stat)
+set (H5_DEP_EXECUTABLES h5stat)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5stat test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
TARGET_NAMING (h5stat_gentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5stat_gentest " " " ")
- TARGET_LINK_LIBRARIES (h5stat_gentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5stat_gentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ #add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -46,7 +46,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5stat
RUNTIME DESTINATION
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index 81ddf82..b803dff 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
+ set (HDF5_REFERENCE_FILES
h5stat_help1.ddl
h5stat_help2.ddl
h5stat_notexist.ddl
@@ -41,34 +41,34 @@
h5stat_numattrs3.ddl
h5stat_numattrs4.ddl
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
h5stat_filters.h5
h5stat_tsohm.h5
h5stat_newgrat.h5
h5stat_threshold.h5
)
- FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #MESSAGE (STATUS " Translating ${ddl_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (ddl_file ${HDF5_REFERENCE_FILES})
+ set (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
+ #message (STATUS " Translating ${ddl_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
)
- ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+ endforeach (ddl_file ${HDF5_REFERENCE_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
##############################################################################
##############################################################################
@@ -78,21 +78,21 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5STAT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- ADD_TEST (
+ add_test (
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
@@ -103,8 +103,8 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -113,9 +113,9 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5STAT-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -182,11 +182,11 @@
h5stat_numattrs4.out
h5stat_numattrs4.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5STAT-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5STAT-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 1e6c848..c3b8294 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -1,16 +1,16 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_LIB)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (H5_TOOLS_LIB_SRCS
+set (H5_TOOLS_LIB_SRCS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_array.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_attr.c
@@ -26,7 +26,7 @@ SET (H5_TOOLS_LIB_SRCS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.c
)
-SET (H5_TOOLS_LIB_HDRS
+set (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_dump.h
@@ -36,17 +36,21 @@ SET (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
)
-ADD_LIBRARY (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
+add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS})
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ")
-TARGET_LINK_LIBRARIES (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
+target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
H5_SET_LIB_OPTIONS (
${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME}
${LIB_TYPE}
HDF5_TOOLS_LIB_NAME_RELEASE
HDF5_TOOLS_LIB_NAME_DEBUG
)
-SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
+#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
+set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
+ FOLDER libraries/tools
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
##############################################################################
##############################################################################
@@ -57,7 +61,7 @@ SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tool
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${H5_TOOLS_LIB_HDRS}
DESTINATION
@@ -70,26 +74,26 @@ INSTALL (
# Because tools are installed into bin/tools we need to make sure the hdf5tools
# library will be installed into the proper location.
#-----------------------------------------------------------------------------
-IF (APPLE)
- OPTION (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
- IF (HDF5_BUILD_WITH_INSTALL_NAME)
+if (APPLE)
+ option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
+ if (HDF5_BUILD_WITH_INSTALL_NAME)
SET_TARGET_PROPERTIES(${HDF5_TOOLS_LIB_TARGET} PROPERTIES
LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
- ENDIF (HDF5_BUILD_WITH_INSTALL_NAME)
-ENDIF (APPLE)
+ endif (HDF5_BUILD_WITH_INSTALL_NAME)
+endif (APPLE)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_TOOLS_LIB_TARGET}
EXPORT
@@ -98,4 +102,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolslibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 8e1003e..ed8c315 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.10)
+cmake_minimum_required (VERSION 2.8.11)
PROJECT (HDF5_TOOLS_MISC)
#-----------------------------------------------------------------------------
@@ -10,25 +10,25 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# Add the misc executables
# --------------------------------------------------------------------
#-- Misc Executables
-ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
+add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
TARGET_NAMING (h5debug ${LIB_TYPE})
TARGET_C_PROPERTIES (h5debug " " " ")
-TARGET_LINK_LIBRARIES (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5debug PROPERTIES FOLDER tools)
+target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h5debug PROPERTIES FOLDER tools)
-ADD_EXECUTABLE (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
+add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
TARGET_NAMING (h5repart ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repart " " " ")
-TARGET_LINK_LIBRARIES (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5repart PROPERTIES FOLDER tools)
+target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+set_target_properties (h5repart PROPERTIES FOLDER tools)
-ADD_EXECUTABLE (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
+add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
TARGET_NAMING (h5mkgrp ${LIB_TYPE})
TARGET_C_PROPERTIES (h5mkgrp " " " ")
-TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5mkgrp PROPERTIES FOLDER tools)
+target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5debug
h5repart
h5mkgrp
@@ -37,31 +37,31 @@ SET (H5_DEP_EXECUTABLES
#-----------------------------------------------------------------------------
# Generate the h5cc file containing settings needed to compile programs
#-----------------------------------------------------------------------------
-#IF (NOT WIN32)
-# CONFIGURE_FILE (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY)
-#ENDIF (NOT WIN32)
+#if (NOT WIN32)
+# configure_file (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY)
+#endif (NOT WIN32)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the misc test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
+ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ add_executable (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
TARGET_NAMING (h5repart_gentest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repart_gentest " " " ")
- TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repart_gentest PROPERTIES FOLDER generator/tools)
- #ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
+ #add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
+ add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
TARGET_NAMING (h5repart_test ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repart_test " " " ")
- TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repart_test PROPERTIES FOLDER tools)
+ target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5repart_test PROPERTIES FOLDER tools)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -77,7 +77,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications)
#INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5debug h5repart h5mkgrp
RUNTIME DESTINATION
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index cc9c5e2..468ff3a 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
family_file00000.h5
family_file00001.h5
family_file00002.h5
@@ -29,18 +29,18 @@
family_file00017.h5
)
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5repart
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (HDF5_MKGRP_TEST_FILES
+ set (HDF5_MKGRP_TEST_FILES
#h5mkgrp_help.txt
#h5mkgrp_version
h5mkgrp_single.ls
@@ -58,26 +58,26 @@
)
# make test dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
- #MESSAGE (STATUS " Copying ${h5_mkgrp_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
+ #message (STATUS " Copying ${h5_mkgrp_file}")
+ add_custom_command (
TARGET h5mkgrp
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
)
- ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ endforeach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5mkgrp
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
)
- CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
+ configure_file (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
##############################################################################
##############################################################################
@@ -86,8 +86,8 @@
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode resultoption)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5MKGRP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -95,21 +95,21 @@
${resultfile}.out
${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME H5MKGRP-${resultfile}
COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
- ADD_TEST (
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
+ add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
@@ -121,15 +121,15 @@
-D "TEST_REFERENCE=${resultfile}.ls"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
MACRO (ADD_H5_CMP resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -137,8 +137,8 @@
${resultfile}.out
${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ADD_TEST (
+ set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
@@ -149,8 +149,8 @@
-D "TEST_REFERENCE=${resultfile}.txt"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_CMP resultfile resultcode)
##############################################################################
@@ -160,7 +160,7 @@
##############################################################################
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME H5REPART-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -171,33 +171,33 @@
scd_family00003.h5
family_to_sec2.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPART-clearall-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPART-clearall-objects")
# repartition family member size to 20,000 bytes.
- ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
+ add_test (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ set_tests_properties (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
# repartition family member size to 5 KB.
- ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
+ add_test (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ set_tests_properties (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
# convert family file to sec2 file of 20,000 bytes
- ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
+ add_test (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
# test the output files repartitioned above.
- ADD_TEST (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
+ add_test (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
+ set_tests_properties (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
- SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
h5repart_test
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
NAME H5MKGRP-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -242,12 +242,12 @@
h5mkgrp_nested_mult_lp.out
h5mkgrp_nested_mult_lp.out.err
)
- SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5MKGRP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5MKGRP-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Check that help & version is displayed properly
ADD_H5_CMP (h5mkgrp_help 0 "-h")