summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFFortranCompilerFlags.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-08-21 22:13:03 (GMT)
committerGitHub <noreply@github.com>2023-08-21 22:13:03 (GMT)
commitceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch)
tree887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /config/cmake/HDFFortranCompilerFlags.cmake
parent89b4afd4b317c5131cbc8607c99d21b369d050eb (diff)
downloadhdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'config/cmake/HDFFortranCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake18
1 files changed, 12 insertions, 6 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 84b3ebe..65a1cdc 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -54,17 +54,18 @@ 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")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand f03" "-free")
+ 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")
@@ -82,6 +83,11 @@ if (NOT MSVC AND NOT MINGW)
# 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")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-4.8")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-4.8")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 4.9+ knows about
@@ -92,7 +98,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 ()