summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-08-23 15:48:14 (GMT)
committerGitHub <noreply@github.com>2022-08-23 15:48:14 (GMT)
commitf020d129b2ed173c8d0075d670214440013d7daf (patch)
treed5bc621f4469e0ee66f99c8d89f6de0813fc0a73 /config/cmake
parent21ec3378558cdc642ff49963c13ca18d8e49349c (diff)
downloadhdf5-f020d129b2ed173c8d0075d670214440013d7daf.zip
hdf5-f020d129b2ed173c8d0075d670214440013d7daf.tar.gz
hdf5-f020d129b2ed173c8d0075d670214440013d7daf.tar.bz2
Corrects more Fortran warnings (#2059)
* Moves -Wunused-dummy-arguments to the developer warnings since this generates a lot of spurious, unfixable noise due to things like callback wrappers * Changes the return cast in h5fget_fileno_c, fixes a comment, and comment on potential badness * Initializes a variable in tH5L_F03.F90 to quiet a 'maybe uninitialized' warning
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 13e9902..7fdc3f8 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -54,10 +54,6 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERS
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# CDash is configured to only allow 3000 warnings, so
-# break into groups (from the config/gnu-flags file)
-#-----------------------------------------------------------------------------
if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
@@ -65,6 +61,11 @@ if (NOT MSVC AND NOT MINGW)
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")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-general")
+ endif ()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none")
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0 AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008ts")
@@ -92,7 +93,7 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-gfort-5")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-5")
endif ()
endif ()