Skip to content

Commit

Permalink
Sync with develop (#3737)
Browse files Browse the repository at this point in the history
* Correct ld in format strings in cmpd_dset.c (#3697)

Removes clang warnings

* Clean up comments. (#3695)

* Add NVidia compiler support and CI (#3686)

* Work around Theta system issue failure in links test (#3710)

When the Subfiling VFD is enabled, the links test may
try to initialize the Subfiling VFD and call MPI_Init_thread.
On Theta, this appears to have an issue that will cause
the links test to fail. Reworked the test to check for
the same conditions in a more roundabout way that doesn't
involved initializing the Subfiling VFD

* Fix issue with unmatched messages in ph5diff (#3719)

* provide an alternative to mapfile for older bash (#3717)

* Attempt to quiet some warnings with cray compilers. (#3724)

* Fix CMake VOL passthrough tests by copying files to correct directory (#3721)

* Develop intel split (#3722)

* Split intel compiler flags into sub-folders
* Update Intel options for warnings
* Mostly CMake, Autotools needs additional work

* Fixes and adjustments to t_filters_parallel (#3714)

Broadcast number of datasets to create in multi-dataset I/O cases
so that interference with random number generation doesn't cause
mismatches between ranks

Set fill time for datasets to "never" by default and adjust on a
per-test basis to avoid writing fill values to chunks when it's
unnecessary

Reduce number of loops run in some tests when performing multi-dataset
I/O

Fix an issue in the "fill time never" test where data verification
could fill if file space reuse causes application buffers to be
filled with chosen fill value when reading from datasets with
uninitialized storage

Skip multi-chunk I/O test configurations for multi-dataset I/O
configurations when the TestExpress level is > 1 since those
tests can be more stressful on the file system

Disable use of persistent file free space management for now
since it occasionally runs into an infinite loop in the library's
free space management code

* Suppress cast-qual warning in H5TB Fortran wrapper (#3728)

This interface is fundamentally broken, const-wise.

* Add new API function H5Pget_actual_select_io_mode() (#2974)

This function allows the user to determine if the library performed selection I/O, vector I/O, or scalar (legacy) I/O during the last HDF5 operation performed with the provided DXPL. Expanded existing tests to check this functionality.

* Test scripts now execute in-source with creation of tmp dir (#3723)

Fixes a few issues created in #3580:

* Fixes a problem where committed tools test files were deleted when cleaning after an in-source build
* Fixes issues with test file paths in Autotools tools test scripts

* Add -h and --help as flags in h5cc & h5fc (#3729)

Adds these common help flags in addition to -help

* Update the library version matrix for H5Pset_libver_bounds() (#3702)

* Fixed #3524

Added 1.12, 1.14, and 1.16 to the table for libver bounds in the H5Pset_libver_bounds docs.

* Remove references to LIBVER_V116

---------

Co-authored-by: H. Joe Lee <[email protected]>
Co-authored-by: Allen Byrne <[email protected]>
Co-authored-by: Scot Breitenfeld <[email protected]>
Co-authored-by: Dana Robinson <[email protected]>
Co-authored-by: Neil Fortner <[email protected]>
Co-authored-by: Glenn Song <[email protected]>
Co-authored-by: bmribler <[email protected]>
  • Loading branch information
8 people authored Oct 21, 2023
1 parent 302f54a commit b16808d
Show file tree
Hide file tree
Showing 97 changed files with 2,106 additions and 1,203 deletions.
2 changes: 1 addition & 1 deletion CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ if (HDF5_PACK_EXAMPLES)
COMPONENT hdfdocuments
)

option (EXAMPLES_USE_RELEASE_NAME "Use the released examples artifact name" OFF)
option (EXAMPLES_DOWNLOAD "Download to use released examples files" OFF)
if (EXAMPLES_DOWNLOAD)
option (EXAMPLES_USE_RELEASE_NAME "Use the released examples artifact name" OFF)
if (EXAMPLES_USE_RELEASE_NAME)
set (EXAMPLES_NAME ${EXAMPLES_TGZ_ORIGNAME})
else ()
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-master.tar.gz"},
"HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "PATH", "value": "${sourceParentDir}/temp"},
"EXAMPLES_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5-examples/releases/download/snapshot"},
"EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "snapshot.tar.gz"}
"EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "hdf5-examples-2.0.4.tar.gz"}
}
},
{
Expand Down
22 changes: 14 additions & 8 deletions bin/h5cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS] <compile line>"
echo " OPTIONS:"
echo " -help This help message."
echo " -echo Show all the shell commands executed"
echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built"
echo " -help | --help | -h This help message."
echo " -echo Show all the shell commands executed"
echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built"
echo " without static libraries]"
echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built"
echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built"
echo " with static libraries]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
Expand Down Expand Up @@ -256,6 +256,12 @@ for arg in $@ ; do
-help)
usage
;;
--help)
usage
;;
-h)
usage
;;
*\"*)
qarg="'"$arg"'"
allargs="$allargs $qarg"
Expand Down
38 changes: 29 additions & 9 deletions config/cmake/HDFCXXCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
if (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM"))
set (_INTEL_WINDOWS 1)
endif ()

Expand Down Expand Up @@ -130,16 +130,16 @@ else ()
# warnings that are emitted. If you need it, add it at configure time.
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-general")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-general")
else ()
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/general")
endif()
if (NOT _INTEL_WINDOWS)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/15")
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/18")
endif()
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
Expand All @@ -149,7 +149,13 @@ else ()
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
endif ()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-general")
else ()
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/general")
endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
Expand All @@ -164,18 +170,28 @@ endif ()
if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-developer-general")
else ()
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/developer-general")
endif()
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 MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-developer-general")
else ()
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/developer-general")
endif()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
else ()
if (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/no-developer-general")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
endif ()
endif ()
Expand Down Expand Up @@ -307,6 +323,8 @@ if (HDF5_ENABLE_SYMBOLS MATCHES "YES")
if (CMAKE_CXX_COMPILER_LOADED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif ()
Expand All @@ -315,6 +333,8 @@ elseif (HDF5_ENABLE_SYMBOLS MATCHES "NO")
if (CMAKE_CXX_COMPILER_LOADED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-s")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-s")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
endif ()
Expand Down
90 changes: 54 additions & 36 deletions config/cmake/HDFCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,54 @@
# If you do not have access to either file, you may request a copy from
# [email protected].
#
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED TRUE)
set (CMAKE_C_STANDARD 99)
set (CMAKE_C_STANDARD_REQUIRED TRUE)

set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
message (VERBOSE "Warnings Configuration: C default: ${CMAKE_C_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
if(WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "Intel")
set(_INTEL_WINDOWS 1)
endif()
if (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "Intel" OR CMAKE_C_COMPILER_ID MATCHES "IntelLLVM"))
set (_INTEL_WINDOWS 1)
endif ()

if(WIN32 AND CMAKE_C_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
set(_CLANG_MSVC_WINDOWS 1)
endif()
if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
set (_CLANG_MSVC_WINDOWS 1)
endif ()

# Disable deprecation warnings for standard C functions.
# really only needed for newer versions of VS, but should
# not hurt other versions, and this will work into the
# future
if(MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif()
if (MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS)
add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif ()

if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:10000000")
endif()
if (MSVC)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:10000000")
endif ()

# MSVC 14.28 enables C5105, but the Windows SDK 10.0.18362.0 triggers it.
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 19.28)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd5105")
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 19.28)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd5105")
endif ()

if(_CLANG_MSVC_WINDOWS AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker -stack:20000000")
endif()

if(CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Minform=warn")
if (CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Minform=warn")
if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
endif ()
else ()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mbounds -g")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mbounds -g")
endif ()
endif()
endif ()

if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
Expand Down Expand Up @@ -146,20 +146,20 @@ else ()
# warnings that are emitted. If you need it, add it at configure time.
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-general")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-general")
else ()
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/general")
endif()
if (NOT _INTEL_WINDOWS)
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/15")
endif ()
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
endif()
endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/18")
endif ()
endif ()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Add general CFlags for GCC versions 4.8 and above
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
Expand All @@ -169,7 +169,15 @@ else ()
# gcc automatically inlines based on the optimization level
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-general")
else ()
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/general")
endif ()
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
Expand All @@ -191,13 +199,19 @@ if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-developer-general")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-developer-general")
else ()
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/developer-general")
endif ()
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 "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-developer-general")
else ()
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/developer-general")
endif ()
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()

Expand All @@ -211,12 +225,16 @@ if (HDF5_ENABLE_DEV_WARNINGS)
list (APPEND H5_CFLAGS "-Winline")
elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
list (APPEND H5_CFLAGS "-Winline")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
list (APPEND H5_CFLAGS "-Winline")
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
list (APPEND H5_CFLAGS "-Winline")
endif ()
endif ()
else ()
if (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/no-developer-general")
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
endif ()
endif ()
Expand Down
20 changes: 18 additions & 2 deletions config/cmake/HDFFortranCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
set (HDF5_WARNINGS_BLOCKED 1)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /warn:none")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /warn:none")
endif ()
endif ()
if (WIN32)
Expand Down Expand Up @@ -70,7 +72,11 @@ endif ()
if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-ifort-general")
else ()
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/ifort-general")
endif()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general")
Expand All @@ -85,6 +91,13 @@ if (NOT MSVC AND NOT MINGW)
else ()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008")
endif ()
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
if (_INTEL_WINDOWS)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-ifort-general")
else ()
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/ifort-general")
endif()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03")
endif ()
Expand Down Expand Up @@ -135,7 +148,10 @@ if (NOT MSVC AND NOT MINGW)
endif ()
else ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-ifort-general")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "/stand:f03" "/free")
elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-ifort-general")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "/stand:f03" "/free")
endif ()
endif ()
Expand Down
8 changes: 0 additions & 8 deletions config/gnu-warnings/developer-general
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@
-Wswitch-enum
-Wunsafe-loop-optimizations
-Wunused-macros
# -Winline warnings aren't included here because, for at least
# GNU compilers, this flag appears to conflict specifically with
# the -Og optimization level flag added for Debug and Developer
# builds and will produce warnings about functions not being
# considered for inlining. The flag will be added to the list
# of compiler flags separately if developer warnings are enabled
# and the build type is not Debug or Developer
#-Winline
Loading

0 comments on commit b16808d

Please sign in to comment.