Revise gnu-*flags and cmake/HDF*CompilerFlags.cmake files to add warning

flags for GCC compilers version 4.8 and above.
Removed files from gnu-warnings that only apply to versions < 4.8.
Consolidated warnings from versions < 4.8 that apply to versions >= 4.8
into the 4.8 warnings files.
This commit is contained in:
Larry Knox
2020-05-18 14:28:51 -05:00
parent 820363aa6d
commit fcd87d2569
29 changed files with 99 additions and 350 deletions

View File

@@ -67,23 +67,6 @@ if (NOT MSVC)
message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# Append warning flags that only gcc 4.4+ knows about
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.4")
# Append more extra warning flags that only gcc 4.5+ know about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.5)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.5")
endif ()
# Append more extra warning flags that only gcc 4.6+ know about
#if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.6")
#endif ()
# Append more extra warning flags that only gcc 4.7+ know about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.7)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.7")
endif ()
# Append more extra warning flags that only gcc 4.8+ know about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
@@ -95,7 +78,7 @@ if (NOT MSVC)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.9")
#endif ()
# Append more extra warning flags that only gcc 5.1+ know about
# Append more extra warning flags that only gcc 5.x+ know about
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 ()