summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-09-03 00:31:29 (GMT)
committerGitHub <noreply@github.com>2022-09-03 00:31:29 (GMT)
commitc8fdd92cd4d53e5343b475b85c013de60ba13555 (patch)
tree6f852f5c3040bacbad3040fa00022955e78b63ee /config
parent6e8aaab1b43be06b4fde60ad5bd583a8a08f882a (diff)
downloadhdf5-c8fdd92cd4d53e5343b475b85c013de60ba13555.zip
hdf5-c8fdd92cd4d53e5343b475b85c013de60ba13555.tar.gz
hdf5-c8fdd92cd4d53e5343b475b85c013de60ba13555.tar.bz2
Update CMake code to 3.18 minimum version (#2080)
* Update CMake code to 3.18 minimum version * Updated release note
Diffstat (limited to 'config')
-rw-r--r--config/cmake/CTestScript.cmake2
-rw-r--r--config/cmake/ConfigureChecks.cmake90
-rw-r--r--config/cmake/FindMFU.cmake4
-rw-r--r--config/cmake/FindSZIP.cmake4
-rw-r--r--config/cmake/HDF5PluginMacros.cmake8
-rw-r--r--config/cmake/HDF5UseFortran.cmake38
-rw-r--r--config/cmake/HDF5_Examples.cmake.in2
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake8
-rw-r--r--config/cmake/HDFCompilerFlags.cmake8
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake8
-rw-r--r--config/cmake/HDFMacros.cmake17
-rw-r--r--config/cmake/HDFUseFortran.cmake105
-rw-r--r--config/cmake/fileCompareTest.cmake84
-rw-r--r--config/cmake/grepTest.cmake6
-rw-r--r--config/cmake/jrunTest.cmake4
-rw-r--r--config/cmake/runTest.cmake36
-rw-r--r--config/cmake/scripts/CTestScript.cmake2
-rw-r--r--config/cmake/scripts/HDF5config.cmake2
-rw-r--r--config/cmake/userblockTest.cmake2
-rw-r--r--config/cmake/wait_H5Tinit.cmake2
20 files changed, 117 insertions, 315 deletions
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index dcf2685..a2b122c 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.12)
+cmake_minimum_required (VERSION 3.18)
########################################################
# For any comments please contact cdashhelp@hdfgroup.org
#
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index d0de99b..d71ca08 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -187,9 +187,7 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
)
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "Performing ${OTHER_TEST}")
- endif ()
+ message (TRACE "Performing ${OTHER_TEST}")
try_compile (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_DIR}/HDFTests.c
@@ -199,13 +197,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
)
if (${OTHER_TEST})
set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success")
- endif ()
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success")
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed")
- endif ()
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed")
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"
@@ -259,23 +253,17 @@ 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)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... yes")
- endif ()
+ message (VERBOSE "${msg}... yes")
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${msg}... no")
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})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Compile failed\n"
)
@@ -308,15 +296,11 @@ endif ()
macro (HDF_CHECK_TYPE_SIZE type var)
set (aType ${type})
set (aVar ${var})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "Checking size of ${aType} and storing into ${aVar}")
- endif ()
+ message (TRACE "Checking size of ${aType} and storing into ${aVar}")
CHECK_TYPE_SIZE (${aType} ${aVar})
if (NOT ${aVar})
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "Size of ${aType} was NOT Found")
- endif ()
+ message (TRACE "Size of ${aType} was NOT Found")
endif ()
endmacro ()
@@ -507,9 +491,7 @@ endif ()
#-----------------------------------------------------------------------------
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Checking for InitOnceExecuteOnce:")
- endif ()
+ message (VERBOSE "Checking for InitOnceExecuteOnce:")
if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO)
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
@@ -538,9 +520,7 @@ 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")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing Test InitOnceExecuteOnce - Success")
- endif ()
+ message (VERBOSE "Performing Test InitOnceExecuteOnce - Success")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test InitOnceExecuteOnce succeeded with the following output:\n"
"${OUTPUT}\n"
@@ -552,9 +532,7 @@ if (WINDOWS)
set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed")
- endif ()
+ message (VERBOSE "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"
@@ -717,18 +695,14 @@ if (NOT WINDOWS)
add_definitions ("-D_GNU_SOURCE")
else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${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 ()
else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
@@ -794,9 +768,7 @@ endif ()
#-----------------------------------------------------------------------------
set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR RETURN_OUTPUT_VAR)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Detecting C ${FUNCTION_NAME}")
- endif ()
+ message (VERBOSE "Detecting C ${FUNCTION_NAME}")
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
${SOURCE_CODE}
@@ -811,29 +783,23 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR RETURN_OUTPUT_VAR)
set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
- message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- endif ()
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
+ message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
if (COMPILE_RESULT_VAR)
if (RUN_RESULT_VAR EQUAL "0")
set (${RETURN_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
- endif ()
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
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 ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
- endif ()
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
set (${RETURN_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"
@@ -906,23 +872,17 @@ macro (H5ConversionTests TEST msg)
if (${TEST}_COMPILE)
if (${TEST}_RUN EQUAL "0")
set (${TEST} 1 CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... yes")
- endif ()
+ message (VERBOSE "${msg}... yes")
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${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 ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
diff --git a/config/cmake/FindMFU.cmake b/config/cmake/FindMFU.cmake
index 37699e2..2a4278a 100644
--- a/config/cmake/FindMFU.cmake
+++ b/config/cmake/FindMFU.cmake
@@ -89,9 +89,7 @@ if (NOT MFU_FOUND)
"Mfu was not found. Make sure MFU_LIBRARY and MFU_INCLUDE_DIR are set or set the MFU_INSTALL environment variable."
)
if (NOT MFU_FIND_QUIETLY)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${MFU_DIR_MESSAGE}")
- endif ()
+ message (VERBOSE "${MFU_DIR_MESSAGE}")
else ()
if (MFU_FIND_REQUIRED)
message (FATAL_ERROR "Mfu was NOT found and is Required by this project")
diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake
index 846a3d1..b96a732 100644
--- a/config/cmake/FindSZIP.cmake
+++ b/config/cmake/FindSZIP.cmake
@@ -118,9 +118,7 @@ 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)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${SZIP_DIR_MESSAGE}")
- endif ()
+ message (VERBOSE "${SZIP_DIR_MESSAGE}")
else ()
if (SZIP_FIND_REQUIRED)
message (FATAL_ERROR "SZip was NOT found and is Required by this project")
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
index 53afe1a..ba1f56f 100644
--- a/config/cmake/HDF5PluginMacros.cmake
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -14,9 +14,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
)
endif ()
FetchContent_GetProperties(PLUGIN)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
- endif ()
+ message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
if(NOT PLUGIN_POPULATED)
FetchContent_Populate(PLUGIN)
include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake)
@@ -68,9 +66,7 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}")
endif ()
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
- endif ()
+ message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
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 43e006c..79084cb 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -19,10 +19,8 @@ enable_language (Fortran)
set (HDF_PREFIX "H5")
include (CheckFortranFunctionExists)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- include (CheckFortranSourceRuns)
- include (CheckFortranSourceCompiles)
-endif ()
+include (CheckFortranSourceRuns)
+include (CheckFortranSourceCompiles)
# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
@@ -36,9 +34,7 @@ set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
# so this one is used.
#-----------------------------------------------------------------------------
macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR RETURN_OUTPUT_VAR)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}")
- endif ()
+ message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}")
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
"${SOURCE_CODE}"
@@ -54,24 +50,18 @@ 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)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK")
- endif ()
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION_NAME} exists passed\n"
)
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail")
- endif ()
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n"
)
endif ()
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail")
- endif ()
+ message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n"
)
@@ -82,11 +72,7 @@ endmacro ()
# Check to see C_LONG_DOUBLE is available
READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
-else ()
- CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE)
-endif ()
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
if (${FORTRAN_HAVE_C_LONG_DOUBLE})
set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1)
@@ -97,11 +83,7 @@ endif ()
# Check to see C_LONG_DOUBLE is different from C_DOUBLE
READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
-else ()
- CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE)
-endif ()
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1)
else ()
@@ -212,9 +194,7 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}")
set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}")
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
-endif ()
+message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 23c07e8..43e9ea3 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.12)
+cmake_minimum_required (VERSION 3.18)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index e654db3..b1e4b3c 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -17,9 +17,7 @@ set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
set (CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
-endif ()
+message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -140,9 +138,7 @@ else ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
- endif ()
+ message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 3a0a590..504c163 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -14,9 +14,7 @@ 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}")
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: C default: ${CMAKE_C_FLAGS}")
-endif ()
+message (VERBOSE "Warnings Configuration: C default: ${CMAKE_C_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -163,9 +161,7 @@ else ()
elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
- endif ()
+ message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 7fdc3f8..108a4e9 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -10,9 +10,7 @@
# help@hdfgroup.org.
#
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
-endif ()
+message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
@@ -75,9 +73,7 @@ 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 ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
- endif ()
+ message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# Append more extra warning flags that only gcc 4.8+ knows about
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index 9d98408..f91c537 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -28,9 +28,7 @@ macro (SET_HDF_BUILD_TYPE)
endif()
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.")
- endif()
+ message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.")
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"
@@ -448,19 +446,6 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_GENERIC_PROGRAM_FILES)
endif ()
endif ()
-
-#-----------------------------------------------------------------------------
-# Setup pre-3.14 FetchContent
-#-----------------------------------------------------------------------------
- if(${CMAKE_VERSION} VERSION_LESS 3.14)
- macro(FetchContent_MakeAvailable NAME)
- FetchContent_GetProperties(${NAME})
- if(NOT ${NAME}_POPULATED)
- FetchContent_Populate(${NAME})
- add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
- endif()
- endmacro()
- endif()
endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)
diff --git a/config/cmake/HDFUseFortran.cmake b/config/cmake/HDFUseFortran.cmake
index c96298f..61adffd 100644
--- a/config/cmake/HDFUseFortran.cmake
+++ b/config/cmake/HDFUseFortran.cmake
@@ -16,10 +16,8 @@
enable_language (Fortran)
set (HDF_PREFIX "H5")
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- include (CheckFortranSourceRuns)
- include (CheckFortranSourceCompiles)
-endif ()
+include (CheckFortranSourceRuns)
+include (CheckFortranSourceCompiles)
#-------------------------------------------------------------------------------
# Fix Fortran flags if we are compiling statically on Windows using
@@ -119,98 +117,15 @@ set (ISO_C_BINDING_CODE
"
)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- if (HDF5_REQUIRED_LIBRARIES)
- set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
- endif ()
- check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
- check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
- check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
- check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
- check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90)
- check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
-else ()
- #-----------------------------------------------------------------------------
- # 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 (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}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- "${CODE}"
- )
- TRY_COMPILE (RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
- # 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}")
- 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"
- )
- else ()
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} 0 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 ()
- endmacro ()
-
- #-----------------------------------------------------------------------------
- # Configure Checks which require Fortran compilation must go in here
- # not in the main ConfigureChecks.cmake files, because if the user has
- # no Fortran compiler, problems arise.
- #
- # Be careful with leading spaces here, do not remove them.
- #-----------------------------------------------------------------------------
-
- # Check for Non-standard extension intrinsic function SIZEOF
- set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
- CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF)
-
- # Check for F2008 standard intrinsic function C_SIZEOF
- set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
- CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF)
-
- # Check for F2008 standard intrinsic function STORAGE_SIZE
- CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
-
- # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
- set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
- CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV)
-
- set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
- CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
-
- #-----------------------------------------------------------------------------
- # Checks if the ISO_C_BINDING module meets all the requirements
- #-----------------------------------------------------------------------------
- set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
- CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING)
+if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
endif ()
+check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
+check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
+check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
+check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
+check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90)
+check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
#-----------------------------------------------------------------------------
# Add debug information (intel Fortran : JB)
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
index 4a8dc09..18a29d9 100644
--- a/config/cmake/fileCompareTest.cmake
+++ b/config/cmake/fileCompareTest.cmake
@@ -46,66 +46,50 @@ if (TEST_STRINGS STREQUAL "YES")
# now compare the outputs
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE}
RESULT_VARIABLE TEST_RESULT
)
- 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 ()
+ message (VERBOSE "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 EQUAL TEST_EXPECT)
message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
endif ()
else ()
- if (CMAKE_VERSION VERSION_LESS "3.14.0")
- message (FATAL_ERROR "CANNOT get file size, file command SIZE not supported")
- else ()
- file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE)
- file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
- if (TEST_FUNCTION MATCHES "LT")
- if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
- 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)
- 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)
- 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)
- 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)
- 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 ()
+ file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE)
+ file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
+ if (TEST_FUNCTION MATCHES "LT")
+ if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ 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 (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ 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 (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
else ()
- message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}")
+ 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 (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ 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 (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}")
endif ()
endif ()
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index 3b0baf5..9e80956 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -49,9 +49,7 @@ endif ()
if (TEST_ENV_VAR)
set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
- endif ()
+ message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
endif ()
# run the test program, capture the stdout/stderr and the result var
@@ -112,7 +110,7 @@ if (TEST_ERRREF)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index be856c5..21183af 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -148,7 +148,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -218,7 +218,7 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index ad72a9e..12b4818 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -212,19 +212,19 @@ if (NOT TEST_SKIP_COMPARE)
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
- if (WIN32)
- configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
- if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
- file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
- endif ()
- #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif ()
+ # if (WIN32) # no longer needed for CMake > 3.15
+ # configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
+ # if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp")
+ # file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE})
+ # endif ()
+ # #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ # #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+ # endif ()
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -287,18 +287,18 @@ if (NOT TEST_SKIP_COMPARE)
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
- if (WIN32)
- configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
- if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
- file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
- endif ()
- #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
- endif ()
+ # if (WIN32) # no longer needed for CMake > 3.15
+ # configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
+ # if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp")
+ # file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF})
+ # endif ()
+ # #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
+ # #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
+ # endif ()
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index b142ade..f1dd662 100644
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.12)
+cmake_minimum_required (VERSION 3.18)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index 3f46aed..ff13b84 100644
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -15,7 +15,7 @@
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################
-cmake_minimum_required (VERSION 3.12)
+cmake_minimum_required (VERSION 3.18)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index e6a278c..dde66c9 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -102,7 +102,7 @@ if (TEST_CHECKUB STREQUAL "YES")
# now compare the outputs
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
RESULT_VARIABLE TEST_RESULT
)
diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake
index b778765..a8781fe 100644
--- a/config/cmake/wait_H5Tinit.cmake
+++ b/config/cmake/wait_H5Tinit.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.12)
+cmake_minimum_required (VERSION 3.18)
message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)