summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/CTestCustom.cmake26
-rw-r--r--config/cmake/CTestScript.cmake167
-rw-r--r--config/cmake/ConfigureChecks.cmake103
-rw-r--r--config/cmake/ConversionTests.c12
-rw-r--r--config/cmake/H5cxx_config.h.in12
-rw-r--r--config/cmake/H5pubconf.h.in49
-rw-r--r--config/cmake/HDF518_Examples.cmake.in200
-rw-r--r--config/cmake/HDF5Macros.cmake35
-rw-r--r--config/cmake/HDF5_Examples_options.cmake56
-rw-r--r--config/cmake/HDFCompilerFlags.cmake215
-rw-r--r--config/cmake/README.txt.cmake.in4
-rw-r--r--config/cmake/UserMacros/Windows_MT.cmake30
-rw-r--r--config/cmake/cacheinit.cmake13
-rw-r--r--config/cmake/hdf5-config-version.cmake.in41
-rw-r--r--config/cmake/hdf5-config.cmake.in12
-rw-r--r--config/cmake/mccacheinit.cmake11
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake365
-rwxr-xr-xconfig/cmake/scripts/HDF518config.cmake266
-rwxr-xr-xconfig/cmake/scripts/HDF5config.cmake277
-rw-r--r--config/cmake/scripts/HDF5options.cmake52
-rw-r--r--config/cmake/userblockTest.cmake45
-rw-r--r--config/cmake/vfdTest.cmake56
22 files changed, 1247 insertions, 800 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 8d80f19..4091687 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -1,5 +1,21 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
-
+# Allow full output to go to CDash set to 0
+SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
+SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
+# WARNING! This could be a lot of output and could overwhelm CDash and the
+# MySQL DB so this might not be a good idea!
+
set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:"
@@ -16,7 +32,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
"note: expanded from macro"
# "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro"
)
-
+
set (CTEST_CUSTOM_MEMCHECK_IGNORE
${CTEST_CUSTOM_MEMCHECK_IGNORE}
H5TEST-flush1 #designed to fail
@@ -47,6 +63,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5DUMP_PACKED_BITS-clearall-objects
H5DUMP-XML-clearall-objects
######### tools/h5import #########
+ H5IMPORT-h5importtest-clear-objects
H5IMPORT-clear-objects
######### tools/h5jam #########
H5JAM-SETUP-N_twithub_u10_c-clear-objects
@@ -204,6 +221,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK_VERIFY_LAYOUT_ALL-layout_long_switches #uses grepTest.cmake
H5REPACK_VERIFY_LAYOUT_ALL-layout_short_switches #uses grepTest.cmake
H5REPACK-plugin
+ H5REPACK_CMP-plugin_zero
######### tools/h5stat #########
H5STAT-clearall-objects
######### tools/misc #########
@@ -212,4 +230,8 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
######### examples #########
EXAMPLES-clear-objects
CPP_ex-clear-objects
+ CPP_ex_tutr-clear-objects
+ HL_ex-clear-objects
+ f90_ex-clear-objects
+ HL_FORTRAN_f90_ex-clear-objects
)
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
new file mode 100644
index 0000000..bf9e633
--- /dev/null
+++ b/config/cmake/CTestScript.cmake
@@ -0,0 +1,167 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
+########################################################
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+########################################################
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+if (NOT SITE_OS_NAME)
+ ## machine name not provided - attempt to discover with uname
+ ## -- set hostname
+ ## --------------------------
+ find_program (HOSTNAME_CMD NAMES hostname)
+ exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program (UNAME NAMES uname)
+ macro (getuname name flag)
+ exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro ()
+
+ getuname (osname -s)
+ getuname (osrel -r)
+ getuname (cpu -m)
+ message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+ if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else ()
+ ## machine name provided
+ ## --------------------------
+ if (CMAKE_HOST_UNIX)
+ set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+ else ()
+ set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+ endif ()
+ if (SITE_BUILDNAME_SUFFIX)
+ set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif ()
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if (APPLE)
+ # Compiler choice
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
+
+ if (NOT NO_MAC_FORTRAN)
+ # Shared fortran is not supported, build static
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ else ()
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ endif ()
+
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
+
+#-----------------------------------------------------------------------------
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
+ ## Uncompress source if tar or zip file provided
+ ## --------------------------
+ if (WIN32)
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else ()
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif ()
+
+ if (NOT rv EQUAL 0)
+ message (STATUS "extracting... [error-(${rv}) clean up]")
+ file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+else ()
+ file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif ()
+
+# Use multiple CPU cores to build
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+ if (NOT WIN32)
+ set (CTEST_BUILD_FLAGS -j${N})
+ endif ()
+ set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+set(CTEST_CONFIGURE_TOOLSET "")
+if(CMAKE_GENERATOR_TOOLSET)
+ set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+endif()
+set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set ($ENV{LC_MESSAGES} "en_EN")
+
+#-----------------------------------------------------------------------------
+ configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+#-----------------------------------------------------------------------------
+ ## NORMAL process
+ ## -- LOCAL_SUBMIT reports to CDash server
+ ## --------------------------
+ ctest_start (Experimental)
+ ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Configure Notes)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+ endif ()
+
+ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Build)
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+ endif ()
+
+ ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+ if (LOCAL_SUBMIT)
+ ctest_submit (PARTS Test)
+ endif()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ message (FATAL_ERROR "tests FAILED")
+ endif ()
+#-----------------------------------------------------------------------------
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 606fae9..7068345 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
#-----------------------------------------------------------------------------
# Include all the necessary files for macros
#-----------------------------------------------------------------------------
@@ -10,7 +21,7 @@ include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
if (HDF5_Enable_Clear_File_Buffers)
set (H5_CLEAR_MEMORY 1)
-endif (HDF5_Enable_Clear_File_Buffers)
+endif ()
MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
#-----------------------------------------------------------------------------
@@ -19,7 +30,7 @@ MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
if (HDF5_STRICT_FORMAT_CHECKS)
set (H5_STRICT_FORMAT_CHECKS 1)
-endif (HDF5_STRICT_FORMAT_CHECKS)
+endif ()
MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
@@ -28,7 +39,7 @@ MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
option (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
if (HDF5_METADATA_TRACE_FILE)
set (H5_METADATA_TRACE_FILE 1)
-endif (HDF5_METADATA_TRACE_FILE)
+endif ()
MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# ----------------------------------------------------------------------
@@ -40,7 +51,7 @@ MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON)
if (HDF5_WANT_DATA_ACCURACY)
set (H5_WANT_DATA_ACCURACY 1)
-endif (HDF5_WANT_DATA_ACCURACY)
+endif ()
MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# ----------------------------------------------------------------------
@@ -52,7 +63,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON)
if (HDF5_WANT_DCONV_EXCEPTION)
set (H5_WANT_DCONV_EXCEPTION 1)
-endif (HDF5_WANT_DCONV_EXCEPTION)
+endif ()
MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
# ----------------------------------------------------------------------
@@ -61,7 +72,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
if (HDF5_ENABLE_CODESTACK)
set (H5_HAVE_CODESTACK 1)
-endif (HDF5_ENABLE_CODESTACK)
+endif ()
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
#-----------------------------------------------------------------------------
@@ -70,7 +81,7 @@ MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
if (HDF5_ENABLE_HSIZET)
set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1)
-endif (HDF5_ENABLE_HSIZET)
+endif ()
# so far we have no check for this
set (H5_HAVE_TMPFILE 1)
@@ -84,10 +95,10 @@ set (H5_DEFAULT_VFD H5FD_SEC2)
if (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
if (WINDOWS)
set (H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%\\\\hdf5\\\\lib\\\\plugin")
- else (WINDOWS)
+ else ()
set (H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin")
- endif (WINDOWS)
-endif (NOT DEFINED "H5_DEFAULT_PLUGINDIR")
+ endif ()
+endif ()
if (WINDOWS)
set (H5_HAVE_WINDOWS 1)
@@ -96,7 +107,7 @@ if (WINDOWS)
# that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/").
# (This flag should be _unset_ for all machines, except for Windows)
set (H5_HAVE_WINDOW_PATH 1)
-endif (WINDOWS)
+endif ()
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
@@ -106,9 +117,9 @@ CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME)
# Find the library containing clock_gettime()
if (NOT WINDOWS)
- CHECK_FUNCTION_EXISTS(clock_gettime CLOCK_GETTIME_IN_LIBC)
- CHECK_LIBRARY_EXISTS(rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
- CHECK_LIBRARY_EXISTS(posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4)
+ CHECK_FUNCTION_EXISTS (clock_gettime CLOCK_GETTIME_IN_LIBC)
+ CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
+ CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4)
if (CLOCK_GETTIME_IN_LIBC)
set (H5_HAVE_CLOCK_GETTIME 1)
elseif (CLOCK_GETTIME_IN_LIBRT)
@@ -117,15 +128,15 @@ if (NOT WINDOWS)
elseif (CLOCK_GETTIME_IN_LIBPOSIX4)
set (H5_HAVE_CLOCK_GETTIME 1)
list (APPEND LINK_LIBS posix4)
- endif (CLOCK_GETTIME_IN_LIBC)
-endif (NOT WINDOWS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Check if Direct I/O driver works
#-----------------------------------------------------------------------------
if (NOT WINDOWS)
- option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" ON)
+ option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF)
if (HDF5_ENABLE_DIRECT_VFD)
set (msg "Performing TEST_DIRECT_VFD_WORKS")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
@@ -136,32 +147,32 @@ if (NOT WINDOWS)
OUTPUT_VARIABLE OUTPUT
)
if (TEST_DIRECT_VFD_WORKS_COMPILE)
- if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+ if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
HDF_FUNCTION_TEST (HAVE_DIRECT)
set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
add_definitions ("-D_GNU_SOURCE")
- else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
+ else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
- endif (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
- else (TEST_DIRECT_VFD_WORKS_COMPILE )
+ endif ()
+ else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
- endif (TEST_DIRECT_VFD_WORKS_COMPILE)
- endif (HDF5_ENABLE_DIRECT_VFD)
-endif (NOT WINDOWS)
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
#-----------------------------------------------------------------------------
-MACRO (H5ConversionTests TEST msg)
+macro (H5ConversionTests TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
# message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
@@ -171,41 +182,41 @@ MACRO (H5ConversionTests TEST msg)
OUTPUT_VARIABLE OUTPUT
)
if (${TEST}_COMPILE)
- if (${TEST}_RUN MATCHES 0)
+ if (${TEST}_RUN MATCHES 0)
set (${TEST} 1 CACHE INTERNAL ${msg})
message (STATUS "${msg}... yes")
- else (${TEST}_RUN MATCHES 0)
+ else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
- endif (${TEST}_RUN MATCHES 0)
- else (${TEST}_COMPILE )
+ endif ()
+ else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
- endif (${TEST}_COMPILE)
+ endif ()
- endif ("${TEST}" MATCHES "^${TEST}$")
-ENDMACRO (H5ConversionTests)
+ endif ()
+endmacro ()
#-----------------------------------------------------------------------------
# Macro to make some of the conversion tests easier to write/read
#-----------------------------------------------------------------------------
-MACRO (H5MiscConversionTest VAR TEST msg)
+macro (H5MiscConversionTest VAR TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
if (${VAR})
set (${TEST} 1 CACHE INTERNAL ${msg})
message (STATUS "${msg}... yes")
- else (${VAR})
+ else ()
set (${TEST} "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
- endif (${VAR})
- endif ("${TEST}" MATCHES "^${TEST}$")
-ENDMACRO (H5MiscConversionTest)
+ endif ()
+ endif ()
+endmacro ()
#-----------------------------------------------------------------------------
# Check various conversion capabilities
@@ -213,9 +224,9 @@ ENDMACRO (H5MiscConversionTest)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm to convert
-# 'long double' to '(unsigned) long' values. (This flag should only be set for
-# the IBM Power6 Linux. When the bit sequence of long double is
-# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
+# 'long double' to '(unsigned) long' values. (This flag should only be set for
+# the IBM Power6 Linux. When the bit sequence of long double is
+# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
@@ -223,10 +234,10 @@ ENDMACRO (H5MiscConversionTest)
H5ConversionTests (H5_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
-# to convert some values of '(unsigned) long' to 'long double' values.
-# (This flag should be off for all machines, except for IBM Power6 Linux,
-# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
-# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
+# to convert some values of '(unsigned) long' to 'long double' values.
+# (This flag should be off for all machines, except for IBM Power6 Linux,
+# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
+# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
#
H5ConversionTests (H5_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
@@ -255,7 +266,7 @@ H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restricti
# -----------------------------------------------------------------------
# wrapper script variables
-#
+#
set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix "\${prefix}")
set (libdir "${exec_prefix}/lib")
@@ -266,4 +277,4 @@ set (CXX ${CMAKE_CXX_COMPILER})
set (FC ${CMAKE_Fortran_COMPILER})
foreach (LINK_LIB ${LINK_LIBS})
set (LIBS "${LIBS} -l${LINK_LIB}")
-endforeach (LINK_LIB ${LINK_LIBS})
+endforeach ()
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index b8946a8..022a296 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -1,3 +1,15 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
#include <string.h>
diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in
index c4e1c03..098a5d8 100644
--- a/config/cmake/H5cxx_config.h.in
+++ b/config/cmake/H5cxx_config.h.in
@@ -1,3 +1,15 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
/* src/H5cxx_config.h.in Created manually. */
/* Define if offsetof extension is present */
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 13740ea..f413832 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -1,3 +1,15 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
/* H5pubconf.h Generated By CMake during the configuration */
#ifndef H5_CONFIG_H_
@@ -73,7 +85,7 @@
/* Define to 1 if you have the `difftime' function. */
#cmakedefine H5_HAVE_DIFFTIME @H5_HAVE_DIFFTIME@
-/* Define if the direct I/O virtual file driver should be compiled */
+/* Define if the direct I/O virtual file driver (VFD) should be compiled */
#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@
/* Define to 1 if you have the <dirent.h> header file. */
@@ -148,7 +160,7 @@
/* Define if the compiler understands inline */
#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@
-/* Define if library will contain instrumentation to detect correct
+/* Define if parallel library will contain instrumentation to detect correct
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
@@ -185,9 +197,21 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@
+/* Define to 1 if you have the `llround' function. */
+#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@
+
+/* Define to 1 if you have the `llroundf' function. */
+#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@
+
/* Define to 1 if you have the `longjmp' function. */
#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@
+/* Define to 1 if you have the `lround' function. */
+#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@
+
+/* Define to 1 if you have the `lroundf' function. */
+#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@
+
/* Define to 1 if you have the `lseek64' function. */
#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@
@@ -227,6 +251,12 @@
/* Define to 1 if you have the `rand_r' function. */
#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
+/* Define to 1 if you have the `round' function. */
+#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
+
+/* Define to 1 if you have the `roundf' function. */
+#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
+
/* Define to 1 if you have the `setjmp' function. */
#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@
@@ -275,6 +305,12 @@
/* Define to 1 if you have the `strdup' function. */
#cmakedefine H5_HAVE_STRDUP @H5_HAVE_STRDUP@
+/* Define to 1 if you have the `strtoll' function. */
+#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@
+
+/* Define to 1 if you have the `strtoull' function. */
+#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@
+
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@
@@ -293,6 +329,9 @@
/* Define to 1 if you have the `system' function. */
#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@
+/* Define to 1 if you have the <sys/file.h> header file. */
+#cmakedefine H5_HAVE_SYS_FILE_H @H5_HAVE_SYS_FILE_H@
+
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine H5_HAVE_SYS_IOCTL_H @H5_HAVE_SYS_IOCTL_H@
@@ -347,6 +386,9 @@
/* Define to 1 if you have the `waitpid' function. */
#cmakedefine H5_HAVE_WAITPID @H5_HAVE_WAITPID@
+/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */
+#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@
+
/* Define if your system has window style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@
@@ -387,8 +429,7 @@
with special algorithm. */
#cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@
/* Define if the metadata trace file code is to be compiled in */
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index e1cb781..6214b9f 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -1,4 +1,15 @@
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
@@ -6,88 +17,75 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
###############################################################################################################
set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+if("@CMAKE_GENERATOR_TOOLSET@")
+ set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
+endif()
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
# handle input parameters to script.
#INSTALLDIR - HDF5-1.8 root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
-#STATIC_LIBRARIES - Default is YES
-#FORTRAN_LIBRARIES - Default is NO
-##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
+#CTEST_SOURCE_NAME - name of source folder; HDF5Examples
if(DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach(current_var ${script_args})
- if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif()
- endforeach()
-endif()
-if(NOT DEFINED INSTALLDIR)
- set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
endif()
+
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set(CTEST_CONFIGURATION_TYPE "Release")
-endif()
-if(NOT DEFINED CTEST_SOURCE_NAME)
- set(CTEST_SOURCE_NAME "HDF5Examples")
+ set(CTEST_CONFIGURATION_TYPE "Release")
endif()
-if(NOT DEFINED STATIC_LIBRARIES)
- set(STATICLIBRARIES "YES")
-else(NOT DEFINED STATIC_LIBRARIES)
- set(STATICLIBRARIES "NO")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}")
+##################################################################
+
+if(NOT DEFINED INSTALLDIR)
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
endif()
-if(NOT DEFINED FORTRAN_LIBRARIES)
- set(FORTRANLIBRARIES "NO")
-else(NOT DEFINED FORTRAN_LIBRARIES)
- set(FORTRANLIBRARIES "YES")
+
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "HDF5Examples")
endif()
+
if(NOT DEFINED HDF_LOCAL)
- set(CDASH_LOCAL "NO")
-else(NOT HDF_LOCAL)
- set(CDASH_LOCAL "YES")
+ set(CDASH_LOCAL "NO")
+else()
+ set(CDASH_LOCAL "YES")
endif()
if(NOT DEFINED CTEST_SITE)
- set(CTEST_SITE "local")
+ set(CTEST_SITE "local")
endif()
if(NOT DEFINED CTEST_BUILD_NAME)
- set(CTEST_BUILD_NAME "examples")
+ set(CTEST_BUILD_NAME "examples")
endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-0.2.4-Source")
#endif()
###############################################################################################################
-# Adjust the following SET Commands as needed
-###############################################################################################################
if(WIN32)
- if(${STATICLIBRARIES})
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- endif()
+ set(SITE_OS_NAME "Windows")
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else(WIN32)
- if(${STATICLIBRARIES})
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- endif()
+else()
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif(WIN32)
-if(${FORTRANLIBRARIES})
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
-else()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
endif()
if(${CDASH_LOCAL})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON")
@@ -99,102 +97,10 @@ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HD
#
###############################################################################################################
-#-----------------------------------------------------------------------------
-# MAC machines need special option
-#-----------------------------------------------------------------------------
-if(APPLE)
- # Compiler choice
- execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(ENV{CC} "${XCODE_CC}")
- set(ENV{CXX} "${XCODE_CXX}")
- if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
- endif()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif()
-
-#-----------------------------------------------------------------------------
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-## --------------------------
-if(CTEST_USE_TAR_SOURCE)
- ## Uncompress source if tar or zip file provided
- ## --------------------------
- if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif()
-
- if(NOT rv EQUAL 0)
- message(STATUS "extracting... [error-(${rv}) clean up]")
- file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
- endif()
-endif(CTEST_USE_TAR_SOURCE)
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
- ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-else ()
- file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif ()
-
-# Use multiple CPU cores to build
-include(ProcessorCount)
-ProcessorCount(N)
-if(NOT N EQUAL 0)
- if(NOT WIN32)
- set(CTEST_BUILD_FLAGS -j${N})
- endif()
- set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif()
-set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
-)
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set($ENV{LC_MESSAGES} "en_EN")
-
-#-----------------------------------------------------------------------------
-configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
-ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
-## NORMAL process
-## --------------------------
-ctest_start (Experimental)
-ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-if(${res} LESS 0 OR ${res} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
-endif()
-if(LOCAL_SUBMIT)
- ctest_submit (PARTS Configure Notes)
-endif()
-ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval)
-if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
-endif()
-if(LOCAL_SUBMIT)
- ctest_submit (PARTS Build)
-endif()
-ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
-if(${res} LESS 0 OR ${res} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
-endif()
-if(LOCAL_SUBMIT)
- ctest_submit (PARTS Test)
-endif()
-if(${res} LESS 0 OR ${res} GREATER 0)
- message (FATAL_ERROR "tests FAILED")
+if(WIN32)
+ include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake)
+ include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+else()
+ include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake)
+ include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
endif()
-#-----------------------------------------------------------------------------
-##############################################################################################################
-message(STATUS "DONE") \ No newline at end of file
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index d88e672..ba1fb40 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
#-------------------------------------------------------------------------------
macro (H5_SET_LIB_OPTIONS libtarget libname libtype)
set (LIB_OUT_NAME "${libname}")
@@ -5,21 +16,21 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype)
if (${libtype} MATCHES "SHARED")
if (ARGN)
set (PACKAGE_SOVERSION ${ARGN})
- else (ARGN)
+ else ()
set (PACKAGE_SOVERSION ${HDF5_PACKAGE_SOVERSION})
- endif (ARGN)
+ endif ()
if (WIN32)
set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
- else (WIN32)
+ else ()
set (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION})
- endif (WIN32)
+ endif ()
set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION})
if (WIN32)
set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${PACKAGE_SOVERSION}")
- else (WIN32)
+ else ()
set_target_properties (${libtarget} PROPERTIES SOVERSION ${PACKAGE_SOVERSION})
- endif (WIN32)
- endif (${libtype} MATCHES "SHARED")
+ endif ()
+ endif ()
HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype})
#-- Apple Specific install_name for libraries
@@ -31,7 +42,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype)
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
- endif (HDF5_BUILD_WITH_INSTALL_NAME)
+ endif ()
if (HDF5_BUILD_FRAMEWORKS)
if (${libtype} MATCHES "SHARED")
# adapt target to build frameworks instead of dylibs
@@ -42,8 +53,8 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype)
MACOSX_FRAMEWORK_IDENTIFIER org.hdfgroup.${libtarget}
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${HDF5_PACKAGE_VERSION_MAJOR}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${HDF5_PACKAGE_VERSION_MAJOR})
- endif (${libtype} MATCHES "SHARED")
- endif (HDF5_BUILD_FRAMEWORKS)
- endif (APPLE)
+ endif ()
+ endif ()
+ endif ()
-endmacro (H5_SET_LIB_OPTIONS)
+endmacro ()
diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake
new file mode 100644
index 0000000..f6e8dd2
--- /dev/null
+++ b/config/cmake/HDF5_Examples_options.cmake
@@ -0,0 +1,56 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#### DEFAULT: ###
+#### BUILD_SHARED_LIBS:BOOL=OFF ###
+#### HDF_BUILD_C:BOOL=ON ###
+#### HDF_BUILD_CXX:BOOL=OFF ###
+#### HDF_BUILD_FORTRAN:BOOL=OFF ###
+#### BUILD_TESTING:BOOL=OFF ###
+#### HDF_ENABLE_PARALLEL:BOOL=OFF ###
+#### HDF_ENABLE_THREADSAFE:BOOL=OFF ###
+#############################################################################################
+
+### uncomment/comment and change the following lines for other configuration options
+### build with shared libraries
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")
+
+#############################################################################################
+#### languages ####
+### disable C builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF")
+
+### enable C++ builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_CXX:BOOL=ON")
+
+### enable Fortran builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+
+
+#############################################################################################
+### enable parallel program builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON")
+
+
+#############################################################################################
+### enable threadsafe program builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_THREADSAFE:BOOL=ON")
+
+
+#############################################################################################
+### enable test program builds, requires reference files in testfiles subdirectory
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON")
+
+#############################################################################################
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index c637c73..4ea8702 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -12,21 +23,21 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
- endif (CMAKE_BUILD_TYPE MATCHES Debug)
-endif (CMAKE_COMPILER_IS_GNUCC)
-if (CMAKE_COMPILER_IS_GNUCXX)
+ endif ()
+endif ()
+if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
if (CMAKE_BUILD_TYPE MATCHES Debug)
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99")
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
endif ()
- else (CMAKE_BUILD_TYPE MATCHES Debug)
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99")
+ else ()
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
endif ()
- endif (CMAKE_BUILD_TYPE MATCHES Debug)
-endif (CMAKE_COMPILER_IS_GNUCXX)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
@@ -41,22 +52,22 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
- endif (MSVC)
+ endif ()
if (WIN32)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- endif (WIN32)
+ endif ()
# Borland uses -w- to suppress warnings.
if (BORLAND)
set (HDF5_WARNINGS_BLOCKED 1)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
- endif (BORLAND)
+ endif ()
# Most compilers use -w to suppress warnings.
if (NOT HDF5_WARNINGS_BLOCKED)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
- endif (NOT HDF5_WARNINGS_BLOCKED)
-endif (HDF5_DISABLE_COMPILER_WARNINGS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so
@@ -64,10 +75,22 @@ endif (HDF5_DISABLE_COMPILER_WARNINGS)
#-----------------------------------------------------------------------------
if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline")
- else (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set (CMAKE_C_FLAGS_5 "${CMAKE_C_FLAGS_5} -Wcast-qual")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs")
+ else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=%none -DBSD_COMP")
- endif (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ endif ()
+
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to enable developer warnings
+ #-----------------------------------------------------------------------------
+ option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winline -Waggregate-return")
+ else ()
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-inline -Wno-aggregate-return")
+ endif ()
+
# Append warning flags
# Don't use the '-Wtraditional' flag, we're way past having K&R C code
# set (H5_CFLAGS "${H5_CFLAGS} -Wtraditional")
@@ -83,75 +106,102 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wfloat-equal -Wmissing-format-attribute")
# Append warning flags from gcc-3.2* case
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn -Wpacked -Wdisabled-optimization")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wpacked -Wdisabled-optimization")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wmissing-noreturn")
+ else ()
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wno-missing-noreturn")
+ endif ()
# Enable more format checking flags, beyond the basic -Wformat included
# in -Wall
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wformat=2")
-
- # The "unreachable code" warning appears to be reliable now...
- # (this warning was removed in gcc 4.5+)
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wunreachable-code")
- endif()
+ set (H5_CFLAGS1_5 "${H5_CFLAGS1_5} -Wformat=2")
# Append warning flags from gcc-3.3* case
set (H5_CFLAGS1 "${H5_CFLAGS1} -Wendif-labels")
# Append warning flags from gcc-3.4* case
- set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch")
# Append more extra warning flags that only gcc4.0+ know about
set (H5_CFLAGS2 "${H5_CFLAGS2} -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros")
# Append more extra warning flags that only gcc 4.1+ know about
- set (H5_CFLAGS3 "${H5_CFLAGS3} -Wunsafe-loop-optimizations -Wc++-compat")
+ set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wunsafe-loop-optimizations")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wc++-compat")
# Append more extra warning flags that only gcc 4.2+ know about
- set (H5_CFLAGS3 "${H5_CFLAGS3} -Wstrict-overflow")
+ set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wstrict-overflow")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-strict-overflow")
# Append more extra warning flags that only gcc 4.3+ know about
#
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... -QAK
- set (H5_CFLAGS3 "${H5_CFLAGS3} -Wlogical-op -Wlarger-than=2048 -Wvla")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wlogical-op -Wlarger-than=2048 -Wvla")
# Append more extra warning flags that only gcc 4.4+ know about
- set (H5_CFLAGS4 "${H5_CFLAGS4} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat")
# Append more extra warning flags that only gcc 4.5+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
- set (H5_CFLAGS4 "${H5_CFLAGS4} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
- endif()
+ set (H5_CFLAGS2_5 "${H5_CFLAGS2_5} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wjump-misses-init -Wunsuffixed-float-constants")
+ endif ()
# Append more extra warning flags that only gcc 4.6+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
- set (H5_CFLAGS5 "${H5_CFLAGS5} -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines")
- endif()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdouble-promotion -Wtrampolines")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=const")
+ else ()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=const")
+ endif ()
+ endif ()
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wunreachable-code")
+ endif ()
# Append more extra warning flags that only gcc 4.7+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- set (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
- endif()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wstack-usage=8192 -Wvector-operation-performance")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
+ else ()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=pure -Wno-suggest-attribute=noreturn")
+ endif ()
+ endif ()
# Append more extra warning flags that only gcc 4.8+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
- set (H5_CFLAGS5 "${H5_CFLAGS5} -Wsuggest-attribute=format")
- endif()
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wsuggest-attribute=format")
+ else ()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wno-suggest-attribute=format")
+ endif ()
+ endif ()
# Append more extra warning flags that only gcc 4.9+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
- set (H5_CFLAGS5 "${H5_CFLAGS5} -Wdate-time -Wopenmp-simd")
- endif()
+ set (H5_CFLAGS2 "${H5_CFLAGS2} -Wdate-time -Wopenmp-simd")
+ endif ()
# (There was no release of gcc 5.0)
# Append more extra warning flags that only gcc 5.1+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.1)
- set (H5_CFLAGS6 "${H5_CFLAGS6} -Warray-bounds=2 -Wc99-c11-compat")
- endif()
+ set (H5_CFLAGS3 "${H5_CFLAGS3} -Warray-bounds=2 -Wc99-c11-compat")
+ endif ()
-endif (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
+ # Append more extra warning flags that only gcc 6.x+ know about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
+ set (H5_CFLAGS4 "${H5_CFLAGS4} -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa")
+ endif ()
+
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable all warnings
@@ -159,16 +209,23 @@ endif (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF)
if (HDF5_ENABLE_ALL_WARNINGS)
if (MSVC)
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall")
- string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
- else (MSVC)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /wd4668")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668")
+ else ()
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
+ string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+ endif ()
+ else ()
if (CMAKE_COMPILER_IS_GNUCC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
- endif (CMAKE_COMPILER_IS_GNUCC)
- endif (MSVC)
-endif (HDF5_ENABLE_ALL_WARNINGS)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2}")
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
@@ -180,12 +237,12 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
- else (MSVC)
+ else ()
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
- endif (CMAKE_COMPILER_IS_GNUCC)
- endif (MSVC)
-endif (HDF5_ENABLE_GROUPZERO_WARNINGS)
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
@@ -197,10 +254,10 @@ if (HDF5_ENABLE_GROUPONE_WARNINGS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
- else (MSVC)
+ else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
- endif (MSVC)
-endif (HDF5_ENABLE_GROUPONE_WARNINGS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
@@ -212,10 +269,10 @@ if (HDF5_ENABLE_GROUPTWO_WARNINGS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
- else (MSVC)
+ else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
- endif (MSVC)
-endif (HDF5_ENABLE_GROUPTWO_WARNINGS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
@@ -227,10 +284,10 @@ if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
- else (MSVC)
+ else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
- endif (MSVC)
-endif (HDF5_ENABLE_GROUPTHREE_WARNINGS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to enable warnings by groups
@@ -239,28 +296,8 @@ option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF)
if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
if (NOT MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS4}")
- endif (NOT MSVC)
-endif (HDF5_ENABLE_GROUPFOUR_WARNINGS)
-
-#-----------------------------------------------------------------------------
-# Option to allow the user to enable warnings by groups
-#-----------------------------------------------------------------------------
-option (HDF5_ENABLE_GROUPFIVE_WARNINGS "Enable group five warnings" OFF)
-if (HDF5_ENABLE_GROUPFIVE_WARNINGS)
- if (NOT MSVC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS5}")
- endif (NOT MSVC)
-endif (HDF5_ENABLE_GROUPFIVE_WARNINGS)
-
-#-----------------------------------------------------------------------------
-# Option to allow the user to enable warnings by groups
-#-----------------------------------------------------------------------------
-option (HDF5_ENABLE_GROUPSIX_WARNINGS "Enable group six warnings" OFF)
-if (HDF5_ENABLE_GROUPSIX_WARNINGS)
- if (NOT MSVC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS6}")
- endif (NOT MSVC)
-endif (HDF5_ENABLE_GROUPSIX_WARNINGS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# This is in here to help some of the GCC based IDES like Eclipse
@@ -268,7 +305,7 @@ endif (HDF5_ENABLE_GROUPSIX_WARNINGS)
#-----------------------------------------------------------------------------
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
-endif (CMAKE_COMPILER_IS_GNUCC)
-if (CMAKE_COMPILER_IS_GNUCXX)
+endif ()
+if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
-endif (CMAKE_COMPILER_IS_GNUCXX)
+endif ()
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index 9bd9eb2..de480a4 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -34,6 +34,8 @@ To test the installation with the examples;
Create a directory to run the examples.
Copy HDF5Examples folder to this directory.
Copy HDF518_Examples.cmake to this directory.
+ Copy HDF5_Examples_options.cmake to this directory.
+ Copy CTestScript.cmake to this directory.
The default source folder is defined as "HDF5Examples". It can be changed
with the CTEST_SOURCE_NAME script option.
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
@@ -42,7 +44,7 @@ To test the installation with the examples;
with the CTEST_CONFIGURATION_TYPE script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
- Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
+ Shared libraries can be used with the STATICONLYLIBRARIES script option set to "NO".
Other options can be changed by editing the HDF518_Examples.cmake file.
If the defaults are okay, execute from this directory:
diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake
index a54f22c..6eaa070 100644
--- a/config/cmake/UserMacros/Windows_MT.cmake
+++ b/config/cmake/UserMacros/Windows_MT.cmake
@@ -1,16 +1,27 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
########################################################
# Include file for user options
########################################################
# To use this option, copy both the macro and option code
-# into the root UserMacros.cmake file.
+# into the root UserMacros.cmake file.
# OR add an include to the root UserMacros.cmake file:
# INCLUDE(path_to_file/WINDOWS_MT.cmake)
#-----------------------------------------------------------------------------
# Option to Build with Static CRT libraries on Windows
#-------------------------------------------------------------------------------
-MACRO (TARGET_STATIC_CRT_FLAGS)
+macro (TARGET_STATIC_CRT_FLAGS)
if (MSVC AND NOT BUILD_SHARED_LIBS)
foreach (flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
@@ -19,23 +30,22 @@ MACRO (TARGET_STATIC_CRT_FLAGS)
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if (${flag_var} MATCHES "/MD")
string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- endif (${flag_var} MATCHES "/MD")
- endforeach (flag_var)
+ endif ()
+ endforeach ()
foreach (flag_var
CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS_DEBUG CMAKE_Fortran_FLAGS_RELEASE
CMAKE_Fortran_FLAGS_MINSIZEREL CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
if (${flag_var} MATCHES "/libs:dll")
string (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}")
- endif (${flag_var} MATCHES "/libs:dll")
- endforeach (flag_var)
+ endif ()
+ endforeach ()
set (WIN_COMPILE_FLAGS "")
set (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
- endif (MSVC AND NOT BUILD_SHARED_LIBS)
-ENDMACRO (TARGET_STATIC_CRT_FLAGS)
+ endif ()
+endmacro ()
#-----------------------------------------------------------------------------
option (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF)
if (BUILD_STATIC_CRT_LIBS)
TARGET_STATIC_CRT_FLAGS ()
-endif (BUILD_STATIC_CRT_LIBS)
- \ No newline at end of file
+endif ()
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 5fbee62..35c05fa 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
# This is the CMakeCache file.
########################
@@ -38,6 +49,8 @@ set (HDF5_ENABLE_USING_MEMCHECKER OFF CACHE BOOL "Indicate that a memory checker
set (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE)
+
set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
index 5911fa7..5697ead 100644
--- a/config/cmake/hdf5-config-version.cmake.in
+++ b/config/cmake/hdf5-config-version.cmake.in
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
#-----------------------------------------------------------------------------
# HDF5 Version file for install directory
#-----------------------------------------------------------------------------
@@ -12,36 +23,36 @@ set (PACKAGE_VERSION "@HDF5_VERSION_STRING@")
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
+else ()
if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@")
-
+
# exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
-
+
# compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- set (PACKAGE_VERSION_COMPATIBLE TRUE)
-
+ set (PACKAGE_VERSION_COMPATIBLE TRUE)
+
if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@")
set (PACKAGE_VERSION_EXACT TRUE)
-
+
if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@")
# not using this yet
- endif ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@")
- endif ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@")
- else ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
- set (PACKAGE_VERSION_COMPATIBLE FALSE)
- endif ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
- endif ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@")
-endif()
+ endif ()
+ endif ()
+ else ()
+ set (PACKAGE_VERSION_COMPATIBLE FALSE)
+ endif ()
+ endif ()
+endif ()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
-endif()
+endif ()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif()
+endif ()
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index 3584315..7fe71e8 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
#-----------------------------------------------------------------------------
# HDF5 Config file for compiling against hdf5 build/install directory
#-----------------------------------------------------------------------------
@@ -32,6 +43,7 @@ set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
+set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
#-----------------------------------------------------------------------------
# Dependencies
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 991614a..defb2ff 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
# This is the CMakeCache file.
########################
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 75e61ee..3bfc8b4 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -1,4 +1,15 @@
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -7,166 +18,163 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# -----------------------------------------------------------
# -- Get environment
# -----------------------------------------------------------
-if(NOT SITE_OS_NAME)
+if (NOT SITE_OS_NAME)
## machine name not provided - attempt to discover with uname
## -- set hostname
## --------------------------
- find_program(HOSTNAME_CMD NAMES hostname)
- exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
- set(CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
- find_program(UNAME NAMES uname)
- macro(getuname name flag)
- exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
- endmacro(getuname)
+ find_program (HOSTNAME_CMD NAMES hostname)
+ exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program (UNAME NAMES uname)
+ macro (getuname name flag)
+ exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro ()
- getuname(osname -s)
- getuname(osrel -r)
- getuname(cpu -m)
- message(STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+ getuname (osname -s)
+ getuname (osrel -r)
+ getuname (cpu -m)
+ message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
- set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if(USE_AUTOTOOLS)
- set(CTEST_BUILD_NAME "AT-${CTEST_BUILD_NAME}")
- endif()
- if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
- endif()
- set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
-else(NOT SITE_OS_NAME)
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+ if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else ()
## machine name provided
## --------------------------
- if(CMAKE_HOST_UNIX)
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
- else()
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
- endif()
- if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
- endif()
- set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-endif(NOT SITE_OS_NAME)
+ if (CMAKE_HOST_UNIX)
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+ else ()
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+ endif ()
+ if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+ endif ()
+ set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif ()
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
-if(APPLE)
+if (APPLE)
# Compiler choice
- execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(ENV{CC} "${XCODE_CC}")
- set(ENV{CXX} "${XCODE_CXX}")
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
- if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
+ if (NOT NO_MAC_FORTRAN)
+ # Shared fortran is not supported, build static
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ else ()
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ endif ()
- set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
#-----------------------------------------------------------------------------
-set(NEED_REPOSITORY_CHECKOUT 0)
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-if(CTEST_USE_TAR_SOURCE)
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
## Uncompress source if tar file provided
## --------------------------
- if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif()
+ if (WIN32)
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else ()
+ message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+ execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif ()
- if(NOT rv EQUAL 0)
- message(STATUS "extracting... [error-(${rv}) clean up]")
- file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
- message(FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
- endif()
+ if (NOT rv EQUAL 0)
+ message (STATUS "extracting... [error-(${rv}) clean up]")
+ file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+ endif ()
- file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
- set(LOCAL_SKIP_UPDATE "TRUE")
-else(CTEST_USE_TAR_SOURCE)
- if(LOCAL_UPDATE)
- if(CTEST_USE_GIT_SOURCE)
- find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
- set(CTEST_GIT_UPDATE_OPTIONS)
+ file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set (LOCAL_SKIP_UPDATE "TRUE")
+else ()
+ if (LOCAL_UPDATE)
+ if (CTEST_USE_GIT_SOURCE)
+ find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
+ set (CTEST_GIT_UPDATE_OPTIONS)
- if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set(NEED_REPOSITORY_CHECKOUT 1)
- endif()
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
- if(${NEED_REPOSITORY_CHECKOUT})
- if(REPOSITORY_BRANCH)
- set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- else()
- set(CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
- endif()
- set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
- else()
- set(CTEST_GIT_options "pull")
- endif()
- set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
- else(CTEST_USE_GIT_SOURCE)
+ if (${NEED_REPOSITORY_CHECKOUT})
+ if (REPOSITORY_BRANCH)
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ else ()
+ set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+ endif ()
+ set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
+ else ()
+ set (CTEST_GIT_options "pull")
+ endif ()
+ set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+ else ()
## --------------------------
## use subversion to get source
#-----------------------------------------------------------------------------
## cygwin does not handle the find_package() call
## --------------------------
- set(CTEST_UPDATE_COMMAND "SVNCommand")
- if(NOT SITE_CYGWIN})
+ set (CTEST_UPDATE_COMMAND "SVNCommand")
+ if (NOT SITE_CYGWIN})
find_package (Subversion)
- set(CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
- set(CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
- else()
- set(CTEST_SVN_COMMAND "/usr/bin/svn")
- set(CTEST_UPDATE_COMMAND "/usr/bin/svn")
- endif()
+ set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+ else ()
+ set (CTEST_SVN_COMMAND "/usr/bin/svn")
+ set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
+ endif ()
- if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
- set(NEED_REPOSITORY_CHECKOUT 1)
- endif()
+ if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+ set (NEED_REPOSITORY_CHECKOUT 1)
+ endif ()
- if(NOT CTEST_REPO_VERSION)
- set(CTEST_REPO_VERSION "HEAD")
- endif()
- if(${NEED_REPOSITORY_CHECKOUT})
- set(CTEST_CHECKOUT_COMMAND
+ if (NOT CTEST_REPO_VERSION)
+ set (CTEST_REPO_VERSION "HEAD")
+ endif ()
+ if (${NEED_REPOSITORY_CHECKOUT})
+ set (CTEST_CHECKOUT_COMMAND
"\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
- else()
- if(CTEST_REPO_VERSION)
- set(CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
- endif()
- endif()
- endif(CTEST_USE_GIT_SOURCE)
- endif(LOCAL_UPDATE)
-endif(CTEST_USE_TAR_SOURCE)
+ else ()
+ if (CTEST_REPO_VERSION)
+ set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
+ endif ()
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
- file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-else()
- ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-endif()
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
+ file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
+ ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+endif ()
# Use multiple CPU cores to build
-include(ProcessorCount)
-ProcessorCount(N)
-if(NOT N EQUAL 0)
- if(NOT WIN32)
- set(CTEST_BUILD_FLAGS -j${N})
- endif()
- set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif()
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+ if (NOT WIN32)
+ set (CTEST_BUILD_FLAGS -j${N})
+ endif ()
+ set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
#-----------------------------------------------------------------------------
# Send the main script as a note.
-list(APPEND CTEST_NOTES_FILES
+list (APPEND CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
"${CMAKE_CURRENT_LIST_FILE}"
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
@@ -175,39 +183,44 @@ list(APPEND CTEST_NOTES_FILES
#-----------------------------------------------------------------------------
# Check for required variables.
# --------------------------
-foreach(req
+foreach (req
CTEST_CMAKE_GENERATOR
CTEST_SITE
CTEST_BUILD_NAME
)
- if(NOT DEFINED ${req})
- message(FATAL_ERROR "The containing script must set ${req}")
- endif()
-endforeach(req)
+ if (NOT DEFINED ${req})
+ message (FATAL_ERROR "The containing script must set ${req}")
+ endif ()
+endforeach ()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+if(CMAKE_GENERATOR_TOOLSET)
+ set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
+else ()
+ set(CTEST_CONFIGURE_TOOLSET "")
+endif()
+if (LOCAL_MEMCHECK_TEST)
+ find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-else()
- if(LOCAL_COVERAGE_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
- endif()
+else ()
+ if (LOCAL_COVERAGE_TEST)
+ find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
+ endif ()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-endif()
+endif ()
#-----------------------------------------------------------------------------
## -- set output to english
-set($ENV{LC_MESSAGES} "en_EN")
+set ($ENV{LC_MESSAGES} "en_EN")
# Print summary information.
-foreach(v
+foreach (v
CTEST_SITE
CTEST_BUILD_NAME
CTEST_SOURCE_DIRECTORY
@@ -220,9 +233,9 @@ foreach(v
CTEST_SCRIPT_DIRECTORY
CTEST_USE_LAUNCHERS
)
- set(vars "${vars} ${v}=[${${v}}]\n")
-endforeach(v)
-message(STATUS "Dashboard script configuration:\n${vars}\n")
+ set (vars "${vars} ${v}=[${${v}}]\n")
+endforeach ()
+message (STATUS "Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
@@ -234,63 +247,63 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
## -- LOCAL_COVERAGE_TEST executes code coverage process
## --------------------------
ctest_start (${MODEL} TRACK ${MODEL})
- if(LOCAL_UPDATE)
+ if (LOCAL_UPDATE)
ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
- endif()
- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ endif ()
+ configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
- endif()
- if(${res} LESS 0 OR ${res} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
- endif()
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+ endif ()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Build)
- endif()
- if(${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
- endif()
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+ endif ()
- if(NOT LOCAL_SKIP_TEST)
- if(NOT LOCAL_MEMCHECK_TEST)
+ if (NOT LOCAL_SKIP_TEST)
+ if (NOT LOCAL_MEMCHECK_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Test)
- endif()
- if(${res} LESS 0 OR ${res} GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
- endif()
- else()
+ endif ()
+ if (${res} LESS 0 OR ${res} GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+ endif ()
+ else ()
ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS MemCheck)
- endif()
- endif()
- if(LOCAL_COVERAGE_TEST)
+ endif ()
+ endif ()
+ if (LOCAL_COVERAGE_TEST)
ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
- if(LOCAL_SUBMIT)
+ if (LOCAL_SUBMIT)
ctest_submit (PARTS Coverage)
- endif()
- endif()
- endif(NOT LOCAL_SKIP_TEST)
+ endif ()
+ endif ()
+ endif ()
- if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
+ if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
- execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
+ execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
ERROR_VARIABLE cpackLog.err
)
- file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
- if(cpackResult GREATER 0)
- file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
- endif()
- endif()
+ file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+ if (cpackResult GREATER 0)
+ file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
+ endif ()
+ endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF518config.cmake b/config/cmake/scripts/HDF518config.cmake
deleted file mode 100755
index 55e4667..0000000
--- a/config/cmake/scripts/HDF518config.cmake
+++ /dev/null
@@ -1,266 +0,0 @@
-#############################################################################################
-### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
-### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
-### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf518.log ###
-#############################################################################################
-
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-############################################################################
-# Usage:
-# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
-# where valid options for OPTION are:
-# BUILD_GENERATOR - The cmake build generator:
-# Unix * Unix Makefiles
-# VS2015 * Visual Studio 14 2015
-# VS201564 * Visual Studio 14 2015 Win64
-# VS2013 * Visual Studio 12 2013
-# VS201364 * Visual Studio 12 2013 Win64
-# VS2012 * Visual Studio 11 2012
-# VS201264 * Visual Studio 11 2012 Win64
-#
-# INSTALLDIR - root folder where hdf5 is installed
-# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
-# CTEST_SOURCE_NAME - source folder
-# STATIC_LIBRARIES - Build/use static libraries
-# FORTRAN_LIBRARIES - Build/use fortran libraries
-# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
-##############################################################################
-
-set(CTEST_SOURCE_VERSION 1.8.18)
-set(CTEST_SOURCE_VERSEXT "")
-
-##############################################################################
-# handle input parameters to script.
-#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.8 root folder
-#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.16
-#STATIC_LIBRARIES - Default is YES
-#FORTRAN_LIBRARIES - Default is NO
-#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
-if(DEFINED CTEST_SCRIPT_ARG)
- # transform ctest script arguments of the form
- # script.ctest,var1=value1,var2=value2
- # to variables with the respective names set to the respective values
- string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
- foreach(current_var ${script_args})
- if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
- set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
- endif()
- endforeach()
-endif()
-
-# build generator must be defined
-if(NOT DEFINED BUILD_GENERATOR)
- message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
-else()
- if(${BUILD_GENERATOR} STREQUAL "Unix")
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
- else()
- message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
- endif()
-endif()
-
-if(NOT DEFINED INSTALLDIR)
- if(WIN32)
- set(INSTALLDIR "C:\\Program\ Files\\HDF_Group\\HDF5\\${CTEST_SOURCE_VERSION}")
- else()
- set(INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
- endif()
-endif()
-if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
- set(CTEST_CONFIGURATION_TYPE "Release")
-endif()
-if(NOT DEFINED CTEST_SOURCE_NAME)
- set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
-endif()
-if(NOT DEFINED STATIC_LIBRARIES)
- set(STATICLIBRARIES "YES")
-else()
- set(STATICLIBRARIES "NO")
-endif()
-if(NOT DEFINED FORTRAN_LIBRARIES)
- set(FORTRANLIBRARIES "NO")
-else()
- set(FORTRANLIBRARIES "YES")
-endif()
-
-set(CTEST_BINARY_NAME "build")
-set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
-if(WIN32)
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else()
- set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
- set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif()
-
-###################################################################
-######### Following describes compiler ############
-if(WIN32)
- set(SITE_OS_NAME "Windows")
- set(SITE_OS_VERSION "WIN7")
- if(${BUILD_GENERATOR} STREQUAL "VS201564")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2015")
- set(SITE_COMPILER_VERSION "14")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2015")
- set(SITE_COMPILER_VERSION "14")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2013")
- set(SITE_COMPILER_VERSION "12")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2013")
- set(SITE_COMPILER_VERSION "12")
- elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
- set(SITE_OS_BITS "64")
- set(SITE_COMPILER_NAME "vs2012")
- set(SITE_COMPILER_VERSION "11")
- elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
- set(SITE_OS_BITS "32")
- set(SITE_COMPILER_NAME "vs2012")
- set(SITE_COMPILER_VERSION "11")
- endif()
-## Set the following to unique id your computer ##
- set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
-else()
-## Set the following to unique id your computer ##
- if(APPLE)
- set(CTEST_SITE "MAC.XXXX")
- else()
- set(CTEST_SITE "LINUX.XXXX")
- endif()
-endif()
-###################################################################
-
-###################################################################
-######### Following is for submission to CDash ############
-###################################################################
-set(MODEL "Experimental")
-###################################################################
-
-###################################################################
-##### Following controls CDash submission #####
-#set(LOCAL_SUBMIT "TRUE")
-##### Following controls test process #####
-#set(LOCAL_SKIP_TEST "TRUE")
-#set(LOCAL_MEMCHECK_TEST "TRUE")
-#set(LOCAL_COVERAGE_TEST "TRUE")
-##### Following controls cpack command #####
-#set(LOCAL_NO_PACKAGE "TRUE")
-##### Following controls source update #####
-#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8_18")
-#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
-###################################################################
-
-###################################################################
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
-
-###################################################################
-if(${STATICLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- ######### Following describes computer ############
- ## following is optional to describe build ##
- set(SITE_BUILDNAME_SUFFIX "STATIC")
-endif()
-###################################################################
-
-### uncomment/comment and change the following lines for other configuration options
-
-#### ext libraries ####
-### ext libs from tgz
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
-### ext libs from svn
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=SVN")
-### ext libs on system
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
-### disable ext libs building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
-#### fortran ####
-if(${FORTRANLIBRARIES})
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
- ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-else()
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
- set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
-endif()
-
-### disable test program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
-
-### disable packaging
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
-### Create install package with external libraries (szip, zlib, jpeg)
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
-
-### change install prefix
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH='${INSTALLDIR}'")
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
-
-###################################################################
-
-if(WIN32)
- include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
-else()
- include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
- if(APPLE)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- else()
- if(CYGWIN)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- else()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
- endif()
- endif()
- endif()
-endif()
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
new file mode 100755
index 0000000..3d3fb27
--- /dev/null
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -0,0 +1,277 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
+### ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf518.log ###
+#############################################################################################
+
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# Unix * Unix Makefiles
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+# VS2012 * Visual Studio 11 2012
+# VS201264 * Visual Studio 11 2012 Win64
+#
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_CONFIGURATION_TYPE - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+# STATIC_ONLY - Build/use static libraries
+# FORTRAN_LIBRARIES - Build/use fortran libraries
+# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
+##############################################################################
+
+set (CTEST_SOURCE_VERSION "1.8.19")
+set (CTEST_SOURCE_VERSEXT "")
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.8 root folder
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.8.16
+#STATIC_ONLY - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+if (DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach (current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif ()
+ endforeach ()
+endif ()
+
+# build generator must be defined
+if (NOT DEFINED BUILD_GENERATOR)
+ message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+else ()
+ if (${BUILD_GENERATOR} STREQUAL "Unix")
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201564")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ else ()
+ message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+ endif ()
+endif ()
+
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+###################################################################
+
+if (NOT DEFINED INSTALLDIR)
+ if (WIN32)
+ set (INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+ else ()
+ set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}")
+ endif ()
+endif ()
+if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
+ set (CTEST_CONFIGURATION_TYPE "Release")
+endif ()
+if (NOT DEFINED CTEST_SOURCE_NAME)
+ set (CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif ()
+if (NOT DEFINED STATIC_ONLY)
+ set (STATICONLYLIBRARIES "YES")
+else ()
+ set (STATICONLYLIBRARIES "NO")
+endif ()
+if (NOT DEFINED FORTRAN_LIBRARIES)
+ set (FORTRANLIBRARIES "NO")
+else ()
+ set(FORTRANLIBRARIES "YES")
+endif ()
+
+set (CTEST_BINARY_NAME "build")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
+if (WIN32)
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+else ()
+ set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+ set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+endif ()
+
+###################################################################
+######### Following describes compiler ############
+if (WIN32)
+ set (SITE_OS_NAME "Windows")
+ set (SITE_OS_VERSION "WIN7")
+ if (${BUILD_GENERATOR} STREQUAL "VS201564")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2015")
+ set (SITE_COMPILER_VERSION "14")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2013")
+ set (SITE_COMPILER_VERSION "12")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
+ elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2012")
+ set (SITE_COMPILER_VERSION "11")
+ endif ()
+## Set the following to unique id your computer ##
+ set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
+else ()
+ set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+## Set the following to unique id your computer ##
+ if (APPLE)
+ set (CTEST_SITE "MAC.XXXX")
+ else ()
+ set (CTEST_SITE "LINUX.XXXX")
+ endif ()
+ if (APPLE)
+ execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set (ENV{CC} "${XCODE_CC}")
+ set (ENV{CXX} "${XCODE_CXX}")
+ set (CTEST_USE_LAUNCHERS 1)
+ set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
+ set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
+ set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
+ set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
+ set (RR_FLAGS_C "${RR_FLAGS_COMMON}")
+ set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
+ set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
+ set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
+ endif ()
+endif ()
+###################################################################
+
+###################################################################
+######### Following is for submission to CDash ############
+###################################################################
+set (MODEL "Experimental")
+###################################################################
+
+###################################################################
+##### Following controls CDash submission #####
+#set (LOCAL_SUBMIT "TRUE")
+##### Following controls test process #####
+#set (LOCAL_SKIP_TEST "TRUE")
+#set (LOCAL_MEMCHECK_TEST "TRUE")
+#set (LOCAL_COVERAGE_TEST "TRUE")
+##### Following controls cpack command #####
+#set (LOCAL_NO_PACKAGE "TRUE")
+##### Following controls source update #####
+#set (LOCAL_UPDATE "TRUE")
+set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
+set (REPOSITORY_BRANCH "hdf5_1_8_19")
+
+#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
+#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
+###################################################################
+
+###################################################################
+if (${STATICONLYLIBRARIES})
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+ ######### Following describes computer ############
+ ## following is optional to describe build ##
+ set (SITE_BUILDNAME_SUFFIX "STATIC")
+endif ()
+###################################################################
+#### fortran ####
+if (${FORTRANLIBRARIES})
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+ ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
+else ()
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
+ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
+endif ()
+
+### change install prefix
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
+
+###################################################################
+
+if (WIN32)
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
+ include (${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
+ include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
+ file (COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+else ()
+ set (BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+ include (${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
+ include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+ if (APPLE)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ else ()
+ if (CYGWIN)
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ else ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ if (EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
+ file (COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ endif ()
+ endif ()
+ endif ()
+endif ()
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
new file mode 100644
index 0000000..e0bc22f
--- /dev/null
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -0,0 +1,52 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+#############################################################################################
+#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
+#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ###
+#############################################################################################
+
+### uncomment/comment and change the following lines for other configuration options
+
+#############################################################################################
+#### alternate toolsets ####
+#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+
+#############################################################################################
+#### ext libraries ####
+
+### ext libs from tgz
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
+### ext libs from git
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
+### ext libs on system
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+
+### disable ext zlib building
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
+### disable ext szip building
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
+
+#############################################################################################
+### disable test program builds
+
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+
+#############################################################################################
+### disable packaging
+
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
+### Create install package with external libraries (szip, zlib)
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+
+#############################################################################################
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 0775cbe..6319610 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -1,31 +1,42 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
# userblockTest.cmake executes a command and captures the output in a file. File is then compared
# against a reference file. Exit status of command can also be compared.
# arguments checking
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM tellub to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
if (NOT TEST_GET_PROGRAM)
message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined")
-endif (NOT TEST_GET_PROGRAM)
+endif ()
if (NOT TEST_FOLDER)
message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
if (NOT TEST_HFILE)
message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined")
-endif (NOT TEST_HFILE)
+endif ()
if (NOT TEST_UFILE)
message (FATAL_ERROR "Require TEST_UFILE the ub file to be defined")
-endif (NOT TEST_UFILE)
+endif ()
if (NOT TEST_CHECKUB)
message (STATUS "Require TEST_CHECKUB - YES or NO - to be defined")
-endif (NOT TEST_CHECKUB)
+endif ()
#if (NOT TEST_EXPECT)
# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+#endif ()
#if (NOT TEST_OFILE)
# message (FATAL_ERROR "Require TEST_OFILE the original hdf file to be defined")
-#endif (NOT TEST_OFILE)
+#endif ()
set (TEST_U_STRING_LEN 0)
set (TEST_O_STRING_LEN 0)
@@ -53,11 +64,11 @@ if (TEST_CHECKUB STREQUAL "YES")
)
if (NOT ${TEST_RESULT} STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
- endif (NOT ${TEST_RESULT} STREQUAL "0")
+ endif ()
file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
- endif (TEST_OFILE)
+ endif ()
- MATH( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
+ math( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
if (NOT TEST_O_STRING_LEN STREQUAL "0")
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
@@ -73,10 +84,10 @@ if (TEST_CHECKUB STREQUAL "YES")
#cat $ufile >> $cmpfile
file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
file (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}")
- else (NOT TEST_O_STRING_LEN STREQUAL "0")
+ else ()
file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME)
file (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM})
- endif (NOT TEST_O_STRING_LEN STREQUAL "0")
+ endif ()
#$JAM_BIN/getub -c $size $hfile > $tfile
EXECUTE_PROCESS (
@@ -99,8 +110,8 @@ if (TEST_CHECKUB STREQUAL "YES")
# if the return value is !=${TEST_EXPECT} bail out
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
- endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-else (TEST_CHECKUB STREQUAL "YES")
+ endif ()
+else ()
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
EXECUTE_PROCESS (
@@ -112,8 +123,8 @@ else (TEST_CHECKUB STREQUAL "YES")
)
if (NOT TEST_H_STRING_LEN STREQUAL "0")
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
- endif (NOT TEST_H_STRING_LEN STREQUAL "0")
-endif (TEST_CHECKUB STREQUAL "YES")
+ endif ()
+endif ()
# everything went fine...
message ("Passed: The output of CHECK matched expectation")
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index 10f0a7b..c514731 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -1,32 +1,50 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
# vfdTest.cmake executes a command and captures the output in a file. Command uses specified VFD.
# Exit status of command can also be compared.
# arguments checking
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+endif ()
if (NOT TEST_FOLDER)
message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
if (NOT TEST_VFD)
message (FATAL_ERROR "Require TEST_VFD to be defined")
-endif (NOT TEST_VFD)
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
-set (ERROR_APPEND 1)
+# if there is not an error reference file add the error output to the stdout file
+if (NOT TEST_ERRREF)
+ set (ERROR_APPEND 1)
+endif ()
message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
set (ENV{HDF5_DRIVER} "${TEST_VFD}")
+
# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
+execute_process (
COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
WORKING_DIRECTORY ${TEST_FOLDER}
+ RESULT_VARIABLE TEST_RESULT
OUTPUT_FILE ${TEST_OUTPUT}_${TEST_VFD}.out
ERROR_FILE ${TEST_OUTPUT}_${TEST_VFD}.err
OUTPUT_VARIABLE TEST_OUT
@@ -35,16 +53,24 @@ EXECUTE_PROCESS (
message (STATUS "COMMAND Result: ${TEST_RESULT}")
+# if the .err file exists and ERRROR_APPEND is enabled
if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}")
-endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
+endif ()
# if the return value is !=${TEST_EXPECT} bail out
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ if (NOT TEST_NOERRDISPLAY)
+ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM)
+ message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}")
+ endif ()
+ endif ()
+ message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif ()
+
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
# everything went fine...
message ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
-