summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFFortranCompilerFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/HDFFortranCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 18ab621..754259e 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -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")
@@ -92,7 +91,9 @@ 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)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
+ 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