summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFFortranCompilerFlags.cmake
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-04-08 02:07:31 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-04-08 02:07:31 (GMT)
commit94ecd14100c226ae16ba8e6122e8a025b408f360 (patch)
treeead9be12c20e05113ec060ddfc81bac74c8162e9 /config/cmake/HDFFortranCompilerFlags.cmake
parentce39d7501c58427add05aba62956acb84a6f56da (diff)
downloadhdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.zip
hdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.tar.gz
hdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.tar.bz2
Brings many CMake changes from develop
Diffstat (limited to 'config/cmake/HDFFortranCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index d133069..8b631ad 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -10,7 +10,9 @@
# help@hdfgroup.org.
#
-message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
@@ -43,6 +45,14 @@ endif ()
#-----------------------------------------------------------------------------
# HDF5 library compile options
#-----------------------------------------------------------------------------
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so
@@ -64,7 +74,9 @@ if (NOT MSVC AND NOT MINGW)
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03")
endif ()
- message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
+ endif ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")