summaryrefslogtreecommitdiffstats
path: root/doc/RecEvalObj.3
blob: 387cc4494e63c181d4eb3bc408d7732c7702f18a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'\"
'\" Copyright (c) 1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
.TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
Tcl_RecordAndEvalObj \- save command on history list before evaluating
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
int
\fBTcl_RecordAndEvalObj\fR(\fIinterp, cmdPtr, flags\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
Tcl interpreter in which to evaluate command.
.AP Tcl_Obj *cmdPtr in
Points to a Tcl value containing a command (or sequence of commands)
to execute.
.AP int flags in
An OR'ed combination of flag bits.  \fBTCL_NO_EVAL\fR means record the
command but do not evaluate it.  \fBTCL_EVAL_GLOBAL\fR means evaluate
the command at global level instead of the current stack level.
.BE

.SH DESCRIPTION
.PP
\fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event
on the history list and then execute it using \fBTcl_EvalObjEx\fR
(or \fBTcl_GlobalEvalObj\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set
in \fIflags\fR).
It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_EvalObjEx\fR,
as well as a result value containing additional information
(a result value or error message)
that can be retrieved using \fBTcl_GetObjResult\fR.
If you do not want the command recorded on the history list then
you should invoke \fBTcl_EvalObjEx\fR instead of \fBTcl_RecordAndEvalObj\fR.
Normally \fBTcl_RecordAndEvalObj\fR is only called with top-level
commands typed by the user, since the purpose of history is to
allow the user to re-issue recently invoked commands.
If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
the command is recorded without being evaluated.

.SH "SEE ALSO"
Tcl_EvalObjEx, Tcl_GetObjResult

.SH KEYWORDS
command, event, execute, history, interpreter, value, record
class='upd'>java/src/jni/h5oImp.c16
-rw-r--r--java/src/jni/h5pDAPLImp.c4
-rw-r--r--java/src/jni/h5pDCPLImp.c58
-rw-r--r--java/src/jni/h5pDXPLImp.c4
-rw-r--r--java/src/jni/h5pFAPLImp.c80
-rw-r--r--java/src/jni/h5pImp.c2
-rw-r--r--java/src/jni/h5pLAPLImp.c4
-rw-r--r--java/src/jni/h5plImp.c28
-rw-r--r--java/src/jni/h5rImp.c16
-rw-r--r--java/src/jni/h5sImp.c53
-rw-r--r--java/src/jni/h5sImp.h7
-rw-r--r--java/src/jni/h5tImp.c12
-rw-r--r--java/src/jni/h5util.c136
-rw-r--r--java/src/jni/nativeData.c60
-rw-r--r--java/test/CMakeLists.txt2
-rw-r--r--java/test/TestH5.java143
-rw-r--r--java/test/testfiles/JUnit-TestH5.txt3
-rw-r--r--release_docs/INSTALL_Cygwin.txt172
-rw-r--r--release_docs/README_HDF5_CMake6
-rw-r--r--release_docs/README_HPC156
-rw-r--r--release_docs/RELEASE.txt14
-rw-r--r--release_docs/USING_CMake_Examples.txt2
-rw-r--r--release_docs/USING_HDF5_CMake.txt4
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/H5private.h81
-rw-r--r--src/H5system.c4
-rw-r--r--src/H5win32defs.h6
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--testpar/CMakeLists.txt2
-rw-r--r--tools/CMakeLists.txt2
-rw-r--r--tools/lib/CMakeLists.txt2
-rw-r--r--tools/lib/h5diff.c293
-rw-r--r--tools/lib/h5diff.h56
-rw-r--r--tools/lib/h5diff_array.c627
-rw-r--r--tools/lib/h5diff_attr.c505
-rw-r--r--tools/lib/h5diff_dset.c218
-rw-r--r--tools/lib/h5diff_util.c8
-rw-r--r--tools/lib/h5tools.c308
-rw-r--r--tools/lib/h5tools.h67
-rw-r--r--tools/lib/h5tools_dump.c1597
-rw-r--r--tools/lib/h5tools_dump.h30
-rw-r--r--tools/lib/h5tools_error.h231
-rw-r--r--tools/lib/h5tools_filters.c27
-rw-r--r--tools/lib/h5tools_str.c162
-rw-r--r--tools/lib/h5tools_str.h9
-rw-r--r--tools/lib/h5tools_type.c4
-rw-r--r--tools/lib/h5tools_utils.c34
-rw-r--r--tools/lib/h5tools_utils.h56
-rw-r--r--tools/lib/h5trav.c80
-rw-r--r--tools/libtest/CMakeLists.txt2
-rw-r--r--tools/libtest/h5tools_test_utils.c6
-rw-r--r--tools/src/CMakeLists.txt2
-rw-r--r--tools/src/h5copy/CMakeLists.txt2
-rw-r--r--tools/src/h5copy/h5copy.c30
-rw-r--r--tools/src/h5diff/CMakeLists.txt4
-rw-r--r--tools/src/h5diff/h5diff_common.c45
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/src/h5dump/CMakeLists.txt4
-rw-r--r--tools/src/h5dump/h5dump.c9
-rw-r--r--tools/src/h5dump/h5dump_ddl.c221
-rw-r--r--tools/src/h5dump/h5dump_xml.c79
-rw-r--r--tools/src/h5format_convert/CMakeLists.txt2
-rw-r--r--tools/src/h5import/CMakeLists.txt2
-rw-r--r--tools/src/h5import/h5import.c10
-rw-r--r--tools/src/h5jam/CMakeLists.txt2
-rw-r--r--tools/src/h5ls/CMakeLists.txt4
-rw-r--r--tools/src/h5ls/h5ls.c412
-rw-r--r--tools/src/h5repack/CMakeLists.txt2
-rw-r--r--tools/src/h5repack/h5repack.c147
-rw-r--r--tools/src/h5repack/h5repack_copy.c278
-rw-r--r--tools/src/h5repack/h5repack_filters.c84
-rw-r--r--tools/src/h5repack/h5repack_main.c14
-rw-r--r--tools/src/h5repack/h5repack_opttable.c44
-rw-r--r--tools/src/h5repack/h5repack_parse.c2
-rw-r--r--tools/src/h5repack/h5repack_refs.c209
-rw-r--r--tools/src/h5repack/h5repack_verify.c154
-rw-r--r--tools/src/h5stat/CMakeLists.txt2
-rw-r--r--tools/src/h5stat/h5stat.c52
-rw-r--r--tools/src/misc/CMakeLists.txt2
-rw-r--r--tools/src/misc/h5clear.c2
-rw-r--r--tools/test/CMakeLists.txt2
-rw-r--r--tools/test/h5copy/CMakeLists.txt2
-rw-r--r--tools/test/h5copy/h5copygentest.c8
-rw-r--r--tools/test/h5diff/CMakeLists.txt2
-rw-r--r--tools/test/h5diff/h5diffgentest.c20
-rw-r--r--tools/test/h5dump/CMakeLists.txt2
-rw-r--r--tools/test/h5format_convert/CMakeLists.txt2
-rw-r--r--tools/test/h5import/CMakeLists.txt2
-rw-r--r--tools/test/h5jam/CMakeLists.txt2
-rw-r--r--tools/test/h5jam/testh5jam.sh.in4
-rw-r--r--tools/test/h5ls/CMakeLists.txt2
-rw-r--r--tools/test/h5repack/CMakeLists.txt2
-rw-r--r--tools/test/h5repack/CMakeTests.cmake60
-rw-r--r--tools/test/h5repack/h5repack.sh.in4
-rw-r--r--tools/test/h5repack/h5repackgentest.c21
-rw-r--r--tools/test/h5stat/CMakeLists.txt2
-rw-r--r--tools/test/misc/CMakeLists.txt2
-rw-r--r--tools/test/misc/vds/CMakeLists.txt2
-rw-r--r--tools/test/perform/CMakeLists.txt6
-rw-r--r--tools/test/perform/iopipe.c36
-rw-r--r--tools/test/perform/perf.c34
-rw-r--r--tools/test/perform/pio_engine.c356
-rw-r--r--tools/test/perform/pio_perf.c56
-rw-r--r--tools/testfiles/help-1.ls2
-rw-r--r--tools/testfiles/help-2.ls2
-rw-r--r--tools/testfiles/help-3.ls2
-rw-r--r--tools/testfiles/tall-2.ls18
-rw-r--r--tools/testfiles/tarray1.ls2
-rw-r--r--tools/testfiles/tarray1_big.ddl2015
-rw-r--r--tools/testfiles/tattr2.ls342
-rw-r--r--tools/testfiles/tattrreg.ddl16
-rw-r--r--tools/testfiles/tattrregR.ddl64
-rw-r--r--tools/testfiles/tattrreg_be.ls33
-rw-r--r--tools/testfiles/tattrreg_le.ls33
-rw-r--r--tools/testfiles/tbinregR.ddl16
-rw-r--r--tools/testfiles/tbinregR.exp12
-rw-r--r--tools/testfiles/tcomp-1.ls82
-rw-r--r--tools/testfiles/tdatareg.ddl15
-rw-r--r--tools/testfiles/tdataregR.ddl64
-rw-r--r--tools/testfiles/tdset-1.ls178
-rw-r--r--tools/testfiles/tdset_idx.ls57
-rw-r--r--tools/testfiles/tempty.ls10
-rw-r--r--tools/testfiles/textlinksrc-nodangle-1.ls2
-rw-r--r--tools/testfiles/tgroup-1.ls2
-rw-r--r--tools/testfiles/tgrpnullspace.ls1
-rw-r--r--tools/testfiles/tnestcomp-1.ls16
-rw-r--r--tools/testfiles/tnestcomp-3.ls40
-rw-r--r--tools/testfiles/tsaf.ls1129
-rw-r--r--tools/testfiles/tstr-1.ls538
-rw-r--r--tools/testfiles/tudfilter.ls27
-rw-r--r--tools/testfiles/tvldtypes1.ls8
208 files changed, 7265 insertions, 6960 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index dc229d2..c7a0691 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -41,13 +41,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Export all exported targets to the build tree for use by parent project
#-----------------------------------------------------------------------------
- if (NOT HDF5_EXTERNALLY_CONFIGURED)
- export (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- NAMESPACE ${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
+ export (
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${HDF_PACKAGE_NAMESPACE}
+ )
endif ()
#-----------------------------------------------------------------------------
@@ -104,15 +102,10 @@ endif ()
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- # 3.11 or greater
- #write_basic_package_version_file (
- # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
- # VERSION ${HDF5_PACKAGE_VERSION}
- # COMPATIBILITY SameMinorVersion
- #)
- configure_file (
- ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
- ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ write_basic_package_version_file (
+ "${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake"
+ VERSION ${HDF5_PACKAGE_VERSION}
+ COMPATIBILITY SameMinorVersion
)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
@@ -201,8 +194,7 @@ endif ()
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
- FILES
- ${HDF5_SOURCE_DIR}/COPYING
+ FILES ${HDF5_SOURCE_DIR}/COPYING
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0127bcb..8e83ca7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,14 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5 C)
if (POLICY CMP0074)
cmake_policy (SET CMP0074 NEW)
endif ()
+if (POLICY CMP0083)
+ cmake_policy (SET CMP0083 NEW)
+endif ()
+
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
#
@@ -34,9 +38,14 @@ endif ()
# CMake version 3.14 added option --ignore-eol to compare files
# cmake -E compare_files --ignore-eol file1 file2
-#if(CMAKE_VERSION VERSION_LESS "3.14.0" AND WIN32)
-# MESSAGE(FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
-#endif()
+set (CMAKE_IGNORE_EOL "--ignore-eol")
+if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set (CMAKE_IGNORE_EOL "")
+ if (WIN32)
+ message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14")
+ endif()
+else ()
+endif ()
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
@@ -394,9 +403,6 @@ HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
-if (HDF5_ENABLE_SANITIZERS)
- include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
-endif ()
#-----------------------------------------------------------------------------
# Targets built within this project are exported at Install time for use
@@ -558,9 +564,7 @@ endif ()
set (EXE_EXT "")
if (WIN32 OR MINGW)
set (EXE_EXT ".exe")
- add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
- add_definitions (-D_CRT_SECURE_NO_WARNINGS)
- add_definitions (-D_CONSOLE)
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CRT_SECURE_NO_WARNINGS _CONSOLE)
endif ()
if (MSVC)
@@ -926,12 +930,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
- # Building with PGI requires CMake 3.3 or greater because previous versions
- # of CMake add the wrong compiler flag for the PGI Fortran compiler.
- if (CMAKE_Fortran_COMPILER_ID MATCHES "PGI" AND CMAKE_VERSION VERSION_LESS "3.3")
- message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ")
- endif ()
-
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
diff --git a/MANIFEST b/MANIFEST
index 62e40cc..6a06f2d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3258,6 +3258,7 @@
./config/cmake/ConfigureChecks.cmake
./config/cmake/CPack.Info.plist.in
./config/cmake/CTestCustom.cmake
+./config/cmake/fileCompareTest.cmake
./config/cmake/FindHDFS.cmake
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
diff --git a/bin/release b/bin/release
index 96c2e78..d7d0a55 100755
--- a/bin/release
+++ b/bin/release
@@ -233,7 +233,7 @@ tar2cmakezip()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.zip $cmziptmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir
@@ -328,7 +328,7 @@ tar2cmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir
@@ -411,7 +411,7 @@ tar2hpccmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
- cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.tar.gz $cmgztmpsubdir
+ cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 80bd810..036735e 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP CXX)
add_subdirectory (src)
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 89d62f1..890d22d 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 2a92ed2..39f0f3a 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 5e7134d..29534a7 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_TEST CXX)
# --------------------------------------------------------------------
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index e914c4d..5478862 100755
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
########################################################
# For any comments please contact cdashhelp@hdfgroup.org
#
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index ab1fa89..11bf39c 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -160,10 +160,6 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
if (HDF5_ENABLE_ROS3_VFD)
- # CMake version 3.13 fixed FindCURL module
- if(CMAKE_VERSION VERSION_LESS "3.13.0" AND WIN32)
- MESSAGE(FATAL_ERROR "Windows builds for this option requires a minimum of CMake 3.13")
- endif ()
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
if (${CURL_FOUND} AND ${OPENSSL_FOUND})
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 2d3d371..c5d8200 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -19,6 +19,24 @@ enable_language (Fortran)
set (HDF_PREFIX "H5")
include (CheckFortranFunctionExists)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
+
+# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
+macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
+ file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
+ string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
+ set (RETURN_VAR "${SOURCE_CODE}")
+endmacro ()
+
+set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+else ()
# The provided CMake Fortran macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
@@ -55,22 +73,16 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
set(${RETURN_VAR} ${COMPILE_RESULT_VAR})
endif ()
endmacro ()
-
-# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
-macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
- file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
- string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
- set (RETURN_VAR "${SOURCE_CODE}")
-endmacro ()
-
+endif ()
#-----------------------------------------------------------------------------
# Check to see C_LONG_DOUBLE is available
READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE)
-CHECK_FORTRAN_FEATURE(c_long_double
- "${SOURCE_CODE}"
- FORTRAN_HAVE_C_LONG_DOUBLE
-)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE)
+endif ()
if (${FORTRAN_HAVE_C_LONG_DOUBLE})
set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1)
@@ -81,10 +93,11 @@ endif ()
# Check to see C_LONG_DOUBLE is different from C_DOUBLE
READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE)
-CHECK_FORTRAN_FEATURE(c_long_double
- "${SOURCE_CODE}"
- FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
-)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
+else ()
+ CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE)
+endif ()
if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1)
else ()
@@ -108,13 +121,80 @@ endif ()
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
-READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+set (PROG_SRC_CODE
+ "
+ PROGRAM FC_AVAIL_KINDS
+ IMPLICIT NONE
+ INTEGER :: ik, jk, k, max_decimal_prec
+ INTEGER :: num_rkinds = 1, num_ikinds = 1
+ INTEGER, DIMENSION(1:10) :: list_ikinds = -1
+ INTEGER, DIMENSION(1:10) :: list_rkinds = -1
+
+ OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+
+ ! Find integer KINDs
+ list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
+ DO ik = 2, 36
+ k = SELECTED_INT_KIND(ik)
+ IF(k.LT.0) EXIT
+ IF(k.GT.list_ikinds(num_ikinds))THEN
+ num_ikinds = num_ikinds + 1
+ list_ikinds(num_ikinds) = k
+ ENDIF
+ ENDDO
+
+ DO k = 1, num_ikinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
+ IF(k.NE.num_ikinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ ! Find real KINDs
+ list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
+ max_decimal_prec = 1
+
+ prec: DO ik = 2, 36
+ exp: DO jk = 1, 17000
+ k = SELECTED_REAL_KIND(ik,jk)
+ IF(k.LT.0) EXIT exp
+ IF(k.GT.list_rkinds(num_rkinds))THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ ENDIF
+ max_decimal_prec = ik
+ ENDDO exp
+ ENDDO prec
+
+ DO k = 1, num_rkinds
+ WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
+ IF(k.NE.num_rkinds)THEN
+ WRITE(8,'(A)',ADVANCE='NO') ','
+ ELSE
+ WRITE(8,'()')
+ ENDIF
+ ENDDO
+
+ WRITE(8,'(I0)') max_decimal_prec
+ WRITE(8,'(I0)') num_ikinds
+ WRITE(8,'(I0)') num_rkinds
+ END PROGRAM FC_AVAIL_KINDS
+ "
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
+else ()
FORTRAN_RUN ("REAL and INTEGER KINDs"
- "${SOURCE_CODE}"
+ "${PROG_SRC_CODE}"
XX
YY
- PROG_RESULT
+ FC_AVAIL_KINDS_RESULT
)
+endif ()
+
# dnl The output from the above program will be:
# dnl -- LINE 1 -- valid integer kinds (comma seperated list)
# dnl -- LINE 2 -- valid real kinds (comma seperated list)
@@ -122,7 +202,7 @@ FORTRAN_RUN ("REAL and INTEGER KINDs"
# dnl -- LINE 4 -- number of valid integer kinds
# dnl -- LINE 5 -- number of valid real kinds
-file (READ "${CMAKE_BINARY_DIR}/pac_fconftest.out" PROG_OUTPUT)
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_fconftest.out" PROG_OUTPUT)
# Convert the string to a list of strings by replacing the carriage return with a semicolon
string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
@@ -165,25 +245,25 @@ message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECI
# **********
string (REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
-foreach (KIND ${VAR} )
- set (PROG_SRC
- "
- PROGRAM main
- USE ISO_C_BINDING
- IMPLICIT NONE
- INTEGER (KIND=${KIND}) a
- OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
- END
- "
- )
- FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC}
- XX
- YY
- PROG_RESULT1
+foreach (KIND ${VAR})
+ set (PROG_SRC_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
)
- file (READ "${CMAKE_BINARY_DIR}/pac_validIntKinds.out" PROG_OUTPUT1)
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC_${KIND}} VALIDINTKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -213,24 +293,24 @@ math (EXPR _LEN "${LEN_VAR}-1")
list (GET VAR ${_LEN} max_real_fortran_kind)
foreach (KIND ${VAR} )
- set (PROG_SRC
- "
- PROGRAM main
- USE ISO_C_BINDING
- IMPLICIT NONE
- REAL (KIND=${KIND}) a
- OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
- END
- "
- )
- FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC}
- XX
- YY
- PROG_RESULT1
+ set (PROG_SRC2_${KIND}
+ "
+ PROGRAM main
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+ REAL (KIND=${KIND}) a
+ OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
+ WRITE(8,'(I0)') ${FC_SIZEOF_A}
+ CLOSE(8)
+ END
+ "
)
- file (READ "${CMAKE_BINARY_DIR}/pac_validRealKinds.out" PROG_OUTPUT1)
+ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC2_${KIND}} VALIDREALKINDS_RESULT_${KIND} SRC_EXT f90)
+ else ()
+ FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND})
+ endif ()
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -261,7 +341,7 @@ list (GET VAR ${_LEN} max_real_fortran_sizeof)
#-----------------------------------------------------------------------------
# Find sizeof of native kinds
#-----------------------------------------------------------------------------
-FORTRAN_RUN ("SIZEOF NATIVE KINDs"
+set (PROG_SRC3
"
PROGRAM main
USE ISO_C_BINDING
@@ -279,11 +359,13 @@ FORTRAN_RUN ("SIZEOF NATIVE KINDs"
CLOSE(8)
END
"
- XX
- YY
- PROG_RESULT
- )
- file (READ "${CMAKE_BINARY_DIR}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
+)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_fortran_source_runs (${PROG_SRC3} PAC_SIZEOF_NATIVE_KINDS_RESULT SRC_EXT f90)
+else ()
+ FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT)
+endif ()
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
# dnl The output from the above program will be:
# dnl -- LINE 1 -- sizeof INTEGER
# dnl -- LINE 2 -- kind of INTEGER
@@ -352,6 +434,9 @@ set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) ::
ENABLE_LANGUAGE (C)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+include (CheckCSourceRuns)
+else ()
#-----------------------------------------------------------------------------
# The provided CMake C macros don't provide a general compile/run function
# so this one is used.
@@ -402,6 +487,7 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
endif ()
endmacro ()
+endif ()
set (PROG_SRC
"
@@ -432,7 +518,11 @@ set (PROG_SRC
"
)
-C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ check_c_source_runs (${PROG_SRC} PROG_OUTPUT)
+else ()
+ C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
+endif ()
# dnl The output from the above program will be:
# dnl -- LINE 1 -- long double decimal precision
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 5c21124..bbe6dda 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
@@ -77,7 +77,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.13-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.14-Source")
#endif()
###############################################################################################################
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 100ada3..17b0854 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -30,8 +30,10 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
#message (STATUS "h5_flag_var=${${h5_flag_var}}")
endmacro ()
-message (STATUS "Warnings Configuration:")
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
+set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
+message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -176,7 +178,12 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
# Append more extra warning flags that only gcc 4.5+ know about
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
- set (H5_CFLAGS1 "${H5_CFLAGS1} -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants")
+ set (H5_CFLAGS1 "${H5_CFLAGS1} -Wstrict-overflow=5 -Wjump-misses-init")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ set (H5_CFLAGS0 "${H5_CFLAGS0} -Wunsuffixed-float-constants")
+ else ()
+ set (H5_CFLAGS0 "${H5_CFLAGS0} -Wno-unsuffixed-float-constants")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 4.6+ know about
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index b29d50b..3afebc2 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -9,7 +9,7 @@ It was built with the following options:
-- @LIB_TYPE@ C/C++/Fortran libraries
-- SZIP (encoder enabled) and ZLIB
-- @LIB_TYPE@ HDF5 tools
- -- Java
+ -- Java @Java_VERSION@
The contents of this directory are:
@@ -28,7 +28,8 @@ After Installation
The examples folder, HDF5Examples, located in the
HDF5 install folder, can be built and tested with CMake and the supplied
HDF5_Examples.cmake file. The HDF5_Examples.cmake expects HDF5 to have
-been installed in the default location with above compilers. Also, the CMake
+been installed in the default location with above compilers (see the
+libhdf5.settings file in the lib install folder). Also, the CMake
utility should be installed.
To test the installation with the examples;
diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake
index 8efee11..375004e 100644
--- a/config/cmake/UseJava.cmake
+++ b/config/cmake/UseJava.cmake
@@ -536,7 +536,7 @@ function(add_jar _TARGET_NAME)
if (_JAVA_SOURCE_FILE MATCHES "^@(.+)$")
get_filename_component(_JAVA_FULL ${CMAKE_MATCH_1} ABSOLUTE)
- list(APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL})
+ list (APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL})
elseif (_JAVA_EXT MATCHES ".java")
file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR} ${_JAVA_FULL})
@@ -550,7 +550,7 @@ function(add_jar _TARGET_NAME)
endif ()
get_filename_component(_JAVA_REL_PATH ${_JAVA_REL_PATH} PATH)
- list(APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_COMPILE_FILES ${_JAVA_SOURCE_FILE})
set(_JAVA_CLASS_FILE "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_REL_PATH}/${_JAVA_FILE}.class")
set(_JAVA_CLASS_FILES ${_JAVA_CLASS_FILES} ${_JAVA_CLASS_FILE})
@@ -561,15 +561,15 @@ function(add_jar _TARGET_NAME)
# Ignored for backward compatibility
elseif (_JAVA_EXT STREQUAL "")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH})
- list(APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}})
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}} ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}_CLASSPATH})
+ list (APPEND _JAVA_DEPENDS ${JAVA_JAR_TARGET_${_JAVA_SOURCE_FILE}})
else ()
__java_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/${_JAVA_SOURCE_FILE}
${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE}
"Copying ${_JAVA_SOURCE_FILE} to the build directory")
- list(APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE})
- list(APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_RESOURCE_FILES ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_SOURCE_FILE})
+ list (APPEND _JAVA_RESOURCE_FILES_RELATIVE ${_JAVA_SOURCE_FILE})
endif ()
endforeach()
@@ -578,17 +578,17 @@ function(add_jar _TARGET_NAME)
get_target_property(_JAVA_JAR_PATH ${_JAVA_INCLUDE_JAR} JAR_FILE)
if (_JAVA_JAR_PATH)
string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_JAR_PATH}")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH})
- list(APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR})
- list(APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH})
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH})
+ list (APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR})
+ list (APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH})
else ()
message(SEND_ERROR "add_jar: INCLUDE_JARS target ${_JAVA_INCLUDE_JAR} is not a jar")
endif ()
else ()
string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_INCLUDE_JAR}")
- list(APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}")
- list(APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}")
- list(APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}")
+ list (APPEND CMAKE_JAVA_INCLUDE_PATH "${_JAVA_INCLUDE_JAR}")
+ list (APPEND _JAVA_DEPENDS "${_JAVA_INCLUDE_JAR}")
+ list (APPEND _JAVA_COMPILE_DEPENDS "${_JAVA_INCLUDE_JAR}")
endif ()
endforeach()
@@ -985,7 +985,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_packages ${arg})
+ list (APPEND _javadoc_packages ${arg})
endif ()
elseif (_state STREQUAL "files")
if (arg STREQUAL "PACKAGES")
@@ -1009,7 +1009,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_files ${arg})
+ list (APPEND _javadoc_files ${arg})
endif ()
elseif (_state STREQUAL "sourcepath")
if (arg STREQUAL "PACKAGES")
@@ -1033,7 +1033,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_sourcepath ${arg})
+ list (APPEND _javadoc_sourcepath ${arg})
endif ()
elseif (_state STREQUAL "classpath")
if (arg STREQUAL "PACKAGES")
@@ -1057,7 +1057,7 @@ function(create_javadoc _target)
elseif (arg STREQUAL "VERSION")
set(_state "version")
else ()
- list(APPEND _javadoc_classpath ${arg})
+ list (APPEND _javadoc_classpath ${arg})
endif ()
elseif (_state STREQUAL "installpath")
if (arg STREQUAL "PACKAGES")
diff --git a/config/cmake/UseJavaClassFilelist.cmake b/config/cmake/UseJavaClassFilelist.cmake
index b98276f..8348e4c 100644
--- a/config/cmake/UseJavaClassFilelist.cmake
+++ b/config/cmake/UseJavaClassFilelist.cmake
@@ -23,7 +23,7 @@ if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
file(GLOB_RECURSE _JAVA_GLOBBED_TMP_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${JAR_CLASS_PREFIX}/*.class")
if (_JAVA_GLOBBED_TMP_FILES)
- list(APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
+ list (APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
endif ()
endforeach()
else()
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
new file mode 100644
index 0000000..d913da0
--- /dev/null
+++ b/config/cmake/fileCompareTest.cmake
@@ -0,0 +1,104 @@
+#
+# 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.
+#
+# fileCompareTest.cmake compares two files.
+
+# arguments checking
+if (NOT TEST_FOLDER)
+ message (FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_ONEFILE)
+ message (FATAL_ERROR "Require TEST_ONEFILE the first file to be defined")
+endif ()
+if (NOT TEST_TWOFILE)
+ message (FATAL_ERROR "Require TEST_TWOFILE the second file to be defined")
+endif ()
+if (NOT TEST_FUNCTION)
+ message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined")
+endif ()
+#if (NOT TEST_EXPECT)
+# message (STATUS "Require TEST_EXPECT to be defined")
+#endif ()
+
+set (TEST_ONE_SIZE 0)
+set (TEST_TWO_SIZE 0)
+set (TEST_ONE_STRING 0)
+set (TEST_TWO_STRING 0)
+set (TEST_ONE_STRING_LEN 0)
+set (TEST_TWO_STRING_LEN 0)
+
+if (TEST_STRINGS STREQUAL "YES")
+ # find the length of the first file
+ #s1=`cat $ufile | wc -c | sed -e 's/ //g'`
+ file (STRINGS ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_STRING)
+ string (LENGTH ${TEST_ONE_STRING} TEST_ONE_STRING_LEN)
+
+ # Get the size of the second file.
+ file (STRINGS ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_STRING)
+ string (LENGTH ${TEST_TWO_STRING} TEST_TWO_STRING_LEN)
+
+ math (EXPR TEST_STRING_SIZE "${TEST_ONE_STRING_LEN} - ${TEST_TWO_STRING_LEN}" )
+
+ # now compare the outputs
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_ONEFILE} ${TEST_FOLDER}/${TEST_TWOFILE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+
+ message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ # if the return value is !=${TEST_EXPECT} bail out
+ if (NOT TEST_RESULT EQUAL TEST_EXPECT)
+ message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
+ endif ()
+else ()
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ message (FATAL_ERROR "CANNOT get file size, file command SIZE not supported")
+ else ()
+ file (SIZE ${TEST_FOLDER}/${TEST_ONEFILE} TEST_ONE_SIZE)
+ file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
+ if (TEST_FUNCTION MATCHES "LT")
+ if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "LTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "EQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GTEQ")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ elseif (TEST_FUNCTION MATCHES "GT")
+ if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
+ message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ else ()
+ message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Failed: Incorrect test size compare command provided.\n${TEST_ERROR}")
+ endif ()
+ endif ()
+endif ()
+
+# everything went fine...
+
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 0315536..41570eb 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -75,7 +75,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (TEST_MASK_FILE)
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
@@ -129,7 +129,7 @@ set (TEST_COMPARE_RESULT 0)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -143,7 +143,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -200,7 +200,7 @@ if (NOT TEST_SKIP_COMPARE)
set (TEST_ERRREF_RESULT 0)
if (TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
@@ -213,7 +213,7 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
@@ -262,7 +262,7 @@ set (TEST_GREP_RESULT 0)
if (TEST_GREP_COMPARE)
# now grep the output with the reference
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
@@ -284,11 +284,13 @@ endif ()
# dump the output unless nodisplay option is set
if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
- RESULT_VARIABLE TEST_RESULT
- )
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ endif ()
endif ()
# everything went fine...
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 3c85d48..e3659f6 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
@@ -253,6 +253,14 @@ endforeach ()
message (STATUS "Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
+
+###################################################################
+######### Following is for submission to CDash ############
+###################################################################
+if (NOT DEFINED MODEL)
+ set (MODEL "Experimental")
+endif ()
+
#-----------------------------------------------------------------------------
## NORMAL process
## -- LOCAL_UPDATE updates the source folder from svn
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index 5a20705..9127329 100755
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -15,7 +15,7 @@
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log
@@ -42,9 +42,9 @@ set (CTEST_SOURCE_VERSEXT "-snap0")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
-#INSTALLDIR - HDF5-1.10.0 root folder
+#INSTALLDIR - HDF5-1.10.x root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
-#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.x
#MODEL - CDash group name
#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
#MPI - enable MPI
@@ -189,15 +189,6 @@ endif ()
###################################################################
###################################################################
-######### Following is for submission to CDash ############
-###################################################################
-if (NOT DEFINED MODEL)
- set (MODEL "Experimental")
-endif ()
-
-###################################################################
-
-###################################################################
##### Following controls CDash submission #####
#set (LOCAL_SUBMIT "TRUE")
##### Following controls test process #####
@@ -209,7 +200,7 @@ endif ()
##### 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_10_6")
+set (REPOSITORY_BRANCH "hdf5_1_10")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 94aafac..28a78d3 100755
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -67,7 +67,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### package examples ####
-#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.10.13-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.10.14-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#############################################################################################
### enable parallel builds
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index c9fc36f..c02669d 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -54,7 +54,7 @@ if (TEST_CHECKUB STREQUAL "YES")
# 'tellub' calls H5Fget_user_block to get the size
# of the user block
#s2=`$JAM_BIN/tellub $origfile`
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -72,7 +72,7 @@ if (TEST_CHECKUB STREQUAL "YES")
if (TEST_O_STRING_LEN)
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -90,7 +90,7 @@ if (TEST_CHECKUB STREQUAL "YES")
endif ()
#$JAM_BIN/getub -c $size $hfile > $tfile
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_GET_PROGRAM} -c ${TEST_STRING_SIZE} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_RESULT
@@ -101,8 +101,8 @@ if (TEST_CHECKUB STREQUAL "YES")
)
# now compare the outputs
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_HFILE}-ub.cmp ${TEST_HFILE}.cmp
RESULT_VARIABLE TEST_RESULT
)
@@ -114,7 +114,7 @@ if (TEST_CHECKUB STREQUAL "YES")
else ()
# call 'ubsize' to get the size of the user block
#ubsize=`$JAM_BIN/tellub $hfile`
- EXECUTE_PROCESS (
+ execute_process (
COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_HFILE}
WORKING_DIRECTORY ${TEST_FOLDER}
RESULT_VARIABLE TEST_H_STRING_LEN
diff --git a/config/cmake/wait_H5Tinit.cmake b/config/cmake/wait_H5Tinit.cmake
index c0b4d06..b778765 100644
--- a/config/cmake/wait_H5Tinit.cmake
+++ b/config/cmake/wait_H5Tinit.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
message(STATUS "Check for existence of ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
execute_process(COMMAND ls ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c RESULT_VARIABLE H5TI_result OUTPUT_QUIET ERROR_QUIET)
diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake
index 4e292a7..2d72e8d 100644
--- a/config/cmake_ext_mod/CTestCustom.cmake
+++ b/config/cmake_ext_mod/CTestCustom.cmake
@@ -5,7 +5,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
".*note.*expected.*void.*but argument is of type.*volatile.*"
".*src.SZIP.*:[ \t]*warning.*"
".*src.ZLIB.*:[ \t]*warning.*"
- ".*jpeg.src.*:[ \t]*warning.*"
+ ".*src.JPEG.*:[ \t]*warning.*"
".*POSIX name for this item is deprecated.*"
".*disabling jobserver mode.*"
".*warning.*implicit declaration of function.*"
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 2303d6d..8f882b4 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -51,7 +51,7 @@ find_path(SZIP_INCLUDE_DIR szlib.h)
set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static)
foreach(name ${szip_names})
- list(APPEND szip_names_debug "${name}d")
+ list (APPEND szip_names_debug "${name}d")
endforeach()
if(NOT SZIP_LIBRARY)
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index d1d9a6c..fee6def 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -82,10 +82,8 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
- FILES
- ${targetfilename}
- DESTINATION
- ${targetdestination}
+ FILES ${targetfilename}
+ DESTINATION ${targetdestination}
CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
OPTIONAL
@@ -97,10 +95,8 @@ endmacro ()
macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
if (WIN32 AND MSVC)
install (
- FILES
- $<TARGET_PDB_FILE:${progtarget}>
- DESTINATION
- ${targetdestination}
+ FILES $<TARGET_PDB_FILE:${progtarget}>
+ DESTINATION ${targetdestination}
CONFIGURATIONS Debug RelWithDebInfo
COMPONENT ${targetcomponent}
OPTIONAL
@@ -123,18 +119,12 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
endif ()
endif ()
- set_target_properties (${libtarget}
- PROPERTIES
- OUTPUT_NAME
- ${LIB_RELEASE_NAME}
-# OUTPUT_NAME_DEBUG
-# ${LIB_DEBUG_NAME}
- OUTPUT_NAME_RELEASE
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_MINSIZEREL
- ${LIB_RELEASE_NAME}
- OUTPUT_NAME_RELWITHDEBINFO
- ${LIB_RELEASE_NAME}
+ set_target_properties (${libtarget} PROPERTIES
+ OUTPUT_NAME ${LIB_RELEASE_NAME}
+# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
+ OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
)
#get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME)
#get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG)
@@ -143,8 +133,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
if (${libtype} MATCHES "STATIC")
if (WIN32)
- set_target_properties (${libtarget}
- PROPERTIES
+ set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
@@ -156,8 +145,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
#----- Use MSVC Naming conventions for Shared Libraries
if (MINGW AND ${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget}
- PROPERTIES
+ set_target_properties (${libtarget} PROPERTIES
IMPORT_SUFFIX ".lib"
IMPORT_PREFIX ""
PREFIX ""
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 1cce918..0a6a092 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -16,6 +16,11 @@
enable_language (Fortran)
set (HDF_PREFIX "H5")
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ include (CheckFortranSourceRuns)
+ include (CheckFortranSourceCompiles)
+endif ()
+
#-------------------------------------------------------------------------------
# Fix Fortran flags if we are compiling staticly on Windows using
# Windows_MT.cmake from config/cmake/UserMacros
@@ -42,71 +47,15 @@ file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,
string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
-#-----------------------------------------------------------------------------
-# The provided CMake Fortran macros don't provide a general check function
-# so this one is used for a sizeof test.
-#-----------------------------------------------------------------------------
-macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- message (STATUS "Testing Fortran ${FUNCTION}")
- if (HDF5_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- "${CODE}"
- )
- TRY_COMPILE (RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# message (STATUS "Test result ${OUTPUT}")
-# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- if (${RESULT_VAR})
- set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- else ()
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require Fortran compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no Fortran compiler, problems arise.
-#
-# Be careful with leading spaces here, do not remove them.
-#-----------------------------------------------------------------------------
-
-# Check for Non-standard extension intrinsic function SIZEOF
-set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(sizeof
+#test code source
+set (SIZEOF_CODE
"
PROGRAM main
i = sizeof(x)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF
)
-
-# Check for F2008 standard intrinsic function C_SIZEOF
-set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
-CHECK_FORTRAN_FEATURE(c_sizeof
+set (C_SIZEOF_CODE
"
PROGRAM main
USE ISO_C_BINDING
@@ -115,11 +64,8 @@ CHECK_FORTRAN_FEATURE(c_sizeof
result = c_sizeof(a)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF
)
-
-# Check for F2008 standard intrinsic function STORAGE_SIZE
-CHECK_FORTRAN_FEATURE(storage_size
+set (STORAGE_SIZE_CODE
"
PROGRAM main
INTEGER :: a
@@ -127,22 +73,15 @@ CHECK_FORTRAN_FEATURE(storage_size
result = storage_size(a)
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE
)
-
-# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
-set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
-CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
+set (ISO_FORTRAN_ENV_CODE
"
PROGRAM main
USE, INTRINSIC :: ISO_FORTRAN_ENV
END PROGRAM
"
- ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV
)
-
-set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
-CHECK_FORTRAN_FEATURE(RealIsNotDouble
+set (REALISNOTDOUBLE_CODE
"
MODULE type_mod
INTERFACE h5t
@@ -165,14 +104,8 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
CALL h5t(d)
END PROGRAM main
"
- ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE
)
-
-#-----------------------------------------------------------------------------
-# Checks if the ISO_C_BINDING module meets all the requirements
-#-----------------------------------------------------------------------------
-set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
-CHECK_FORTRAN_FEATURE(iso_c_binding
+set (ISO_C_BINDING_CODE
"
PROGRAM main
USE iso_c_binding
@@ -184,9 +117,95 @@ CHECK_FORTRAN_FEATURE(iso_c_binding
ptr = C_LOC(ichr(1:1))
END PROGRAM
"
- ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING
)
+if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+ endif ()
+ check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
+ check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
+ check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90)
+ check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
+else ()
+ #-----------------------------------------------------------------------------
+ # The provided CMake Fortran macros don't provide a general check function
+ # so this one is used for a sizeof test.
+ #-----------------------------------------------------------------------------
+ macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
+ message (STATUS "Testing Fortran ${FUNCTION}")
+ if (HDF5_REQUIRED_LIBRARIES)
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
+ else ()
+ set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif ()
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ "${CODE}"
+ )
+ TRY_COMPILE (RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
+ CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (STATUS "Test result ${OUTPUT}")
+ # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+
+ if (${RESULT_VAR})
+ set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
+ "${OUTPUT}\n\n"
+ )
+ else ()
+ message (STATUS "Testing Fortran ${FUNCTION} - Fail")
+ set (${VARIABLE} 0 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
+ "${OUTPUT}\n\n")
+ endif ()
+ endmacro ()
+
+ #-----------------------------------------------------------------------------
+ # Configure Checks which require Fortran compilation must go in here
+ # not in the main ConfigureChecks.cmake files, because if the user has
+ # no Fortran compiler, problems arise.
+ #
+ # Be careful with leading spaces here, do not remove them.
+ #-----------------------------------------------------------------------------
+
+ # Check for Non-standard extension intrinsic function SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF)
+
+ # Check for F2008 standard intrinsic function C_SIZEOF
+ set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE)
+ CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF)
+
+ # Check for F2008 standard intrinsic function STORAGE_SIZE
+ CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
+
+ # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
+ set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE)
+ CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV)
+
+ set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
+ CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+
+ #-----------------------------------------------------------------------------
+ # Checks if the ISO_C_BINDING module meets all the requirements
+ #-----------------------------------------------------------------------------
+ set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE)
+ CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING)
+endif ()
+
#-----------------------------------------------------------------------------
# Add debug information (intel Fortran : JB)
#-----------------------------------------------------------------------------
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index c65c951..b011ae8 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -87,7 +87,7 @@ if (TEST_ERRREF)
# if the .err file exists grep the error output with the error reference before comparing stdout
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM)
- list(LENGTH TEST_ERR_STREAM test_len)
+ list (LENGTH TEST_ERR_STREAM test_len)
if (test_len GREATER 0)
# TEST_ERRREF should always be matched
string (REGEX MATCH "${TEST_ERRREF}" TEST_MATCH ${TEST_ERR_STREAM})
@@ -103,7 +103,7 @@ if (TEST_ERRREF)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -116,7 +116,7 @@ if (TEST_ERRREF)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 6440c81..2b8b6b0 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -90,7 +90,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the .err file exists and ERRROR_APPEND is enabled
if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (TEST_MASK_FILE)
STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
@@ -163,7 +163,7 @@ endif ()
# if the output file needs Modified text removed
if (TEST_MASK_MOD)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
+ string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()
@@ -210,7 +210,7 @@ set (TEST_COMPARE_RESULT 0)
if (NOT TEST_SKIP_COMPARE)
if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF)
@@ -224,7 +224,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT TEST_SORT_COMPARE)
# now compare the output with the reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_COMPARE_RESULT
)
else ()
@@ -281,7 +281,7 @@ if (NOT TEST_SKIP_COMPARE)
set (TEST_ERRREF_RESULT 0)
if (TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
if (WIN32 OR MINGW)
configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF)
@@ -294,7 +294,7 @@ if (NOT TEST_SKIP_COMPARE)
# now compare the error output with the error reference
execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
RESULT_VARIABLE TEST_ERRREF_RESULT
)
if (TEST_ERRREF_RESULT)
@@ -343,7 +343,7 @@ set (TEST_GREP_RESULT 0)
if (TEST_GREP_COMPARE)
# now grep the output with the reference
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- list(LENGTH TEST_STREAM test_len)
+ list (LENGTH TEST_STREAM test_len)
if (test_len GREATER 0)
# TEST_REFERENCE should always be matched
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
diff --git a/config/gnu-flags b/config/gnu-flags
index f23ad68..3ca74c1 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -251,7 +251,9 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 4.5
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5; then
- H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants"
+ H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init"
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wunsuffixed-float-constants"
+ NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-unsuffixed-float-constants"
fi
# gcc 4.6
diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake
index 2625ec3..ecee2de 100644
--- a/config/sanitizer/sanitizers.cmake
+++ b/config/sanitizer/sanitizers.cmake
@@ -28,52 +28,53 @@ function(append value)
endforeach(variable)
endfunction()
-if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+message(STATUS "USE_SANITIZER=${USE_SANITIZER}, CMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}")
+if(USE_SANITIZER AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
- append("-fno-omit-frame-pointer" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fno-omit-frame-pointer" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
+ message(STATUS "Building with sanitize, base flags=${CMAKE_C_SANITIZER_FLAGS}")
if(UNIX)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
- append("-O1" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-O1" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
if(USE_SANITIZER MATCHES "([Aa]ddress);([Uu]ndefined)"
OR USE_SANITIZER MATCHES "([Uu]ndefined);([Aa]ddress)")
message(STATUS "Building with Address, Undefined sanitizers")
- append("-fsanitize=address,undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address,undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Aa]ddress)")
# Optional: -fno-optimize-sibling-calls -fsanitize-address-use-after-scope
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE AddressSanitizer)
elseif(USE_SANITIZER MATCHES "([Mm]emory([Ww]ith[Oo]rigins)?)")
# Optional: -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2
- append("-fsanitize=memory" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=memory" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(USE_SANITIZER MATCHES "([Mm]emory[Ww]ith[Oo]rigins)")
message(STATUS "Building with MemoryWithOrigins sanitizer")
- append("-fsanitize-memory-track-origins" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize-memory-track-origins" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(STATUS "Building with Memory sanitizer")
endif()
set(MEMCHECK_TYPE MemorySanitizer)
elseif(USE_SANITIZER MATCHES "([Uu]ndefined)")
message(STATUS "Building with Undefined sanitizer")
- append("-fsanitize=undefined" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=undefined" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
if(EXISTS "${BLACKLIST_FILE}")
- append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_FLAGS
- CMAKE_CXX_FLAGS)
+ append("-fsanitize-blacklist=${BLACKLIST_FILE}" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
endif()
set(MEMCHECK_TYPE UndefinedBehaviorSanitizer)
elseif(USE_SANITIZER MATCHES "([Tt]hread)")
message(STATUS "Building with Thread sanitizer")
- append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=thread" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE ThreadSanitizer)
elseif(USE_SANITIZER MATCHES "([Ll]eak)")
message(STATUS "Building with Leak sanitizer")
- append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=leak" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
set(MEMCHECK_TYPE LeakSanitizer)
else()
message(
@@ -82,7 +83,7 @@ if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
elseif(MSVC)
if(USE_SANITIZER MATCHES "([Aa]ddress)")
message(STATUS "Building with Address sanitizer")
- append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("-fsanitize=address" CMAKE_C_SANITIZER_FLAGS CMAKE_CXX_SANITIZER_FLAGS)
else()
message(
FATAL_ERROR
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 9ebb11c..8383ba2 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_EXAMPLES C)
#-----------------------------------------------------------------------------
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 31edad2..7b90d83 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt