Skip to content

Commit

Permalink
Merge Github #1019 - add Fortran developer flags #1090 (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Oct 31, 2021
1 parent c910630 commit d8871db
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
./config/gnu-warnings/general
./config/gnu-warnings/gfort-general
./config/gnu-warnings/gfort-4.8
./config/gnu-warnings/gfort-5
./config/gnu-warnings/developer-gfort-5
./config/gnu-warnings/gfort-6
./config/gnu-warnings/gfort-8
./config/gnu-warnings/no-cxx-developer-4.8
Expand Down
10 changes: 5 additions & 5 deletions config/cmake/HDFFortranCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ if (NOT MSVC AND NOT MINGW)
endif ()

if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")

# Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8")
Expand All @@ -91,10 +90,11 @@ if (NOT MSVC AND NOT MINGW)
#endif ()

# Append more extra warning flags that only gcc 5.x+ knows about
# do not include -Wuse-without-only
#if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
#endif ()
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")
endif ()
endif ()

# Append more extra warning flags that only gcc 6.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0)
Expand Down
8 changes: 4 additions & 4 deletions config/gnu-fflags
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ if test "X-gfortran" = "X-$f9x_vendor"; then

# gfortran 4.9 (nothing new)

# gfortran >= 5 (do not include -Wuse-without-only)
#if test $f9x_vers_major -ge 5; then
# H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-5)"
#fi
# gfortran >= 5
if test $f9x_vers_major -ge 5; then
DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments developer-gfort-5)"
fi

# gfortran >= 6
if test $f9x_vers_major -ge 6; then
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,7 @@ fi
case "X-$DEV_WARNINGS" in
X-yes)
H5_CFLAGS="$H5_CFLAGS $DEVELOPER_WARNING_CFLAGS"
H5_FCFLAGS="$H5_FCFLAGS $DEVELOPER_WARNING_FCFLAGS"
AC_MSG_RESULT([yes])
;;
X-no)
Expand Down

0 comments on commit d8871db

Please sign in to comment.