From a0ee1eb5dc7ad3f45860eb5ea0791a4380302ddf Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 19 Jan 2021 16:39:23 -0600 Subject: 1 12 merge of changes from dev (#271) * OESS-98 fix tools test for plugins * sync fork * Merge of changes from dev * Move problem option to bottom of the list until fixed * HDFFV-11106 - fix parsing optional args * HDFFV-11106 add note * grammer fix --- CMakeFilters.cmake | 28 +++-- CMakeLists.txt | 89 +++++++++------- MANIFEST | 2 +- c++/src/CMakeLists.txt | 2 +- config/cmake/ConfigureChecks.cmake | 25 +++-- config/cmake/HDF5PluginMacros.cmake | 10 +- config/cmake/HDF5UseFortran.cmake | 44 +++++--- config/cmake/HDFCXXCompilerFlags.cmake | 8 +- config/cmake/HDFCompilerFlags.cmake | 9 +- config/cmake/HDFFortranCompilerFlags.cmake | 8 +- config/cmake/fileCompareTest.cmake | 27 +++-- config/cmake/libhdf5.pc.in | 14 --- config/cmake_ext_mod/ConfigureChecks.cmake | 60 ++++++++--- config/cmake_ext_mod/FindSZIP.cmake | 4 +- config/cmake_ext_mod/HDFMacros.cmake | 14 ++- config/cmake_ext_mod/HDFUseCXX.cmake | 12 ++- config/cmake_ext_mod/HDFUseFortran.cmake | 16 ++- config/cmake_ext_mod/grepTest.cmake | 10 +- config/libhdf5.pc.in | 14 +++ fortran/src/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- java/CMakeLists.txt | 10 +- release_docs/RELEASE.txt | 37 ++++++- src/CMakeLists.txt | 5 +- tools/lib/h5tools_utils.c | 46 +++++---- tools/src/h5diff/h5diff_common.c | 30 +++--- tools/src/h5dump/h5dump.c | 132 ++++++++++++------------ tools/src/h5dump/h5dump.h | 2 +- tools/src/h5dump/h5dump_extern.h | 2 +- tools/src/h5repack/h5repack_main.c | 1 + tools/src/misc/h5debug.c | 3 - tools/test/h5jam/getub.c | 5 +- tools/test/h5repack/testfiles/h5repack-help.txt | 1 + tools/test/perform/chunk_cache.c | 8 +- 36 files changed, 423 insertions(+), 263 deletions(-) delete mode 100644 config/cmake/libhdf5.pc.in create mode 100644 config/libhdf5.pc.in diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 9a0719f..26900a0 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -32,7 +32,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) if (NOT EXISTS "${ZLIB_URL}") set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter ZLIB file ${ZLIB_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found") + endif () endif () set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME}) if (USE_LIBAEC) @@ -40,7 +42,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT endif () if (NOT EXISTS "${SZIP_URL}") set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter SZIP file ${SZIP_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP file ${SZIP_URL} not found") + endif () endif () else () set (ZLIB_USE_EXTERNAL 0) @@ -76,7 +80,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) - message (STATUS "Filter ZLIB is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is built") + endif () else () message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") endif () @@ -92,7 +98,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) - message (STATUS "Filter ZLIB is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is ON") + endif () endif () #----------------------------------------------------------------------------- @@ -122,9 +130,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) - message (STATUS "Filter SZIP is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is built") + endif () if (USE_LIBAEC) - message (STATUS "... with library AEC") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "... with library AEC") + endif () set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME}) else () set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME}) @@ -135,7 +147,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) - message (STATUS "Filter SZIP is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is ON") + endif () if (H5_HAVE_FILTER_SZIP) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") endif () diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f86832..58874cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,8 @@ set (CMAKE_IGNORE_EOL "--ignore-eol") if (CMAKE_VERSION VERSION_LESS "3.14.0") set (CMAKE_IGNORE_EOL "") if (WIN32) - message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") + message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14") endif() -else () endif () #----------------------------------------------------------------------------- @@ -204,6 +203,7 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project #----------------------------------------------------------------------------- +set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config) set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake) set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod) set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src) @@ -239,7 +239,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._\-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) -#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +endif () #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO @@ -252,7 +254,9 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE}) -message (STATUS "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +endif () string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" @@ -262,7 +266,9 @@ if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE}) - message (STATUS "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_CXX_SOVERS_EXISTS) @@ -273,7 +279,9 @@ if (H5_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_F_SOVERS_EXISTS) @@ -284,7 +292,9 @@ if (H5_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_SOVERS_EXISTS) @@ -295,7 +305,9 @@ if (H5_HL_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_CXX_SOVERS_EXISTS) @@ -306,7 +318,9 @@ if (H5_HL_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_F_SOVERS_EXISTS) @@ -317,7 +331,9 @@ if (H5_HL_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) if(H5_JAVA_SOVERS_EXISTS) @@ -328,7 +344,9 @@ if(H5_JAVA_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE}) - message (STATUS "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + endif () endif () #----------------------------------------------------------------------------- @@ -785,39 +803,51 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF) if (HDF5_ENABLE_THREADSAFE) # check for unsupported options if (WIN32) - message (STATUS " **** thread-safety option not supported with static library **** ") - message (STATUS " **** thread-safety option will not be used building static library **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** thread-safety option not supported with static library **** ") + message (VERBOSE " **** thread-safety option will not be used building static library **** ") + endif () endif () if (HDF5_ENABLE_PARALLEL) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_FORTRAN) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_CPP_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_HL_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported HL and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ") + endif () endif () endif () if (H5_HAVE_IOEO) - message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + endif () set (H5_HAVE_WIN_THREADS 1) else () if (NOT H5_HAVE_PTHREAD_H) @@ -938,21 +968,6 @@ if (BUILD_TESTING) endif () #----------------------------------------------------------------------------- -# Include filter plugins -#----------------------------------------------------------------------------- -include (CMakePlugins.cmake) - -if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES) - if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND) - PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT}) -# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON) -# mark_as_advanced (HDF5_TEST_PLUGIN) - -# TEST_PLUGIN_LIBRARY () - endif () -endif () - -#----------------------------------------------------------------------------- # Option to build HDF5 Utilities #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils") @@ -1021,7 +1036,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for if (HDF5_BUILD_FORTRAN) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + endif () include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake) include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) @@ -1070,7 +1087,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Parallel and C++ options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ") + endif () endif () endif () diff --git a/MANIFEST b/MANIFEST index e12b66e..8f0f0a8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -139,6 +139,7 @@ ./config/ibm-flags ./config/intel-fflags ./config/intel-flags +./config/libhdf5.pc.in ./config/linux-gnu ./config/linux-gnuaout ./config/linux-gnueabihf @@ -3493,7 +3494,6 @@ ./config/cmake/jrunTest.cmake ./config/cmake/jvolTest.cmake ./config/cmake/libh5cc.in -./config/cmake/libhdf5.pc.in ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 13eb795..8608c67 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -198,7 +198,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index ab121e9..abdde70 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -165,14 +165,18 @@ if (NOT WINDOWS) add_definitions ("-D_GNU_SOURCE") else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () 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 () else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) @@ -192,7 +196,7 @@ option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF) list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) else () - message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") + message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") endif () endif () @@ -209,7 +213,7 @@ if (H5FD_ENABLE_MIRROR_VFD) ${HDF_PREFIX}_HAVE_FORK) set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1) else() - message(STATUS "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") + message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") endif() endif() @@ -235,7 +239,6 @@ endif () #----------------------------------------------------------------------------- macro (H5ConversionTests TEST msg) if (NOT DEFINED ${TEST}) - # message (STATUS "===> ${TEST}") TRY_RUN (${TEST}_RUN ${TEST}_COMPILE ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_DIR}/ConversionTests.c @@ -245,17 +248,23 @@ macro (H5ConversionTests TEST msg) if (${TEST}_COMPILE) if (${TEST}_RUN MATCHES 0) set (${TEST} 1 CACHE INTERNAL ${msg}) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" ) diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index a858353..4e05399 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -14,7 +14,9 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) ) endif () FetchContent_GetProperties(PLUGIN) - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () if(NOT PLUGIN_POPULATED) FetchContent_Populate(PLUGIN) include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake) @@ -65,8 +67,10 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET}) target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}") endif () - endif() - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}") set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}") set (PLUGIN_LIBRARY "PLUGIN") diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 4350b7a..8579b73 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -41,7 +41,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR) - message (STATUS "Detecting Fortran ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}") + endif () file (WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 "${SOURCE_CODE}" @@ -55,18 +57,24 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 if (${COMPILE_RESULT_VAR}) set(${RETURN_VAR} ${RUN_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 0) - message (STATUS "Testing Fortran ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION_NAME} exists passed\n" ) else () - message (STATUS "Testing Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n" ) endif () else () - message (STATUS "Compiling Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n" ) @@ -281,7 +289,9 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") -message (STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +endif () # ********** # REALS # ********** @@ -442,7 +452,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) - message (STATUS "Detecting C ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting C ${FUNCTION_NAME}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -462,22 +474,28 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) set (${RETURN_VAR} ${OUTPUT_VAR}) - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #endif () if (${COMPILE_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 1) set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") - message (STATUS "Testing C ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n" "${OUTPUT_VAR}\n\n" ) else () - message (STATUS "Testing C ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail") + endif () set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n" diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 7bbebbc..48da0c6 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -14,7 +14,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -96,7 +98,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 31af2f8..b813924 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -15,7 +15,9 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE) set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -107,7 +109,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- @@ -132,7 +136,6 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 2bbb35d..c7f085c 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -10,7 +10,9 @@ # help@hdfgroup.org. # -message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +endif () #----------------------------------------------------------------------------- # Option to allow the user to disable compiler warnings @@ -64,7 +66,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03") endif () - message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + endif () if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake index d913da0..2f968fa 100644 --- a/config/cmake/fileCompareTest.cmake +++ b/config/cmake/fileCompareTest.cmake @@ -24,9 +24,6 @@ endif () if (NOT TEST_FUNCTION) message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () set (TEST_ONE_SIZE 0) set (TEST_TWO_SIZE 0) @@ -53,7 +50,9 @@ if (TEST_STRINGS STREQUAL "YES") RESULT_VARIABLE TEST_RESULT ) - message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + endif () # if the return value is !=${TEST_EXPECT} bail out if (NOT TEST_RESULT EQUAL TEST_EXPECT) message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}") @@ -66,31 +65,41 @@ else () file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE) if (TEST_FUNCTION MATCHES "LT") if (TEST_ONE_SIZE LESS TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "LTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "EQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GT") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}") endif () diff --git a/config/cmake/libhdf5.pc.in b/config/cmake/libhdf5.pc.in deleted file mode 100644 index 4a2ebaa..0000000 --- a/config/cmake/libhdf5.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -prefix=@_PKG_CONFIG_PREFIX@ -exec_prefix=@_PKG_CONFIG_EXEC_PREFIX@ -libdir=@_PKG_CONFIG_LIBDIR@ -includedir=@_PKG_CONFIG_INCLUDEDIR@ - -Name: @_PKG_CONFIG_LIBNAME@ -Description: HDF5 (Hierarchical Data Format 5) Software Library -Version: @_PKG_CONFIG_VERSION@ - -Cflags: -I${includedir} -Libs: -L${libdir} @_PKG_CONFIG_SH_LIBS@ -Requires: @_PKG_CONFIG_REQUIRES@ -Libs.private: @_PKG_CONFIG_LIBS_PRIVATE@ @_PKG_CONFIG_LIBS@ -Requires.private: @_PKG_CONFIG_REQUIRES_PRIVATE@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 7988772..5fa6ca1 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -224,7 +224,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () try_compile (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFTests.c @@ -234,9 +236,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST}) set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}") - message (STATUS "Performing Other Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing Other Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed") + endif () set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Other Test ${OTHER_TEST} failed with the following output:\n" @@ -297,17 +303,23 @@ if (MINGW OR NOT WINDOWS) set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) set (LARGEFILE 1) set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n" ) endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Compile failed\n" ) @@ -340,11 +352,15 @@ endif () macro (HDF_CHECK_TYPE_SIZE type var) set (aType ${type}) set (aVar ${var}) -# message (STATUS "Checking size of ${aType} and storing into ${aVar}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Checking size of ${aType} and storing into ${aVar}") + endif () CHECK_TYPE_SIZE (${aType} ${aVar}) if (NOT ${aVar}) set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}") -# message (STATUS "Size of ${aType} was NOT Found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Size of ${aType} was NOT Found") + endif () endif () endmacro () @@ -574,7 +590,9 @@ endif () #----------------------------------------------------------------------------- if (WINDOWS) if (NOT HDF_NO_IOEO_TEST) - message (STATUS "Checking for InitOnceExecuteOnce:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for InitOnceExecuteOnce:") + endif () if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO) if (LARGEFILE) set (CMAKE_REQUIRED_DEFINITIONS @@ -603,7 +621,9 @@ if (WINDOWS) # if the return value was 0 then it worked if ("${HAVE_IOEO_EXITCODE}" EQUAL 0) set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce") - message (STATUS "Performing Test InitOnceExecuteOnce - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Success") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n" "${OUTPUT}\n" @@ -615,7 +635,9 @@ if (WINDOWS) set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce") endif () - message (STATUS "Performing Test InitOnceExecuteOnce - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing InitOnceExecuteOnce Test failed with the following output:\n" "${OUTPUT}\n" @@ -638,7 +660,9 @@ endforeach () #----------------------------------------------------------------------------- if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown") set (PRINT_LL_FOUND 0) - message (STATUS "Checking for appropriate format for 64 bit long:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long:") + endif () set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH") if (${HDF_PREFIX}_SIZEOF_LONG_LONG) set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG") @@ -655,7 +679,9 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll") set (PRINT_LL_FOUND 1) else () - message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + endif () endif () else () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log @@ -664,9 +690,13 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " endif () if (PRINT_LL_FOUND) - message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + endif () else () - message (STATUS "Checking for appropriate format for 64 bit long: not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: not found") + endif () set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll" ) diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 8f882b4..6ac2099 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -118,7 +118,9 @@ if (NOT SZIP_FOUND) "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}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${SZIP_DIR_MESSAGE}") + endif () else () if (SZIP_FIND_REQUIRED) message (FATAL_ERROR "SZip was NOT found and is Required by this project") diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 952b766..15b5117 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -28,7 +28,9 @@ macro (SET_HDF_BUILD_TYPE) endif() endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.") + endif() set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" @@ -126,10 +128,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) - #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME) - #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG) - #get_property (target_name_rwdi TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO) - #message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}") if (${libtype} MATCHES "STATIC") if (WIN32) @@ -458,19 +456,19 @@ endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) file (STRINGS ${infile} TEST_FLAG_STREAM) - #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") + #message (TRACE "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") list (LENGTH TEST_FLAG_STREAM len_flag) if (len_flag GREATER 0) math (EXPR _FP_LEN "${len_flag} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET TEST_FLAG_STREAM ${line} str_flag) string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}") - #message (STATUS "str_flag=${str_flag}") + #message (TRACE "str_flag=${str_flag}") if (str_flag) list (APPEND ${h5_flag_var} "${str_flag}") endif () endforeach () endif () - #message (STATUS "h5_flag_var=${${h5_flag_var}}") + #message (TRACE "h5_flag_var=${${h5_flag_var}}") endmacro () diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 8d98147..efce42f 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -70,7 +70,9 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () TRY_COMPILE (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp @@ -80,9 +82,13 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST} EQUAL 0) set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}") - message (STATUS "Performing CXX Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed") + endif () 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" diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 0a6a092..2da7148 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -135,7 +135,9 @@ else () # so this one is used for a sizeof test. #----------------------------------------------------------------------------- macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) - message (STATUS "Testing Fortran ${FUNCTION}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -153,13 +155,17 @@ else () OUTPUT_VARIABLE OUTPUT ) - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - # message (STATUS "Test result ${OUTPUT}") - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test result ${OUTPUT}") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # endif () if (${RESULT_VAR}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message (STATUS "Testing Fortran ${FUNCTION} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION} - OK") + endif () 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" diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 758b62b..cf7071d 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -16,18 +16,12 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () -#if (NOT TEST_ARGS) -# message (STATUS "Require TEST_ARGS to be defined") -#endif () if (NOT TEST_FOLDER) message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () if (NOT TEST_FILTER) message (STATUS "Optional TEST_FILTER to be defined") endif () @@ -55,7 +49,9 @@ endif () if (TEST_ENV_VAR) set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") - #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + endif () endif () # run the test program, capture the stdout/stderr and the result var diff --git a/config/libhdf5.pc.in b/config/libhdf5.pc.in new file mode 100644 index 0000000..4a2ebaa --- /dev/null +++ b/config/libhdf5.pc.in @@ -0,0 +1,14 @@ +prefix=@_PKG_CONFIG_PREFIX@ +exec_prefix=@_PKG_CONFIG_EXEC_PREFIX@ +libdir=@_PKG_CONFIG_LIBDIR@ +includedir=@_PKG_CONFIG_INCLUDEDIR@ + +Name: @_PKG_CONFIG_LIBNAME@ +Description: HDF5 (Hierarchical Data Format 5) Software Library +Version: @_PKG_CONFIG_VERSION@ + +Cflags: -I${includedir} +Libs: -L${libdir} @_PKG_CONFIG_SH_LIBS@ +Requires: @_PKG_CONFIG_REQUIRES@ +Libs.private: @_PKG_CONFIG_LIBS_PRIVATE@ @_PKG_CONFIG_LIBS@ +Requires.private: @_PKG_CONFIG_REQUIRES_PRIVATE@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index be98cfb..37b5157 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -539,7 +539,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 0c9b04b..1eac9fe 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -109,7 +109,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index d35ca3b..0b7795b 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -342,7 +342,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 91953b0..785bdcf 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -141,7 +141,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 416e495..5c79bd3 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -9,10 +9,14 @@ find_package (Java) #----------------------------------------------------------------------------- include (${HDF_RESOURCES_DIR}/UseJava.cmake) -message (STATUS "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +endif () find_package (JNI) -message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}") -message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JNI_LIBRARIES=${JNI_LIBRARIES}") + message (VERBOSE "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +endif () if (WIN32) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6eb36fe..a6beaed 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -205,6 +205,14 @@ New Features Tools: ------ + - h5repack added help text for user-defined filters. + + Added help text line that states the valid values of the filter flag + for user-defined filters; + filter_flag: 1 is OPTIONAL or 0 is MANDATORY + + (ADB - 2021/01/14, HDFFV-11099) + - h5repack added options to control how external links are handled. Currently h5repack preserves external links and cannot copy and merge @@ -323,6 +331,18 @@ Bug Fixes since HDF5-1.12.0 release Configuration ------------- + - Reclassify CMake messages, to allow new modes and --log-level option + + CMake message commands have a mode argument. By default, STATUS mode + was chosen for any non-error message. CMake version 3.15 added additional + modes, NOTICE, VERBOSE, DEBUG and TRACE. All message commands with a mode + of STATUS were reviewed and most were reclassified as VERBOSE. The new + mode was protected by a check for a CMake version of at least 3.15. If CMake + version 3.17 or above is used, the user can use the command line option + of "--log-level" to further restrict which message commands are displayed. + + (ADB - 2021/01/11, HDFFV-11144) + - Fixes Autotools determination of the stat struct having an st_blocks field A missing parenthesis in an autoconf macro prevented building the test @@ -332,16 +352,23 @@ Bug Fixes since HDF5-1.12.0 release CMake. This #define is only used in the tests and does not affect the HDF5 C library. - (DER - 2021/07/01, HDFFV-11201) + (DER - 2021/01/07, HDFFV-11201) - Tools: - ------ + Tools + ----- + - Fixed tools argument parsing. + + Tools parsing used the length of the option from the long array to match + the option from the command line. This incorrectly matched a shorter long + name option that was happened to be a subset of another long option. + Changed to match whole names. + + (ADB - 2021/01/19, HDFFV-11106) Fortran API ----------- - - Fixed configure issue when building HDF5 with NAG Fortran 7.0. HDF5 now accounts for the addition of half-precision floating-point @@ -349,12 +376,14 @@ Bug Fixes since HDF5-1.12.0 release (MSB - 2020/02/28, HDFFV-11033) + High-Level Library ------------------ - Eliminated unnecessary code in H5DOappend(), improving its performance. (QAK - 2020/06/05) + Testing ------- - Stopped java/test/junit.sh.in installing libs for testing under ${prefix} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b15ca06..d7a62ec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -440,6 +440,7 @@ set (H5MP_HDRS ) IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" ) + set (H5O_SOURCES ${HDF5_SRC_DIR}/H5O.c ${HDF5_SRC_DIR}/H5Oainfo.c @@ -1003,7 +1004,7 @@ if (HDF5_GENERATE_HEADERS) ) message(STATUS ${SCRIPT_OUTPUT}) else () - message (STATUS "Cannot generate headers - perl not found") + message (WARNING "Cannot generate headers - perl not found") endif () endif () @@ -1335,7 +1336,7 @@ set (_PKG_CONFIG_REQUIRES) set (_PKG_CONFIG_REQUIRES_PRIVATE) configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index aa2418d..9c5999b 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -194,44 +194,50 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') { /* long command line option */ - const char *arg = &argv[opt_ind][2]; int i; + const char ch = '='; + char *arg = &argv[opt_ind][2]; + size_t arg_len = 0; + + opt_arg = strchr(&argv[opt_ind][2], ch); + arg_len = HDstrlen(&argv[opt_ind][2]); + if (opt_arg) { + arg_len -= HDstrlen(opt_arg); + opt_arg++; /* skip the equal sign */ + } + arg[arg_len] = 0; for (i = 0; l_opts && l_opts[i].name; i++) { size_t len = HDstrlen(l_opts[i].name); - if (HDstrncmp(arg, l_opts[i].name, len) == 0) { + if (HDstrcmp(arg, l_opts[i].name) == 0) { /* we've found a matching long command line flag */ opt_opt = l_opts[i].shortval; if (l_opts[i].has_arg != no_arg) { - if (arg[len] == '=') { - opt_arg = &arg[len + 1]; - } - else if (l_opts[i].has_arg != optional_arg) { - if (opt_ind < (argc - 1)) - if (argv[opt_ind + 1][0] != '-') - opt_arg = argv[++opt_ind]; - } - else if (l_opts[i].has_arg == require_arg) { - if (opt_err) - HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], - arg); - - opt_opt = '?'; + if (opt_arg == NULL) { + if (l_opts[i].has_arg != optional_arg) { + if (opt_ind < (argc - 1)) + if (argv[opt_ind + 1][0] != '-') + opt_arg = argv[++opt_ind]; + } + else if (l_opts[i].has_arg == require_arg) { + if (opt_err) + HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], + arg); + + opt_opt = '?'; + } } - else - opt_arg = NULL; } else { - if (arg[len] == '=') { + if (opt_arg) { if (opt_err) HDfprintf(rawerrorstream, "%s: no option required for \"%s\" flag\n", argv[0], arg); opt_opt = '?'; } - opt_arg = NULL; } break; } diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 95245bd..5646e2a 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -25,7 +25,7 @@ static int check_d_input(const char *); * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVrv:qn:d:p:NcelxE:A:S"; +static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -253,33 +253,27 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char case 'v': opts->mode_verbose = 1; - /* This for loop is for handling style like - * -v, -v1, --verbose, --verbose=1. - */ for (i = 1; i < argc; i++) { /* - * short opt + * special check for short opt */ - if (!strcmp(argv[i], "-v")) { /* no arg */ - opt_ind--; + if (!strcmp(argv[i], "-v")) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = 0; break; } else if (!strncmp(argv[i], "-v", (size_t)2)) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = atoi(&argv[i][2]); break; } - - /* - * long opt - */ - if (!strcmp(argv[i], "--verbose")) { /* no arg */ - opts->mode_verbose_level = 0; - break; - } - else if (!strncmp(argv[i], "--verbose", (size_t)9) && argv[i][9] == '=') { - opts->mode_verbose_level = atoi(&argv[i][10]); - break; + else { + if (opt_arg != NULL) + opts->mode_verbose_level = HDatoi(opt_arg); + else + opts->mode_verbose_level = 0; } } break; diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 34b3c10..1429842 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -80,39 +80,8 @@ struct handler_t { */ /* The following initialization makes use of C language concatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char * s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RE*CM:O*N:vG:"; -static struct long_options l_opts[] = {{"help", no_arg, 'h'}, - {"hel", no_arg, 'h'}, - {"contents", optional_arg, 'n'}, - {"properties", no_arg, 'p'}, - {"superblock", no_arg, 'B'}, - {"boot-block", no_arg, 'B'}, - {"boot-bloc", no_arg, 'B'}, - {"boot-blo", no_arg, 'B'}, - {"boot-bl", no_arg, 'B'}, - {"boot-b", no_arg, 'B'}, - {"boot", no_arg, 'B'}, - {"boo", no_arg, 'B'}, - {"bo", no_arg, 'B'}, - {"header", no_arg, 'H'}, - {"heade", no_arg, 'H'}, - {"head", no_arg, 'H'}, - {"hea", no_arg, 'H'}, - {"object-ids", no_arg, 'i'}, - {"object-id", no_arg, 'i'}, - {"object-i", no_arg, 'i'}, - {"object", no_arg, 'i'}, - {"objec", no_arg, 'i'}, - {"obje", no_arg, 'i'}, - {"obj", no_arg, 'i'}, - {"ob", no_arg, 'i'}, - {"version", no_arg, 'V'}, - {"versio", no_arg, 'V'}, - {"versi", no_arg, 'V'}, - {"vers", no_arg, 'V'}, - {"ver", no_arg, 'V'}, - {"ve", no_arg, 'V'}, - {"attribute", require_arg, 'a'}, +static const char * s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:"; +static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"attribut", require_arg, 'a'}, {"attribu", require_arg, 'a'}, {"attrib", require_arg, 'a'}, @@ -120,10 +89,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"attr", require_arg, 'a'}, {"att", require_arg, 'a'}, {"at", require_arg, 'a'}, - {"block", require_arg, 'k'}, - {"bloc", require_arg, 'k'}, - {"blo", require_arg, 'k'}, - {"bl", require_arg, 'k'}, + {"binary", optional_arg, 'b'}, {"count", require_arg, 'c'}, {"coun", require_arg, 'c'}, {"cou", require_arg, 'c'}, @@ -131,10 +97,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"dataset", require_arg, 'd'}, {"datase", require_arg, 'd'}, {"datas", require_arg, 'd'}, - {"datatype", require_arg, 't'}, - {"datatyp", require_arg, 't'}, - {"dataty", require_arg, 't'}, - {"datat", require_arg, 't'}, + {"escape", no_arg, 'e'}, {"filedriver", require_arg, 'f'}, {"filedrive", require_arg, 'f'}, {"filedriv", require_arg, 'f'}, @@ -148,24 +111,44 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"grou", require_arg, 'g'}, {"gro", require_arg, 'g'}, {"gr", require_arg, 'g'}, - {"output", optional_arg, 'o'}, - {"outpu", optional_arg, 'o'}, - {"outp", optional_arg, 'o'}, - {"out", optional_arg, 'o'}, - {"ou", optional_arg, 'o'}, + {"help", no_arg, 'h'}, + {"hel", no_arg, 'h'}, + {"object-ids", no_arg, 'i'}, + {"object-id", no_arg, 'i'}, + {"object-i", no_arg, 'i'}, + {"object", no_arg, 'i'}, + {"objec", no_arg, 'i'}, + {"obje", no_arg, 'i'}, + {"obj", no_arg, 'i'}, + {"ob", no_arg, 'i'}, + {"block", require_arg, 'k'}, + {"bloc", require_arg, 'k'}, + {"blo", require_arg, 'k'}, + {"bl", require_arg, 'k'}, {"soft-link", require_arg, 'l'}, {"soft-lin", require_arg, 'l'}, {"soft-li", require_arg, 'l'}, {"soft-l", require_arg, 'l'}, {"soft", require_arg, 'l'}, {"sof", require_arg, 'l'}, + {"format", require_arg, 'm'}, + {"contents", optional_arg, 'n'}, + {"output", optional_arg, 'o'}, + {"outpu", optional_arg, 'o'}, + {"outp", optional_arg, 'o'}, + {"out", optional_arg, 'o'}, + {"ou", optional_arg, 'o'}, + {"properties", no_arg, 'p'}, + {"sort_by", require_arg, 'q'}, + {"string", no_arg, 'r'}, + {"strin", no_arg, 'r'}, {"start", require_arg, 's'}, {"star", require_arg, 's'}, {"sta", require_arg, 's'}, - {"stride", require_arg, 'S'}, - {"strid", require_arg, 'S'}, - {"string", no_arg, 'r'}, - {"strin", no_arg, 'r'}, + {"datatype", require_arg, 't'}, + {"datatyp", require_arg, 't'}, + {"dataty", require_arg, 't'}, + {"datat", require_arg, 't'}, {"use-dtd", no_arg, 'u'}, {"use-dt", no_arg, 'u'}, {"use-d", no_arg, 'u'}, @@ -173,33 +156,50 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"use", no_arg, 'u'}, {"us", no_arg, 'u'}, {"u", no_arg, 'u'}, + {"vds-view-first-missing", no_arg, 'v'}, {"width", require_arg, 'w'}, {"widt", require_arg, 'w'}, {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'}, - {"xml-dtd", require_arg, 'D'}, - {"xml-dt", require_arg, 'D'}, - {"xml-d", require_arg, 'D'}, - {"xml-ns", require_arg, 'X'}, - {"xml-n", require_arg, 'X'}, {"xml", no_arg, 'x'}, {"xm", no_arg, 'x'}, - {"onlyattr", optional_arg, 'A'}, - {"escape", no_arg, 'e'}, {"noindex", no_arg, 'y'}, - {"binary", optional_arg, 'b'}, - {"form", require_arg, 'F'}, - {"sort_by", require_arg, 'q'}, {"sort_order", require_arg, 'z'}, - {"format", require_arg, 'm'}, - {"region", no_arg, 'R'}, + {"onlyattr", optional_arg, 'A'}, + {"superblock", no_arg, 'B'}, + {"boot-block", no_arg, 'B'}, + {"boot-bloc", no_arg, 'B'}, + {"boot-blo", no_arg, 'B'}, + {"boot-bl", no_arg, 'B'}, + {"boot-b", no_arg, 'B'}, + {"boot", no_arg, 'B'}, + {"boo", no_arg, 'B'}, + {"bo", no_arg, 'B'}, + {"no-compact-subset", no_arg, 'C'}, + {"xml-dtd", require_arg, 'D'}, + {"xml-dt", require_arg, 'D'}, + {"xml-d", require_arg, 'D'}, {"enable-error-stack", optional_arg, 'E'}, + {"form", require_arg, 'F'}, + {"vds-gap-size", require_arg, 'G'}, + {"header", no_arg, 'H'}, + {"heade", no_arg, 'H'}, + {"head", no_arg, 'H'}, + {"hea", no_arg, 'H'}, {"packed-bits", require_arg, 'M'}, - {"no-compact-subset", no_arg, 'C'}, - {"ddl", optional_arg, 'O'}, {"any_path", require_arg, 'N'}, - {"vds-view-first-missing", no_arg, 'v'}, - {"vds-gap-size", require_arg, 'G'}, + {"ddl", optional_arg, 'O'}, + {"region", no_arg, 'R'}, + {"stride", require_arg, 'S'}, + {"strid", require_arg, 'S'}, + {"version", no_arg, 'V'}, + {"versio", no_arg, 'V'}, + {"versi", no_arg, 'V'}, + {"vers", no_arg, 'V'}, + {"ver", no_arg, 'V'}, + {"ve", no_arg, 'V'}, + {"xml-ns", require_arg, 'X'}, + {"xml-n", require_arg, 'X'}, {"s3-cred", require_arg, '$'}, {"hdfs-attrs", require_arg, '#'}, {"vol-value", require_arg, '1'}, diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index b4198ad..9392ca3 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -83,7 +83,7 @@ typedef struct { dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0}; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 6ccd159..56734cf 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -80,7 +80,7 @@ typedef struct { } dump_opt_t; extern dump_opt_t dump_opts; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX 8 * sizeof(long long) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ extern unsigned long long diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c38dd66..a67d6ac 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -262,6 +262,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " Required values: filter_number, filter_flag, cd_value_count, value1\n"); PRINTVALSTREAM(rawoutstream, " Optional values: value2 to valueN\n"); + PRINTVALSTREAM(rawoutstream, " filter_flag: 1 is OPTIONAL or 0 is MANDATORY\n"); PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " LAYT - is a string with the format:\n"); diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 85abb8a..9236828 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -67,7 +67,6 @@ * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- @@ -149,7 +148,6 @@ get_H5B2_class(const uint8_t *sig) * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- @@ -191,7 +189,6 @@ get_H5EA_class(const uint8_t *sig) * Return: Non-NULL on success/NULL on failure * * Programmer: Quincey Koziol - * koziol@hdfgroup.org * Sep 11 2008 * *------------------------------------------------------------------------- diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index 9e9cd4d..80e0c66 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -138,14 +138,15 @@ main(int argc, const char *argv[]) } /* end if */ /* close things and exit */ + HDfree(filename); HDfree(buf); HDclose(fd); return EXIT_SUCCESS; error: - if (buf) - HDfree(buf); + HDfree(filename); + HDfree(buf); if (fd >= 0) HDclose(fd); return EXIT_FAILURE; diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index e12838d..cb10d22 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -136,6 +136,7 @@ usage: h5repack [OPTIONS] file1 file2 UD= Required values: filter_number, filter_flag, cd_value_count, value1 Optional values: value2 to valueN + filter_flag: 1 is OPTIONAL or 0 is MANDATORY NONE (no parameter) LAYT - is a string with the format: diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c index 3a6a209..1df409c 100644 --- a/tools/test/perform/chunk_cache.c +++ b/tools/test/perform/chunk_cache.c @@ -98,7 +98,7 @@ create_dset1(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -134,6 +134,7 @@ create_dset1(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; error: @@ -144,6 +145,7 @@ error: H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } @@ -160,7 +162,7 @@ create_dset2(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -195,6 +197,7 @@ create_dset2(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; @@ -206,6 +209,7 @@ error: H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } -- cgit v0.12