diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-04-14 13:30:25 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-04-14 13:30:25 (GMT) |
commit | 0d5c94ab371e949751431095cdf5f608471d1fc7 (patch) | |
tree | 305de47dcc1d838271e08d7028bf4ffb605597cd | |
parent | 86bac7b594deeba7c3c23732fe5ebd427c012dd2 (diff) | |
download | hdf5-0d5c94ab371e949751431095cdf5f608471d1fc7.zip hdf5-0d5c94ab371e949751431095cdf5f608471d1fc7.tar.gz hdf5-0d5c94ab371e949751431095cdf5f608471d1fc7.tar.bz2 |
TRILAB-192 version of std=f2008 special check
-rw-r--r-- | config/cmake/HDFFortranCompilerFlags.cmake | 89 |
1 files changed, 47 insertions, 42 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index f31eba5..a56ef28 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -73,7 +73,12 @@ if (NOT MSVC) list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand:f03" "-free") elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general") - list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-std=f2008" "-fimplicit-none") + 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") + else () + list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008") + endif () elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03") endif () @@ -82,57 +87,57 @@ if (NOT MSVC) 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") - endif () - # Append more extra warning flags that only gcc 4.5+ know about - if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND 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.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 (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND 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.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 (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND 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.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 (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND 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") - endif () + # Append more extra warning flags that only gcc 4.8+ know 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") + endif () - # Append more extra warning flags that only gcc 4.9+ know about - #if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.9) - # 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 4.9+ know about + #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.9) + # 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 - if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND 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 () + # Append more extra warning flags that only gcc 5.1+ 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 () - # Append more extra warning flags that only gcc 6.x+ know about - if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0) - ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-6") - endif () + # Append more extra warning flags that only gcc 6.x+ know about + if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0) + ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-6") + endif () - # Append more extra warning flags that only gcc 7.x+ know about - #if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0) - # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-7") - #endif () + # Append more extra warning flags that only gcc 7.x+ know about + #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0) + # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-7") + #endif () - # Append more extra warning flags that only gcc 8.x+ know about - if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0) - ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-8") - endif () + # Append more extra warning flags that only gcc 8.x+ know about + if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0) + ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-8") + endif () - # Append more extra warning flags that only gcc 9.x+ know about - #if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0) - # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-9") - #endif () + # Append more extra warning flags that only gcc 9.x+ know about + #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0) + # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-9") + #endif () + endif () else () if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") #ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general") |