summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-17 21:19:24 (GMT)
committerGitHub <noreply@github.com>2021-06-17 21:19:24 (GMT)
commita00ad2b657b7918d4b11edee893f6701cf50e351 (patch)
tree345a6fa6c006bb564ffe53074acbd90f7611441b /config
parenta7f729581b1955479255f59337481d30ff17295f (diff)
downloadhdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.zip
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.gz
hdf5-a00ad2b657b7918d4b11edee893f6701cf50e351.tar.bz2
VFD SWMR: Normalization with develop (#765)
* Brings CMake updates from develop * Brings reduction in pedantic casts from develop * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Formatted source * Bring over some VOL registration changes * VOL cleanup * H5VL_request_status_t substitutions * H5F.c cleanup * Minor API tweaks from develop * Moves H5G package init/teardown to H5Gint.c * H5G cleanup * H5M cleanup * H5SM cleanup * H5T cleanup * H5R cleanup * H5Lpublic.h cleanup * H5L cleanup * H5O cleanup * H5A, H5CS, and H5AC cleanup * Moved H5A init/teardown code to H5Aint.c * Moves H5D I/O functions to H5D.c * H5D cleanup * Misc minor cleanup * H5P close cleanup * H5Tpublic.h cleanup * Fixes err_compat test * H5PLpublic.h cleanup * Updates H5Ppublic.h * H5Fpublic.h updates * H5A.c cleanup * Brings over H5Aexists and related changes * Brings CMake shell testing changes from develop * Close callback changes * H5R and H5Tcommit normalization * err_compat test works now * H5O tweaks * Updates VOL registration code * Brings over H5VL_create_object * H5Tconv.c reformatting * H5T.c tweaks * Brings datatype and reference updates from develop * Brings VOL plugin loading changes from develop * Brings event sets from develop * Brings async functions over * Tools changes * Brings over many tools changes from develop * Brings VOL flags from develop * Fixes h5dump double/float tests * Updates h5repack tests * Brings h5diff test changes from develop * Last h5dump changes * Brings test changes from develop * Committing clang-format changes * Tidied h5_testing() * Brings chunk iteration code + misc from develop * Updates vds test * Enables external link parallel test * Brings updated property lists from develop * H5G changes from develop * H5MF cleanup * Brings vfd_swmr test back into CMake * Updates threadsafe test * Updates plist test * Brings recent changes from develop * Require a C++11 compiler to build the C++ wrappers (#693) * Committing clang-format changes * Requires a C++11 compiler to build the C++ wrappers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699) * Removes pre-C99 build and header cruft (#700) * Assumes ANSI C headers exist * Assumes stdbool.h, stdint.h, and inttypes.h are present * Assumes the C++ compiler can handle stdint.h * Removes all work-arounds for missing functionality, especially stdbool.h Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates release documents * Brings parallel changes from develop * Adds a VFD/parallel check program for the VFD SWMR shell test * Updates MANIFEST * Disable building VFD SWMR acceptance tests on CMake * Removes err.h from genall5.c * Partial cleanup of H5Cpkg.h * Fixes printf specifiers in H5Cdbg.c * Java and fortran cmake changes (#694) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Split H5L.c internal code to H5Lint.c (#691) * Committing clang-format changes * Splits internal parts of H5L.c to H5Lint.c Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Clean up type size checks in configure.ac (#702) * Committing clang-format changes * C++ warning and build fixes (#707) * Committing clang-format changes * C++ build and warning updates * Fixes all warnings on C++ (with gcc 9.3) * Updates CMake and Autotools C++ builds * Undo warning clobber Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes some DEC Alpha cruft from H5detect and H5private.h (#708) * Cleans up hsize_t and haddr_t size guessing (#709) * Cleans up definitions of haddr_t and hsize_t + cruft removal * Formatted source * Updates PGI C/C++ configurations (#715) * Updates PGI C/C++ configurations Tweaks some settings and configures pgc++ to use C++11 * Updated copyright information * Adds an Intel C++ configuration file (#716) * Adds an Intel C++ configuration file * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719) * Removes clang-format comments from H5O.c call * Fixes bin/trace to correctly wrap lines near the clang-format limit * Removed unused variable from bin/trace * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Updates CMake size_t and ssize_t checks for MacOS * Moved a little boilerplate over from develop * Fixes some warnings * Committing clang-format changes * Moves gcc warning macros from H5public.h to H5private.h (#724) * Moves gcc warning suppression macros out of H5public.h * Update RELEASE.txt * Formatted source * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726) * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ Allows C++ library to be built on older versions of gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Moves H5PacketTable default ctor inside source file (#731) * Brings (most) H5Xdevelop.h headers from develop * Trivial H5F and H5O changes during normalization * Renames buf_ptr back to page_buf to better align with develop * Removed H5HGtrap.c * Brings changes from develop * Normalization (mainly cache) with develop * Fix Direct VFD Testing in CMake (#742) * Fixes C++ warnings when passing hsize_t values to printf in test code (#745) * Organize and align compiler flags (#741) * OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics * HDFFV-11212 Use the new references correctly in JNI utility and tests * format source * Fix typo * Add new test file * HDFFV-11212 - update test and remove unused arg * Minor non-space formatting changes * Use H5I_INVALID_ID instead of "-1" * source formatting * add missing testfile, update jni function * Undo commit of debug code * remove mislocated file * Fix h5repack test for handling of fapls and id close * Update h5diff test files usage text * HDFFV-11212 add new ref tests for JNI export dataset * src format update * Remove blank line typo * src format typo * long double requires %Lg * Another long double foramt specifer S.B. %Lg * issue with t128bit test * Windows issue with h5dump and type. * Fix review issues * refactor function nesting and fix error checks * format fixes * Remove untested functions and javadoc quiet comments * Restore TRY block. * Change string append errors to memory exception * revert to H5_JNI_FATAL_ERROR - support functions need work * Add assertion error for h5util functions * remove duplicate function * format fix * Revert HD function error handling * Update copyright comments * GH #386 java folder copyright corrections * Whitespace * GH #359 implement and fix tools 1.6 API usage * remove excessive comments * Flip inits to correct ifdef section * rework ifdef to be simpler * format issue * Reformat ifdef inits * remove static attribute * format compliance * Update names * Revert because logic relies on float not being int * Changes noticed from creating merge of #412 * Double underscore change * Correct compiler version variable used * Remove header guard underscores * Whitespace cleanup * Split format source and commit changes on repo push * remove pre-split setting * Change windows TS to use older VS. * correct window os name * HDFFV-11212 JNI export util and Javadoc * Suggested review changes * Another change found * Committing clang-format changes * HDFFV-11113 long double in tools * HDFFV-11113 add note * Disable long double tests for now * HDFFV-11228 remove arbitrary CMake warning groups. * Make each flag a string * Some Javadoc warning fixes * Updated javadoc fixes * # WARNING: head commit changed in the meantime HDFFV-11229 Fix long double usage in tools and java Changed h5dump and h5ls to just print 128-bit for long double type. Added test and file for dataset and attributes with all three float types. * Committing clang-format changes * HDFFV-11229 Add release note * HDFFV-11229 windows testfile needed * fix typo * Remove non supported message text * HDFFV-11229 - change ldouble test to check both native and general * HDFFV-11229 add second file compare * HDFFV-11229 fix reference file * HDFFV-11229 autotools check two refs * HDFFV-11229 revert back to removal of NATIVE_LDOUBLE in tools output * Committing clang-format changes * Update release note * Update attribute type of ref file * Change source of ninja for macs * try port instead of brew * Recommended is to use brew. * Undo non long double changes * remove unneeded file * Fix perl and doxygen CMake code * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument * Add stamp files to BYPRODUCTS * Only one copy of file exists * Fix custom cmmand depends targets * Fix fortran custom command DEPENDS * Add LD_LIBRARY_PATH to tests * Add custom target for DEPENDS * Add h5detect conditionaly to generated target DEPENDS * Correct DEPENDS targets * Parallel builds need the mpi compiler for pkgconfig scripts. * install only if MPI build * Fortran target depends * Remove incorrect source attribute * doxygen adjustments * doxygen build updates * Correct version * Correct function version - function has been merged to 1.12 * Correct version string for map functions * Cleanup warnings for tools debug builds * TRILAB-227 - fix indexing for h5diff selections * Correct location of pos to index function call * TRILAB-227 Enable test * Quote subset args * Use MATCHES because of AppleClang * if blocks needed for build modes * Update list of DT platforms * VS2019 correctly displays float values * revert VS2019 change * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * Java reference functions updated enabled fortran in cmake gcc action yaml file java reference test changed to correctly test refs jni reference functions that create ids changed to use jni id logging * Correct BYPRODUCTS argument * Correct more genereated files BYPRODUCTS * BYPRODUCTS must have unique locations * Fix typo * Fix fortran configure checks * Rework H5_PAC_C_MAX_REAL_PRECISION setting logic * Add note about fortran configure change * Adds a quick for for some egregious chunk_info badness (#722) * Fixes issue with ccmake that prevents building Fortran (#723) ccmake runs iteratively, and the check_fortran_source_runs macros were clobbering a single output file that did not get updated on further configure iterations * Fix conflicts with merge * Move MAX_PRECISION back to HDF5UseFortran.cmake * Use STREQUAL to test macro argument * Move C language test to ConfigureChecks from HDF5UseFortran * MAX_PRECISION defines must be defined * Organize flags and align autotools and cmake * Fix comment in no-error-general warnings files. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> * Committing clang-format changes * Cache code tidying * Constification of cache code * Renaming of static calls in cache * Fixes H5C mess made by git during merge * Committing clang-format changes * Fixes a printf format issue w/ parallel * Revert "Committing clang-format changes" This reverts commit 1265fe87fec6589f029cf3b1de6d586c90168654. * Turns off clang formatter in H5C while syncing with develop * Adds a lot of HD prefixes and cleans up err.h usage * Committing clang-format changes * Brings cache skip list optimization from develop * Brings recent changes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'config')
-rw-r--r--config/clang-warnings/noerror-general6
-rw-r--r--config/cmake/ConfigureChecks.cmake116
-rw-r--r--config/cmake/H5pubconf.h.in20
-rw-r--r--config/cmake/HDF5UseFortran.cmake147
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake76
-rw-r--r--config/cmake/HDFCompilerFlags.cmake11
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake16
-rw-r--r--config/commence.am2
-rw-r--r--config/gnu-cxxflags19
-rw-r--r--config/gnu-flags6
-rw-r--r--config/gnu-warnings/cxx-4.91
-rw-r--r--config/gnu-warnings/cxx-92
-rw-r--r--config/gnu-warnings/developer-104
-rw-r--r--config/gnu-warnings/noerror-general6
-rw-r--r--config/intel-cxxflags67
-rw-r--r--config/intel-fflags62
-rw-r--r--config/intel-flags78
-rw-r--r--config/intel-warnings/1519
-rw-r--r--config/intel-warnings/188
-rw-r--r--config/intel-warnings/developer-general4
-rw-r--r--config/intel-warnings/general1
-rw-r--r--config/intel-warnings/general-192
-rw-r--r--config/pgi-cxxflags23
-rw-r--r--config/pgi-fflags64
-rw-r--r--config/pgi-flags22
25 files changed, 492 insertions, 290 deletions
diff --git a/config/clang-warnings/noerror-general b/config/clang-warnings/noerror-general
index ad50dfc..4690ebd 100644
--- a/config/clang-warnings/noerror-general
+++ b/config/clang-warnings/noerror-general
@@ -1,6 +1,8 @@
#
-# HDF5 code should not trigger the following warnings under any
-# circumstances, so ask the compiler to treat them as errors:
+# These warnings will be treated as errors, using the error-general file,
+# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or
+# the --enable-warnings-as-errors option is specified for configure.
+# Otherwise this file will be used to treat them as warnings.
#
-Wbad-function-cast
-Wimplicit-function-declaration
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 19e7dce..87b2006 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -213,18 +213,126 @@ endif()
# Check if C has __float128 extension
#-----------------------------------------------------------------------------
-CHECK_TYPE_SIZE("__float128" ${HDF_PREFIX}_SIZEOF___FLOAT128)
-if (${${HDF_PREFIX}_SIZEOF___FLOAT128})
+HDF_CHECK_TYPE_SIZE(__float128 _SIZEOF___FLOAT128)
+if (${_SIZEOF___FLOAT128})
set (${HDF_PREFIX}_HAVE_FLOAT128 1)
+ set (${HDF_PREFIX}_SIZEOF___FLOAT128 ${_SIZEOF___FLOAT128})
else ()
set (${HDF_PREFIX}_HAVE_FLOAT128 0)
set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
endif ()
-CHECK_TYPE_SIZE("_Quad" ${HDF_PREFIX}_SIZEOF__QUAD)
-if (NOT ${${HDF_PREFIX}_SIZEOF__QUAD})
+HDF_CHECK_TYPE_SIZE(_Quad _SIZEOF__QUAD)
+if (NOT ${_SIZEOF__QUAD})
set (${HDF_PREFIX}_SIZEOF__QUAD 0)
+else ()
+ set (${HDF_PREFIX}_SIZEOF__QUAD ${_SIZEOF__QUAD})
+endif ()
+
+#-----------------------------------------------------------------------------
+# The provided CMake C macros don't provide a general compile/run function
+# so this one is used.
+#-----------------------------------------------------------------------------
+set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
+macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Detecting C ${FUNCTION_NAME}")
+ endif ()
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ ${SOURCE_CODE}
+ )
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ COMPILE_DEFINITIONS "-D_SIZEOF___FLOAT128=${H5_SIZEOF___FLOAT128};-D_HAVE_QUADMATH_H=${H5_HAVE_QUADMATH_H}"
+ COMPILE_OUTPUT_VARIABLE COMPILEOUT
+ RUN_OUTPUT_VARIABLE OUTPUT_VAR
+ )
+
+ set (${RETURN_VAR} ${OUTPUT_VAR})
+
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
+ message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ endif ()
+
+ if (${COMPILE_RESULT_VAR})
+ if (${RUN_RESULT_VAR} MATCHES 0)
+ set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
+ endif ()
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
+ "${OUTPUT_VAR}\n\n"
+ )
+ else ()
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
+ endif ()
+ set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
+ "${OUTPUT_VAR}\n\n")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
+ endif ()
+endmacro ()
+
+set (PROG_SRC
+ "
+#include <float.h>\n\
+#include <stdio.h>\n\
+#define CHECK_FLOAT128 _SIZEOF___FLOAT128\n\
+#if CHECK_FLOAT128!=0\n\
+#if _HAVE_QUADMATH_H!=0\n\
+#include <quadmath.h>\n\
+#endif\n\
+#ifdef FLT128_DIG\n\
+#define C_FLT128_DIG FLT128_DIG\n\
+#else\n\
+#define C_FLT128_DIG 0\n\
+#endif\n\
+#else\n\
+#define C_FLT128_DIG 0\n\
+#endif\n\
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n\
+#define C_LDBL_DIG DECIMAL_DIG\n\
+#else\n\
+#define C_LDBL_DIG LDBL_DIG\n\
+#endif\n\nint main() {\nFILE *pFile = fopen(\"pac_Cconftest.out\",\"w\")\\\;\nfprintf(pFile, \"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
+ "
+)
+
+C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES)
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_Cconftest.out" PROG_OUTPUT4)
+message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}")
+
+# dnl The output from the above program will be:
+# dnl -- long double decimal precision -- __float128 decimal precision
+
+list (GET PROG_OUTPUT4 0 H5_LDBL_DIG)
+list (GET PROG_OUTPUT4 1 H5_FLT128_DIG)
+
+if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0)
+ set (${HDF_PREFIX}_HAVE_FLOAT128 0)
+ set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
+ set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG})
+else ()
+ set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG})
+endif ()
+if (NOT ${_PAC_C_MAX_REAL_PRECISION})
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
+else ()
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
endif ()
+message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 8f32e58..b208cba 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -29,7 +29,7 @@
/* Define the default plugins path to compile */
#cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@"
-/* Define if `dev_t' is a scalar */
+/* Define if dev_t is a scalar */
#cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@
/* Define to dummy `main' function (if any) required to link to the Fortran
@@ -85,6 +85,9 @@
/* Define to 1 if you have the `alarm' function. */
#cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#cmakedefine H5_HAVE_ARPA_INET_H @H5_HAVE_ARPA_INET_H@
+
/* Define to 1 if you have the `asprintf' function. */
#cmakedefine H5_HAVE_ASPRINTF @H5_HAVE_ASPRINTF@
@@ -98,9 +101,6 @@
/* Define if the compiler understands the __func__ keyword */
#cmakedefine H5_HAVE_C99_FUNC @H5_HAVE_C99_FUNC@
-/* Define to 1 if you have the <arpa/inet.h> header file. */
-#cmakedefine H5_HAVE_ARPA_INET_H @H5_HAVE_ARPA_INET_H@
-
/* Define to 1 if you have the `clock_gettime' function. */
#cmakedefine H5_HAVE_CLOCK_GETTIME @H5_HAVE_CLOCK_GETTIME@
@@ -249,7 +249,7 @@
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@
-/* Define if we can build the Mirror VFD */
+/* Define whether the Mirror virtual file driver (VFD) will be compiled */
#cmakedefine H5_HAVE_MIRROR_VFD @H5_HAVE_MIRROR_VFD@
/* Define if we have MPE support */
@@ -258,10 +258,10 @@
/* Define to 1 if you have the <mpe.h> header file. */
#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@
-/* Define if MPI_Comm_c2f and MPI_Comm_f2c exists */
+/* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@
-/* Define if MPI_Info_c2f and MPI_Info_f2c exists */
+/* Define if MPI_Info_c2f and MPI_Info_f2c exist */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Info @H5_HAVE_MPI_MULTI_LANG_Info@
/* Define to 1 if you have the <netdb.h> header file. */
@@ -456,7 +456,7 @@
/* Define if the compiler understands __inline__ */
#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@
-/* Define if the library will ignore file locks when disabled */
+/* Define if the library will ignore file locks when disabled */
#cmakedefine H5_IGNORE_DISABLED_FILE_LOCKS @H5_IGNORE_DISABLED_FILE_LOCKS@
/* Define if the high-level library headers should be included in hdf5.h */
@@ -515,10 +515,10 @@
#define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION_STRING@"
/* Determine the maximum decimal precision in C */
-#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
+#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
/* Define Fortran Maximum Real Decimal Precision */
-#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
+#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
/* Width for printf() for type `long long' or `__int64', use `ll' */
#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 67f47ec..e192ec4 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -313,7 +313,7 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
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)
+file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT3)
# dnl The output from the above program will be:
# dnl -- LINE 1 -- sizeof INTEGER
# dnl -- LINE 2 -- kind of INTEGER
@@ -323,14 +323,14 @@ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT)
# dnl -- LINE 6 -- kind of DOUBLE PRECISION
# Convert the string to a list of strings by replacing the carriage return with a semicolon
-string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
+string (REGEX REPLACE "\n" ";" PROG_OUTPUT3 "${PROG_OUTPUT3}")
-list (GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
-list (GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND)
-list (GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF)
-list (GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND)
-list (GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
-list (GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND)
+list (GET PROG_OUTPUT3 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
+list (GET PROG_OUTPUT3 1 PAC_FORTRAN_NATIVE_INTEGER_KIND)
+list (GET PROG_OUTPUT3 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF)
+list (GET PROG_OUTPUT3 3 PAC_FORTRAN_NATIVE_REAL_KIND)
+list (GET PROG_OUTPUT3 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
+list (GET PROG_OUTPUT3 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND)
if (NOT PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
message (FATAL_ERROR "Failed to find SIZEOF NATIVE INTEGER KINDs for Fortran")
@@ -372,132 +372,13 @@ endif ()
set (${HDF_PREFIX}_H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}")
-string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS})
-string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR})
-set (${HDF_PREFIX}_H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)")
-
-string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF})
-string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR})
-set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)")
-
-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.
-#-----------------------------------------------------------------------------
-macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Detecting C ${FUNCTION_NAME}")
- endif ()
- if (HDF5_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
- else ()
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
- ${SOURCE_CODE}
- )
- TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- RUN_OUTPUT_VARIABLE OUTPUT_VAR
- )
-
- set (${RETURN_VAR} ${OUTPUT_VAR})
-
- #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
- # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
- # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #endif ()
-
- if (${COMPILE_RESULT_VAR})
- if (${RUN_RESULT_VAR} MATCHES 1)
- set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
- "${OUTPUT_VAR}\n\n"
- )
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
- endif ()
- set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
- "${OUTPUT_VAR}\n\n")
- endif ()
- else ()
- message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
- endif ()
-endmacro ()
-endif ()
-
-set (PROG_SRC
- "
-#include <float.h>
-#include <stdio.h>
-#define CHECK_FLOAT128 ${${HDF_PREFIX}_SIZEOF___FLOAT128}
-#if CHECK_FLOAT128!=0
-# if ${${HDF_PREFIX}_HAVE_QUADMATH_H}!=0
-#include <quadmath.h>
-# endif
-# ifdef FLT128_DIG
-#define C_FLT128_DIG FLT128_DIG
-# else
-#define C_FLT128_DIG 0
-# endif
-#else
-#define C_FLT128_DIG 0
-#endif
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#define C_LDBL_DIG DECIMAL_DIG
-#else
-#define C_LDBL_DIG LDBL_DIG
-#endif
- int main() {
- printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\;
- return 1\\\;
- }
- "
-)
-
-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
-# dnl -- LINE 2 -- __float128 decimal precision
-
-# Convert the string to a list of strings by replacing the carriage return with a semicolon
-string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
-
-list (GET PROG_OUTPUT 0 LDBL_DIG)
-list (GET PROG_OUTPUT 1 FLT128_DIG)
-
-if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0)
- set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
- set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG})
-else ()
- set(${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG})
-endif ()
+string (REGEX REPLACE "{" "" OUT_VAR1 ${PAC_FC_ALL_REAL_KINDS})
+string (REGEX REPLACE "}" "" OUT_VAR1 ${OUT_VAR1})
+set (${HDF_PREFIX}_H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR1}/)")
+string (REGEX REPLACE "{" "" OUT_VAR2 ${PAC_FC_ALL_REAL_KINDS_SIZEOF})
+string (REGEX REPLACE "}" "" OUT_VAR2 ${OUT_VAR2})
+set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR2}/)")
# Setting definition if there is a 16 byte fortran integer
string (FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos)
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index 260bbe0..bd14a0d 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -86,9 +86,11 @@ if (NOT MSVC AND NOT MINGW)
# warnings that are emitted. If you need it, add it at configure time.
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
+ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
+ endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
- list (APPEND H5_CXXFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow")
- list (APPEND H5_CXXFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED
@@ -117,21 +119,20 @@ if (NOT MSVC AND NOT MINGW)
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
- # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- # list (APPEND H5_CXXFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing")
- # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # autotools always add the C flags with the CXX flags
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
- # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
else ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
- # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
endif ()
endif ()
@@ -139,14 +140,15 @@ if (NOT MSVC AND NOT MINGW)
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... Only needed for gcc 4.X
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
# Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.8")
if (HDF5_ENABLE_DEV_WARNINGS)
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
else ()
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
@@ -155,8 +157,7 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 4.9+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9")
endif ()
@@ -173,16 +174,16 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 6.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
endif ()
# Append more extra warning flags that only gcc 7.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
if (HDF5_ENABLE_DEV_WARNINGS)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
#else ()
# ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
@@ -191,15 +192,15 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 8.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- #if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
- #else ()
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8")
- #endif ()
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8")
+ endif ()
if (HDF5_ENABLE_DEV_WARNINGS)
- # autotools always add the C flags with the CXX flags
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
else ()
# autotools always add the C flags with the CXX flags
@@ -209,15 +210,26 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 9.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ # Use the C warnings as CXX warnings are the same
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-9")
endif ()
- endif ()
-else ()
- if (NOT MINGW)
- list (APPEND HDF5_CMAKE_CXX_FLAGS "/EHsc")
+
+ # Append more extra warning flags that only gcc 9.3+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3)
+ # do not use C warnings, gnu-warnings 9.3, no cxx warniings
+ # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
endif ()
+
+ # Append more extra warning flags that only gcc 10.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
+ #else ()
+ # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
+ endif ()
+ endif ()
+ endif ()
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 0775f59..e38a92b 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -108,14 +108,13 @@ if (NOT MSVC AND NOT MINGW)
# warnings that are emitted. If you need it, add it at configure time.
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
- list (APPEND H5_CFLAGS "-Wcomment -Wdeprecated -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith")
- list (APPEND H5_CFLAGS "-Wreturn-type -Wstrict-prototypes -Wuninitialized")
- list (APPEND H5_CFLAGS "-Wunknown-pragmas -Wunused-function -Wunused-variable")
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
+ endif()
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
- list (APPEND H5_CFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow")
- list (APPEND H5_CFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
endif()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Add general CFlags for GCC versions 4.8 and above
@@ -153,7 +152,7 @@ if (NOT MSVC AND NOT MINGW)
if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
- list (APPEND H5_CFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 0a27692..207e589 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -376,15 +376,13 @@ HDF_CHECK_TYPE_SIZE (uint_least64_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST64_T)
HDF_CHECK_TYPE_SIZE (int_fast64_t ${HDF_PREFIX}_SIZEOF_INT_FAST64_T)
HDF_CHECK_TYPE_SIZE (uint_fast64_t ${HDF_PREFIX}_SIZEOF_UINT_FAST64_T)
-if (NOT APPLE)
- HDF_CHECK_TYPE_SIZE (size_t ${HDF_PREFIX}_SIZEOF_SIZE_T)
- HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
- if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
- set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
- endif ()
- if (MINGW OR NOT WINDOWS)
- HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
- endif ()
+HDF_CHECK_TYPE_SIZE (size_t ${HDF_PREFIX}_SIZEOF_SIZE_T)
+HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+ set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
+endif ()
+if (MINGW OR NOT WINDOWS)
+ HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
endif ()
HDF_CHECK_TYPE_SIZE (off_t ${HDF_PREFIX}_SIZEOF_OFF_T)
diff --git a/config/commence.am b/config/commence.am
index 96c2fc2..3fddc6a 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -45,7 +45,7 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
+# has been removed. According to the official description of DESTDIR by GNU at
# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
# prepended to the normal and complete install path that it precedes for the
# purpose of installing in a temporary directory which is useful for building
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index 4fe5782..9f11406 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -183,7 +183,6 @@ if test "X-g++" = "X-$cxx_vendor"; then
# Warnings #
############
-# First load the C warnings then add CXX warnings (if needed)
###########
# General #
@@ -199,6 +198,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
# Developer warnings #
######################
+ # Use the C warnings as CXX warnings are the same
NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
@@ -210,6 +210,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
# GCC 4.8 through the end of GCC 4 series
if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
+ # Use the C warnings as CXX warnings are the same
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)"
fi
@@ -220,13 +221,13 @@ if test "X-g++" = "X-$cxx_vendor"; then
# gcc >= 4.8
if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)"
+ # Use the C warnings as CXX warnings are the same
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)"
fi
# gcc >= 4.9
if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 9; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.9)"
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.9)"
fi
@@ -239,30 +240,42 @@ if test "X-g++" = "X-$cxx_vendor"; then
# gcc >= 6
if test $cxx_vers_major -ge 6; then
+ # Use the C warnings as CXX warnings are the same
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 6)"
fi
# gcc >= 7
if test $cxx_vers_major -ge 7; then
+ # Use the C warnings as CXX warnings are the same
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 7)"
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-7)"
fi
# gcc 8
if test $cxx_vers_major -ge 8; then
+ # Use the C warnings as CXX warnings are the same
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)"
#H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)"
#H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments noerror-8)"
+ # Use the C warnings as CXX warnings are the same
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)"
fi
# gcc 9
if test $cxx_vers_major -ge 9; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 9)"
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-9)"
fi
+ # gcc >= 9.3
+ # no cxx warnings, do NOT use C warnings
+
+ # gcc >= 10
+ if test $cxx_vers_major -ge 10; then
+ # Use the C warnings as CXX warnings are the same
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)"
+ fi
+
#################
# Flags are set #
#################
diff --git a/config/gnu-flags b/config/gnu-flags
index 01533de..3e4ceb2 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -207,9 +207,9 @@ if test "X-gcc" = "X-$cc_vendor"; then
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)"
H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-general)"
- ######################
- # Developer warnings #
- ######################
+ ######################
+ # Developer warnings #
+ ######################
NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general)
DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general)
diff --git a/config/gnu-warnings/cxx-4.9 b/config/gnu-warnings/cxx-4.9
index 046d6db..30553bd 100644
--- a/config/gnu-warnings/cxx-4.9
+++ b/config/gnu-warnings/cxx-4.9
@@ -1 +1,2 @@
+-Wdate-time
-Wopenmp-simd
diff --git a/config/gnu-warnings/cxx-9 b/config/gnu-warnings/cxx-9
index d897de2..8f843a4 100644
--- a/config/gnu-warnings/cxx-9
+++ b/config/gnu-warnings/cxx-9
@@ -1,2 +1,4 @@
+-Wattribute-alias=2
+-Wmissing-profile
# Turn this on when the C++ wrappers obey the Rule of Five
-Wno-deprecated-copy
diff --git a/config/gnu-warnings/developer-10 b/config/gnu-warnings/developer-10
index fcd460d..022c97f 100644
--- a/config/gnu-warnings/developer-10
+++ b/config/gnu-warnings/developer-10
@@ -1,6 +1,2 @@
# New warning
-Warith-conversion
-
-# Enable static analysis of program flow
--fanalyzer
--fdiagnostics-path-format=none
diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general
index 31194d3..f49d89a 100644
--- a/config/gnu-warnings/noerror-general
+++ b/config/gnu-warnings/noerror-general
@@ -1,6 +1,8 @@
#
-# HDF5 code should not trigger the following warnings under any
-# circumstances, so ask the compiler to treat them as errors:
+# These warnings will be treated as errors, using the error-general file,
+# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or
+# the --enable-warnings-as-errors option is specified for configure.
+# Otherwise this file will be used to treat them as warnings.
#
-Wbad-function-cast
-Wimplicit-function-declaration
diff --git a/config/intel-cxxflags b/config/intel-cxxflags
index 3ef172f..107b087 100644
--- a/config/intel-cxxflags
+++ b/config/intel-cxxflags
@@ -16,6 +16,20 @@
# if the compiler is not Intel; otherwise `cxx_flags_set' is set to `yes'
#
+#
+# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_intel_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg}
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for icpc
# icpc unless a compiler version is already known
#
@@ -80,7 +94,7 @@ if test "X-icpc" = "X-$cxx_vendor"; then
# Debug #
#########
- # NDEBUG is handled explicitly by the configure script
+ # NDEBUG is handled explicitly in configure
# -g is handled by the symbols flags
DEBUG_CXXFLAGS=
@@ -88,14 +102,13 @@ if test "X-icpc" = "X-$cxx_vendor"; then
# Symbols #
###########
- SYMBOLS_CXXFLAGS="-g"
NO_SYMBOLS_CXXFLAGS="-Wl,-s"
+ SYMBOLS_CXXFLAGS="-g"
#############
# Profiling #
#############
- # Use this for profiling with gprof
PROFILE_CXXFLAGS="-p"
################
@@ -110,18 +123,62 @@ if test "X-icpc" = "X-$cxx_vendor"; then
# Warnings #
############
+ ###########
+ # General #
+ ###########
+
+ # Add various general warning flags in intel-warnings.
+ # Use the C warnings as CXX warnings are the same
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments general)"
+
+ ######################
+ # Developer warnings #
+ ######################
+
+ # Use the C warnings as CXX warnings are the same
+ #NO_DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments no-developer-general)
+ #DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments developer-general)
+
#############################
# Version-specific warnings #
#############################
+ # intel == 8.0
+ if test $cxx_vers_major -eq 8 -a $cxx_vers_minor -eq 0; then
+ # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2.
+ HIGH_OPT_CFLAGS="-O2"
+ fi
+
+ # intel == 10
+ if test $cxx_vers_major -eq 10; then
+ HIGH_OPT_CFLAGS="-O1"
+ fi
+
+ # intel >= 15
+ if test $cxx_vers_major -ge 15; then
+ # Use the C warnings as CXX warnings are the same
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments 15)"
+ fi
+
+ # intel >= 18
+ if test $cxx_vers_major -ge 18; then
+ # Use the C warnings as CXX warnings are the same
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments 18)"
+ fi
+
+ # intel <= 19
+ if test $cxx_vers_major -le 19; then
+ # Use the C warnings as CXX warnings are the same
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments general-19)"
+ fi
+
#################
# Flags are set #
#################
cxx_flags_set=yes
-
fi
-# Clear cc info if no flags set
+# Clear cxx info if no flags set
if test "X-$cxx_flags_set" = "X-"; then
cxx_vendor=
cxx_version=
diff --git a/config/intel-fflags b/config/intel-fflags
index b759dfa..42c1781 100644
--- a/config/intel-fflags
+++ b/config/intel-fflags
@@ -56,13 +56,17 @@ if test X = "X$f9x_flags_set"; then
fi
fi
-# Common Intel flags for various situations
if test "X-ifort" = "X-$f9x_vendor"; then
- # Insert section about version specific problems from compiler flags here,
- # if necessary.
+
+ FC_BASENAME=ifort
+ F9XSUFFIXFLAG=""
+ FSEARCH_DIRS=""
+
+ ###############################
+ # Architecture-specific flags #
+ ###############################
arch=
- # Architecture-specific flags
# Nothing currently. (Uncomment code below and modify to add any)
#case "$host_os-$host_cpu" in
# *-i686)
@@ -78,32 +82,55 @@ if test "X-ifort" = "X-$f9x_vendor"; then
# ;;
#esac
- # General
- FC_BASENAME=ifort
- F9XSUFFIXFLAG=""
- FSEARCH_DIRS=""
- H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free"
- H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)"
+ ##############
+ # Production #
+ ##############
- # Production
PROD_FCFLAGS=
- # Debug
+ #########
+ # Debug #
+ #########
+
DEBUG_FCFLAGS="-check all"
- # Symbols
- SYMBOLS_FCFLAGS="-g"
+ ###########
+ # Symbols #
+ ###########
+
NO_SYMBOLS_FCFLAGS=
+ SYMBOLS_FCFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
- # Profiling
- # Use this for profiling with gprof
PROFILE_FCFLAGS="-p"
- # Optimization
+ ################
+ # Optimization #
+ ################
+
HIGH_OPT_FCFLAGS="-O3"
DEBUG_OPT_FCFLAGS=
NO_OPT_FCFLAGS=
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)"
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+
#################
# Flags are set #
#################
@@ -116,4 +143,3 @@ if test "X-$f9x_flags_set" = "X-"; then
f9x_version=
fi
-
diff --git a/config/intel-flags b/config/intel-flags
index 409ffe9..f46da0a 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -78,26 +78,43 @@ if test "X-icc" = "X-$cc_vendor"; then
# ;;
#esac
- # General
+ ###########
+ # General #
+ ###########
+
# Default to C99 standard.
H5_CFLAGS="$H5_CFLAGS $arch -std=c99"
- # Production
+ ##############
+ # Production #
+ ##############
+
PROD_CFLAGS=
- # Debug
+ #########
+ # Debug #
+ #########
+
# NDEBUG is handled explicitly in configure
DEBUG_CFLAGS=
- # Symbols
- SYMBOLS_CFLAGS="-g"
+ ###########
+ # Symbols #
+ ###########
+
NO_SYMBOLS_CFLAGS="-Wl,-s"
+ SYMBOLS_CFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
- # Profiling
- # Use this for profiling with gprof
PROFILE_CFLAGS="-p"
- # Optimization
+ ################
+ # Optimization #
+ ################
+
HIGH_OPT_CFLAGS="-O3"
DEBUG_OPT_CFLAGS="-O0"
NO_OPT_CFLAGS="-O0"
@@ -110,32 +127,51 @@ if test "X-icc" = "X-$cc_vendor"; then
# General #
###########
+ # Add various general warning flags in intel-warnings.
H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general)"
+ ######################
+ # Developer warnings #
+ ######################
+
+ #NO_DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments no-developer-general)
+ #DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments developer-general)
+
#############################
# Version-specific warnings #
#############################
-case "$cc_vendor-$cc_version" in
- icc-1[5-6]*)
- H5_CFLAGS="$H5_CFLAGS -Wcomment -Wdeprecated -Wextra-tokens -Wformat -Wformat-security -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-variable -Wwrite-strings"
- ;;
- icc-10*)
- HIGH_OPT_CFLAGS="-O1"
- ;;
- icc-8.0*)
+ # intel == 8.0
+ if test $cc_vers_major -eq 8 -a $cc_vers_minor -eq 0; then
# v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2.
HIGH_OPT_CFLAGS="-O2"
- ;;
- icc-*)
- ;;
-esac
+ fi
+
+ # intel == 10
+ if test $cc_vers_major -eq 10; then
+ HIGH_OPT_CFLAGS="-O1"
+ fi
+
+ # intel >= 15
+ if test $cc_vers_major -ge 15; then
+ H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments 15)"
+ fi
+
+ # intel >= 18
+ if test $cc_vers_major -ge 18; then
+ H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments 18)"
+ fi
+
+ # intel <= 19
+ # this file has warnings only available before oneapi versions
+ if test $cc_vers_major -le 19; then
+ H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general-19)"
+ fi
#################
# Flags are set #
#################
cc_flags_set=yes
-
fi
# Clear cc info if no flags set
diff --git a/config/intel-warnings/15 b/config/intel-warnings/15
new file mode 100644
index 0000000..6746f97
--- /dev/null
+++ b/config/intel-warnings/15
@@ -0,0 +1,19 @@
+-Wcomment
+-Wdeprecated
+-Wextra-tokens
+-Wformat
+-Wformat-security
+-Wmain
+-Wmissing-declarations
+-Wmissing-prototypes
+-Wp64
+-Wpointer-arith
+-Wreturn-type
+-Wshadow
+-Wstrict-prototypes
+-Wtrigraphs
+-Wuninitialized
+-Wunknown-pragmas
+-Wunused-function
+-Wunused-variable
+-Wwrite-strings
diff --git a/config/intel-warnings/18 b/config/intel-warnings/18
new file mode 100644
index 0000000..565b47a
--- /dev/null
+++ b/config/intel-warnings/18
@@ -0,0 +1,8 @@
+-Wextra-tokens
+-Wformat
+-Wformat-security
+-Wic-pointer
+-Wshadow
+-Wsign-compare
+-Wtrigraphs
+-Wwrite-strings
diff --git a/config/intel-warnings/developer-general b/config/intel-warnings/developer-general
new file mode 100644
index 0000000..fae56f0
--- /dev/null
+++ b/config/intel-warnings/developer-general
@@ -0,0 +1,4 @@
+-Winline
+-Wreorder
+-Wport
+-Wstrict-aliasing
diff --git a/config/intel-warnings/general b/config/intel-warnings/general
index d0b2e25..bd866b6 100644
--- a/config/intel-warnings/general
+++ b/config/intel-warnings/general
@@ -1,2 +1 @@
-Wall
--Wcheck \ No newline at end of file
diff --git a/config/intel-warnings/general-19 b/config/intel-warnings/general-19
new file mode 100644
index 0000000..e35af30
--- /dev/null
+++ b/config/intel-warnings/general-19
@@ -0,0 +1,2 @@
+# this is only available before oneapi versions
+-Wcheck
diff --git a/config/pgi-cxxflags b/config/pgi-cxxflags
index 3b87db2..7d8bdeb 100644
--- a/config/pgi-cxxflags
+++ b/config/pgi-cxxflags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# All rights reserved.
@@ -44,21 +44,24 @@ fi
# Common PGI flags for various situations
if test "X-pgc++" = "X-$cxx_vendor"; then
- # C++-specific
+ ###########
+ # General #
+ ###########
+
+ # Default to C++11 standard
H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11 -Minform=warn"
##############
# Production #
##############
- # NDEBUG is handled explicitly by the configure script
- PROD_CXXFLAGS="-fast"
+ PROD_CXXFLAGS=
#########
# Debug #
#########
- # NDEBUG is handled explicitly by the configure script
+ # NDEBUG is handled explicitly in configure
# -g is handled by the symbols flags
DEBUG_CXXFLAGS="-Mbounds"
@@ -66,8 +69,8 @@ if test "X-pgc++" = "X-$cxx_vendor"; then
# Symbols #
###########
- SYMBOLS_CXXFLAGS="-g"
NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
#############
# Profiling #
@@ -85,12 +88,14 @@ if test "X-pgc++" = "X-$cxx_vendor"; then
DEBUG_OPT_CXXFLAGS="-gopt -O2"
NO_OPT_CXXFLAGS="-O0"
- # Flags are set
+ #################
+ # Flags are set #
+ #################
cxx_flags_set=yes
fi
# Clear cxx info if no flags set
if test "X-$cxx_flags_set" = "X-"; then
- cxx_vendor=
- cxx_version=
+ cxx_vendor=
+ cxx_version=
fi
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 3171695..6401d8d 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -45,11 +45,12 @@ fi
# Common PGI flags for various situations
if test "X-pgf90" = "X-$f9x_vendor"; then
- # Insert section about version specific problems from gnu-flags here, if
- # necessary.
+
+ ###############################
+ # Architecture-specific flags #
+ ###############################
arch=
- # Architecture-specific flags
# Nothing currently. (Uncomment code below and modify to add any)
#case "$host_os-$host_cpu" in
# *-i686)
@@ -65,15 +66,10 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
# ;;
#esac
- # General
- FC_BASENAME=pgf90
- Fortran_COMPILER_ID=PGI
- F9XSUFFIXFLAG=""
- FSEARCH_DIRS=""
- # Uncomment the following to add something specific for FCFLAGS.
- #FCFLAGS="$FCFLAGS"
+ ##############
+ # Production #
+ ##############
- # Production
# Check for MPI wrapper being used and tweak down compiler options
# Comment out the Tweaking since it caused problems to mpich1.2.6.
# Need to investigate the reasons to tweak.
@@ -84,24 +80,55 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
#fi
PROD_FCFLAGS="-fast -Mnoframe"
- # Debug
+ #########
+ # Debug #
+ #########
+
DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk"
- # Symbols
- SYMBOLS_FCFLAGS="-g"
+ ###########
+ # Symbols #
+ ###########
+
NO_SYMBOLS_FCFLAGS="-s"
+ SYMBOLS_FCFLAGS="-g"
+
+ #############
+ # Profiling #
+ #############
- # Profiling
PROFILE_FCFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
#PROFILE_FCFLAGS="-pg"
- # Optimization
+ ################
+ # Optimization #
+ ################
+
HIGH_OPT_FCFLAGS=
DEBUG_OPT_FCFLAGS=
NO_OPT_FCFLAGS=
- # Flags are set
+ ############
+ # Warnings #
+ ############
+
+ ###########
+ # General #
+ ###########
+
+ FC_BASENAME=pgf90
+ Fortran_COMPILER_ID=PGI
+ F9XSUFFIXFLAG=""
+ FSEARCH_DIRS=""
+ # Uncomment the following to add something specific for FCFLAGS.
+ #FCFLAGS="$FCFLAGS"
+
+
+
+ #################
+ # Flags are set #
+ #################
f9x_flags_set=yes
fi
@@ -111,4 +138,3 @@ if test "X-$f9x_flags_set" = "X-"; then
f9x_version=
fi
-
diff --git a/config/pgi-flags b/config/pgi-flags
index 24c7174..b197a1c 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -45,8 +45,8 @@ fi
# Common PGI flags for various situations
if test "X-pgcc" = "X-$cc_vendor"; then
- # Insert section about version specific problems from gnu-flags here, if
- # necessary.
+ # Insert section about version specific problems from compiler flags here,
+ # if necessary.
arch=
# Architecture-specific flags
@@ -65,7 +65,11 @@ if test "X-pgcc" = "X-$cc_vendor"; then
# ;;
#esac
- # General
+ ###########
+ # General #
+ ###########
+
+ # Default to C99 standard.
H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn"
##############
@@ -87,8 +91,8 @@ if test "X-pgcc" = "X-$cc_vendor"; then
# Symbols #
###########
- SYMBOLS_CFLAGS="-g"
NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g"
#############
# Profiling #
@@ -106,12 +110,14 @@ if test "X-pgcc" = "X-$cc_vendor"; then
DEBUG_OPT_CFLAGS="-gopt -O2"
NO_OPT_CFLAGS="-O0"
- # Flags are set
+ #################
+ # Flags are set #
+ #################
cc_flags_set=yes
fi
# Clear cc info if no flags set
if test "X-$cc_flags_set" = "X-"; then
- cc_vendor=
- cc_version=
+ cc_vendor=
+ cc_version=
fi